Sunday, January 24, 2010

Volta Redux by Erik Meijer’s Cloud Data Programmability Team and Reactive Extensions for .NET (Rx)

Volta began life in 2007 as a Microsoft Live Labs’ incubator project from the Tesla group with two primary objectives:

  • Declarative refactoring from single-tier to multi-tier applications
  • Recompilation of MSIL code to JavaScript

Following are earlier references to Volta from the OakLeaf Systems blog in LIFO order:

LINQ and Entity Framework Posts for 10/1/2008+: Mary Jo Foley wrote Live Labs kills Deepfish; suspends Volta downloads on 10/2/2008. However, she quoted a Microsoft representative as denying that Volta was being discontinued, but that’s all the rep would say. Very strange.

LINQ and Entity Framework Posts for 9/8/2008+: Miscellaneous Sessions from DevDays 2008 Amsterdam (01:09:32 video, May 2008): Mats Helander (Avenade): How does Volta Change the game? (Requires Live ID login).

First Volta CTP Available from Microsoft Live Labs (12/6/2007): Erik Meijer’s more detailed description of Volta and earlier links from the OakLeaf blog.

I’ll update this post as the team releases CTP source code that runs on Visual Studio 2010 Beta 2 and later.

JavaScript Note: Fredrik Holmström has posted IronJS on GitHub. Iron JS is a ECMAScript 3.0 implementation built on top of the Dynamic Language Runtime from Microsoft which allows you to embed a javascript runtime into your .NET applications.

Frederik says the latest version of IronJS (1/23/2010) will compile JQuery.

Cloud Programmability Background

Erik, whom I and many others call “the Father of LINQ”, is now managing the Cloud Programmability (also called the SQL Server Cloud Data Programmability) team. Here’s an excerpt from his current bio on the Microsoft Research site:

Erik Meijer is an accomplished programming-language designer who has worked on a wide range of languages, including Haskell, Mondrian, X#, Cω, C#, and Visual Basic. He runs the Cloud Programmability Team at Microsoft, where his primary focus has been to remove the impedance mismatch between databases and programming languages. One of the fruits of these efforts is LINQ, which not only adds a native querying syntax to .NET languages, such as C# and Visual Basic, but also allows developers to query data sources other than tables, such as objects or XML. Most recently, Erik has been working on democratizing the Cloud using Volta and preaching the virtues of fundamentalist functional programming in the new age of concurrency and many-core. Some people might recognize him from his brief stint as the "Head in the Box" on Microsoft VBTV. These days, you can watch him on Channel 9.

Volta’s New Lease on Life with the Cloud Programmability Team

The Erik Meijer and Team: Cloud Data Programmability - Connecting the Distributed Dots video (00:33:32) is the most recent Channel9 segment about the transmogrification of Volta into the Cloud Programmability team. The team leverages the Reactive Extensions (Rx) for .NET to enable asynchronous communication between clients, middle tiers, and data sources, such as Windows Azure and SQL Azure:

Rx is a library for composing asynchronous and event-based programs using observable collections.

The “A” in “AJAX” stands for asynchronous, and indeed modern Web-based and Cloud-based applications are fundamentally asynchronous. In fact, Silverlight bans all blocking networking and threading operations. Asynchronous programming is by no means restricted to Web and Cloud scenarios, however. Traditional desktop applications also have to maintain responsiveness in the face of long latency IO operations and other expensive background tasks.

Another common attribute of interactive applications, whether Web/Cloud or client-based, is that they are event-driven. The user interacts with the application via a GUI that receives event streams asynchronously from the mouse, keyboard, and other inputs.

Rx is a superset of the standard LINQ sequence operators that exposes asynchronous and event-based computations as push-based, observable collections via the new .NET 4.0 interfaces IObservable<T> and IObserver<T>.  These are the mathematical dual of the familiar IEnumerable<T> and IEnumerator<T> interfaces for pull-based, enumerable collections in the .NET Framework.

The IEnumerable<T> and IEnumerator<T> interfaces allow developers to create reusable abstractions to consume and transform values from a wide range of concrete enumerable collections such as arrays, lists, database tables, and XML documents. Similarly, Rx allows programmers to glue together complex event processing and asynchronous computations using LINQ queries over observable collections such as .NET events and APM-based computations, PFx concurrent Task<T>,  the Windows 7 Sensor and Location APIs, SQL StreamInsight temporal event streams, F# first-class events, and async workflows.

Video content related to Windows Azure and SQL Azure begins at 00:21:00.

Following are links to Cloud Programmability team and related member blogs:

Bart De Smet’s 2010 – A Personal Change: putting my “Head In The Cloud” post of 1/10/2010 announced that he joined the Cloud Programmability team.

More Background on Rx and Ripley

Erik presented a Rx: Reactive Extensions for .NET session at PDC 09 on 11/18/2009:

Hear how to model reactive applications using push-based, observable collections, and how to glue together complex event processing and asynchronous programs using declarative LINQ queries. Learn how Rx is part of the Business Platform Division and Live Labs "Cloud Programmability" project that aims to democratize the Cloud by providing tools and libraries to radically simplify the development of data intensive Cloud applications.

Erik Meijer: Rx in 15 Minutes - Rx is Here!!!!! from Channel9 is an abbreviated version of the presentation. Links to 18 other Channel9 video segments about Rx are here.

Ben Livshits’ Ripley research project runs on top of Volta and takes advantage of Rx:

Ripley is “a system that uses replicated execution to automatically preserve the integrity of a distributed computation. Ripley replicates a copy of the client-side computation on the trusted server tier. Every client-side event is transferred to the replica of the client for execution.”

blog comments powered by Disqus