X

Photos: Microsoft's new parallel programming toolkit

Microsoft Concurrency and Coordination Runtime and Decentralized Software Services Toolkit 2008 is a spin-off from its work on robotics. We got a first look at PDC 2008.
By Peter Ibbotson, Contributor
robots1.jpg
1 of 7 Peter Ibbotson/ZDNET

At PDC 2008 Microsoft launched its Concurrency and Coordination Runtime and Decentralized Software Services Toolkit 2008(CCR & DSS 2008), which is in part a by-product of work for the Microsoft Robotics Developer Studio 2008.

This could be one of the most important announcements Microsoft has made in the parallel programming area. Like the other great hope of parallel programming enthusiasts, Erlang, Microsoft has created a toolkit that uses lightweight threading and message passing to create a new programming model for today's multi-core processors.

The CCR looks straightforward to use and provides a great programming model for concurrency, using the C# yield keyword to great effect to create a continuations-based programming model. Locks are not used: instead, the model is that code doesn't run until all its data dependencies are fulfilled. There is a visual designer (VPL) where the dataflow between services can be modelled; this then generates C# code, which it's claimed is human-readable rather the usual machine-generated spaghetti. The VPL diagram above shows a simple counting service that counts to ten, putting text into an output queue.

 

robots2.jpg
2 of 7 Peter Ibbotson/ZDNET

The C# message handler code that the VPL generates isn't too bad to deal with, although it's hidden within 20KB of additional code that sets up the service and tears it down. The VPL is fairly powerful and hides of a lot synchronisation from the casual Robotics programmer, but professionals may find that they no longer use it after a few initial projects.

 

robots3.jpg
3 of 7 Peter Ibbotson/ZDNET

Backing up the CCR is the DSS, which provides distributed networking services that give the whole system robustness and allow the loosely coupled components to be composed. The system provides observability by running as services attached over http, so the state can easily be viewed. Again this ties in with the VPL and allows services to be spread across a network. Services can be auto-started and discovered across the network. The DSS is document-orientated and uses REST for its communications (with both binary and human readable forms).

Although the CCR & DSS have been around and talked about by Microsoft for a couple of years, the original inspiration started around six years ago when Craig Mundie put together a team to work on parallel programming. When the robotics team was set up, they realised that lots of robotics projects had multiple processes and the work performed by the parallel team would be ideal (one example given was the Princeton entry for the Darpa challenge which used five dual-core servers in the back of the vehicle). One problem that they kept running into was that enterprise clients such as Tyco (security networks) and Siemens (sorting the US mail) would come back and say 'we love the product but can we have it without the robotics bit'; and so the toolkit was born.

Performance is still a little unclear, as this runs on both Windows NT and CE which are both general-purpose operating systems. Latency might be an issue although Microsoft says 'in real applications we offer throughputs of several million messages per second, small jitter in the order of a 100s microseconds, and accurate timers with 1ms or below accuracy that gets better as you add core'. Scalability seems to be a much smaller issue: Microsoft has provided customers whitepapers that say that it's a pretty linear scaling with processors — myspace.com uses the system spread across 50,000 servers, so most systems shouldn't have a problem.

Finally, a word about the future: if you need this product today, beware that Microsoft's longer-term plan is to merge it into the main .NET Framework. This may mean that some features get duplicated by new C# language features and get deprecated. However, the core of this programming model hasn't really changed for a couple of years, so much change seems unlikely.

The CCR & DSS toolkit is available for download at a cost of $399 (~£254) per developer seat, which also gives redistribution rights. If you just want to have a play and see if the toolkit can help you, the toolkit without distribution rights is available as part of the Microsoft Robotics Developer Studio, which is currently available as a free CTP download.

 

robots4.jpg
4 of 7 Peter Ibbotson/ZDNET

This is a sample script for iRobot Create or Roomba.

 

robots5.jpg
5 of 7 Peter Ibbotson/ZDNET

There is a wide selection of I/O devices and robots.

 

robots6.jpg
6 of 7 Peter Ibbotson/ZDNET

A simulator showing two robots (Lego & 3DX).

 

robots7.jpg
7 of 7 Peter Ibbotson/ZDNET

This is the view from the 3DX robot looking towards the table.

 

Related Galleries

Holiday wallpaper for your phone: Christmas, Hanukkah, New Year's, and winter scenes
Holiday lights in Central Park background

Related Galleries

Holiday wallpaper for your phone: Christmas, Hanukkah, New Year's, and winter scenes

21 Photos
Winter backgrounds for your next virtual meeting
Wooden lodge in pine forest with heavy snow reflection on Lake O'hara at Yoho national park

Related Galleries

Winter backgrounds for your next virtual meeting

21 Photos
Holiday backgrounds for Zoom: Christmas cheer, New Year's Eve, Hanukkah and winter scenes
3D Rendering Christmas interior

Related Galleries

Holiday backgrounds for Zoom: Christmas cheer, New Year's Eve, Hanukkah and winter scenes

21 Photos
Hyundai Ioniq 5 and Kia EV6: Electric vehicle extravaganza
img-8825

Related Galleries

Hyundai Ioniq 5 and Kia EV6: Electric vehicle extravaganza

26 Photos
A weekend with Google's Chrome OS Flex
img-9792-2

Related Galleries

A weekend with Google's Chrome OS Flex

22 Photos
Cybersecurity flaws, customer experiences, smartphone losses, and more: ZDNet's research roundup
shutterstock-1024665187.jpg

Related Galleries

Cybersecurity flaws, customer experiences, smartphone losses, and more: ZDNet's research roundup

8 Photos
Inside a fake $20 '16TB external M.2 SSD'
Full of promises!

Related Galleries

Inside a fake $20 '16TB external M.2 SSD'

8 Photos