Parallel Extensions and Silverlight 2.0
From time to time, we get a question about whether we intend for Parallel Extensions to target Silverlight. The simple answer is: Not Yet.
Here’s a more complete answer: Not for Silverlight 2.0, at least. Rich Lander from the CLR team described the Silverlight compatibility story very nicely over on his blog. I will summarize it here briefly for convenience. Silverlight 2.0 is at its core a subset of the desktop .NET Framework 3.5, but with some extensions in the way of new types. These new types will eventually get added to the version of the desktop .NET Framework after 3.5, such that Silverlight continues to be a proper subset of the next revision of .NET. In this way, all Silverlight apps can be recompiled and run on the desktop .NET Framework, but not vice versa.
Our initial target for Parallel Extensions is the desktop .NET Framework. Why is that? Two primary reasons. The first is timing. With Silverlight 2.0 already well underway, we simply need more time to fully bake Parallel Extensions and get feedback from the community on it. Just to give you an idea of how far along Silverlight 2.0 is, Tim Sneath mentioned on his blog that 2.0 will even come with a go-live license in the MIX’08 timeframe! We just released our first CTP of Parallel Extensions, and certainly have a bit more work to do before we’re finished with it. The second reason is that the core value of Parallel Extensions is to provide improved performance and scalability on multi-core processors. While there are certainly rich web scenarios that would benefit from parallelism, we see the primary near-term use for parallelism to be in desktop client apps. The need for concurrency in rich web scenarios is more oriented around concurrency for asynchronous orchestration necessary to build responsive GUIs. Parallel Extensions can certainly be useful there, but this is the forte of the existing BackgroundWorker class and asynchronous APIs, like those on HttpWebRequest.
We will of course be looking for opportunities after our initial desktop .NET release to integrate with Silverlight. Remember: because Silverlight is a subset of the desktop .NET Framework, it’s possible that the Parallel Extensions APIs will carry over to a future Silverlight release in some form. If you have ideas for rich web apps that could benefit from what you see in our CTP, drop us a line. We’d be ecstatic to hear from you, and it will help us to do the right thing moving forward.