Original URL: http://www.theregister.co.uk/2008/12/23/silverlight_live_mesh_offline/

Offline Silverlight and Live Mesh under the microscope

Microsoft Live Mess?

By Tim Anderson

Posted in Developer, 23rd December 2008 17:02 GMT

Web bling tone The BBC recently released a new cross-platform version of its desktop iPlayer, for downloading programmes and watching them offline. It may the most prominent example yet of an Adobe Systems' AIR application - a runtime that includes the Flash player and the WebKit HTML rendering engine.

By contrast Microsoft's Silverlight player only runs in the browser - or does it?

At the company's Professional Developers' Conference in October, Microsoft unveiled Live Mesh for applications, including the ability to run DTHML and Silverlight applications offline in a desktop runtime. Such applications are called Mesh-enabled Web Applications, or MEWA in the jargon.

A MEWA is an interesting option, particularly since Microsoft is promising cross-platform support for Windows, Mac and mobile devices. It has some advantages over AIR, including sandboxed local clients, built-in data synchronization, and built-in identity management and authentication. Another plus is that a MEWA lives both on the desktop and in the cloud, so if you are not at your usual machine or your operating system is unsupported, you can use the web version and get the same data.

Unfortunately it is also a tricky subject on which to get clear information, as I discovered when experimenting with the limited access Community Technology Preview (CTP). The documentation is thin, the support forum sparsely populated, and much of the information locked in videos from the PDC.

Mesh desktop

The Mesh CTP desktop - note the Apps tab

Live Mesh is an application running on Windows Azure, the overall name for Microsoft's cloud computing platform. There is a consumer version available now, which provides an online Live Desktop and the ability to synchronize files across several PCs and share them with others.

Computers that are joined to a Mesh need a runtime called the Live Operating Environment (LOE), a local server that synchronizes its data with the online Mesh. The Mesh CTP adds the ability to deploy applications within the Mesh and to access both the online and local Mesh programmatically.

When you install a MEWA, it automatically creates shortcuts on both the Live Desktop and on your local Mesh-joined PCs. Running the MEWA from the desktop opens the application in its own window, with no surrounding chrome, and it runs offline as well as online. The runtime includes an embedded web browser, which means you can run both Silverlight and HTML applications; in principle you could even use it for a Flash application though I have not tried this.

The runtime is tightly sandboxed, and has hardly any access to local resources other than to objects also in the user's Mesh, such as synchronized folders, and even these require specific user consent. An application also has its own data feeds, of which more in a moment, and it can use local isolated storage though this is almost useless since it is not synchronized.

A MEWA can make web requests, provided these are permitted by a cross-domain policy file on the target server - this is standard for Flash and Silverlight applications. There is also provision for a special CallbackHomeLink, which is embedded in the application manifest, and specifies a URI the application is allowed to call. Finally, a MEWA has access to the user's live data, such as contacts, if consent has been given.

Developers always like something for free, and free data synchronization sounds a particularly good offer. So how does it work? The magic only applies to data in the Mesh.

Mesh data lives in feeds, typically exposed as Atom or RSS feeds, enhanced with Microsoft's FeedSync extensions. A MEWA is a Mesh object that can manage one or more data feeds. If you are using the Live Framework client library for .NET or JavaScript, this is wrapped as a DataFeeds collection which is a property of the current MeshApplicationService. You can store any kind of object in a data feed, including file attachments.

The confusing aspect is that multiple users of an application might share the same data feeds, or they might have their own isolated data feeds. As far as I can tell, this is how it works. The boundary of data feed sharing in a MEWA is an app instance. This is special Mesh jargon, not the normal meaning. In other words, if multiple users are running the same app instance, they get the same data feeds, but if they have a different instance, they get their own data feeds.

A user may also have several instances of the same application, each with its own data. The normal pattern is that each user gets a new instance; but a feature of the Live Desktop is that users can invite others to share their application. In that case, the same instance gets shared.

The use case Microsoft gave at PDC was for an online video store. The application lets users browse the available videos, with data coming from the vendor's central database. However, users can also designate favorites, which are stored in a Mesh data feed.

A user can share an instance with their friends, at which point they all see the same list of favorites. Microsoft intends a MEWA to be able to exploit the power of that trendy thing, the social graph, on the assumption that your connections are stored in Windows Live. Nice try, needs work.

A MEWA is a great idea, but as it stands there are a number of problems. Yes, it is a CTP, it is desperately slow, the documentation is half-baked, the support forum is poor, and few understand it. But all these should improve as the product evolves. More seriously, the product is deeply tied to Windows Live, which will make it a hard sell for many.

Silverlight Desktop

A Mesh-enabled Web Application runs on or offline, with automatic data synchronization

A MEWA will not run unless you are signed in with a Live ID, whether online or offline. The automatic synchronization is all very well, but getting fine control over how it works appears to be difficult in the current CTP. There are also privacy issues: who would want to give an online retailer permission to read all their contacts, for example? Further, few trust Microsoft to do cross-platform properly.

I should mention that there are other kinds of Mesh applications, such as pure web applications that access a user's Mesh, or conventional desktop applications that code against the local or online Mesh environment. These approaches offer greater control, but lack the easy deployment and automatic online and offline features of a MEWA.

Adobe has a huge head start with AIR, and it looks as if Microsoft has a lot to do before this Mesh stuff will be release-ready. Ultimately, though, I suspect Microsoft is being too ambitious, trying to wrap offline Silverlight, data synchronization, authentication and social programming into one single piece, as well as promoting its Live brand.®