Archive for December, 2007

Microsoft Volta: Multi-tier applications simplified

Today, I woke up to an interesting headline: Microsoft’s Volta project has been released through Microsoft Live Labs. I am not exactly sure of the details of how Volta works but early impressions are that it is fundamentally Microsoft’s response to GWT (Google Web Toolkit); never mind the fact that Microsoft seems to be doing quite a bit of this responding business. So briefly, with Volta you design your applications as you would any desktop application (single tier) and when your code & design wizardry is done you then invoke Volta to turn your application into a web application which is usually multi-tier with each tier running on a different machine or at the very least a different process.

The Context

Developing web application involves the comprehension and appreciation of a number of technologies since web application span multiple runtimes, each with its own idiosyncrasies which typically make sense in each context. A web application stores data in a database which is more likely to be a relational database and as such SQL is the default language used in the database layer. On the presentation layer, the web application interacts with the end user through a browser which typically understands JavaScript, CSS, HTML and so many others through plugins. The browser also makes use of XML and JSON (JavaScript Object Notation) for its data. Finally, in between the database and the browser sees the application tier that binds the other two tiers together; as you may already be guess, this lay runs on the web server and includes Java, PHP, Python, C#, VB.NET, Ruby etc.

Microsoft’s .NET framework is increasing showing up just about everywhere though it is still fundamentally attached to the Windows OS. There is SQLCLR which is embedded into Microsoft SQL Server (from version SQL Server 2005 going forward). On the middle tier (application layer) there is the normal CLR and Silverlight covers the presentation layer. Recent extensions to the .NET programming languages in form of LINQ for C# 3.0 and VB.NET 9.0 introduced a standardized query syntax to enable uniform expression of queries across disparate data sources. Through the use of annotations, LINQ – SQL and LINQ – Entities enables CLR supported rewrite of code from the LINQ compliant programming languages to the appropriate data model in each context.

How it is

Volta works on Microsoft Intermediate Language (MSIL) code and as such it assumes ubiquity of the .NET framework, at least during the development stage; MSIL is the same stuff that .NET compliant programming languages compile to. As you may be aware, Microsoft’s CLR includes a wealth of meta data that can be used for various purposes by tools that understand the meta data. So Volta makes use of the meta data that is compiled into the MSIL code to make a multi-tier application out of a single tier application. Volta leverages the rich meta data to achieve refactoring, retargetting and remodulating.

Refactoring is central to turning single tier code to multi-tier, distributed code as illustrated in the diagram below. The split of the architecture is directed through use annotations on the original single-tier code. So essentially Volta rewrites your application using directions that you provide through annotations effectively providing a translation of your .NET compliant code to JavaScript. From the Volta website:

The Volta rewriter automatically creates and deploys the marshalling and security code necessary to execute the code on multiple tiers. The following diagram illustrates evolution of a Volta application from single-tier architecture to a distributed, multi-tiered architecture.

image001

Source: http://labs.live.com/volta/docs/

Volta achieves its objectives through automation and this also presents a huge opportunity to dynamically target the code that Volta produces to the appropriate platform and runtime hence optimizing it as much as possible. This enables Volta to target platforms but also increases the number of possible tiers that an application can be split into.

From the Volta site once again:

Volta hides as many browser-specific differences as possible, but still allows developers to leverage the unique capabilities of particular browsers. Instead of targeting solely the intersection of browser capabilities, Volta targets the entire union, but makes the intersection browser-agnostic. This is browser remodulating. From the developer’s point of view Volta attenuates browser differences. But what about testing and debugging? Volta and the Visual-Studio integration supports debugging and testing of applications with full transparency. Visual Studio’s Solution Platform dropdown lets us choose the specific browser we want for a testing/debugging session. This allows us to see how each browser renders the HTML.

Resources:

Advertisements

2 Comments