Microsoft previews parallel processing for .NET Framework

By Scott M. Fulton, III | Published November 30, 2007, 12:44 PM

With the multicore era already well upon us, the opportunities for multithreading are only now being recognized. Yesterday, Microsoft offered developers a taste of true parallelism with an experimental library for .NET.

Already, perhaps the most game-changing addition Microsoft has made to its .NET Framework is the addition of Language Integrated Query (LINQ), a long-sought provision that enables records or tables of data to be addressed within a single variable, all-at-once. If you're not a developer already, it's difficult to see how much of a breakthrough this really is.

For decades, database programmers had the luxury of being able to refer to massive tables as singular objects. If you give everyone a raise, you write a program to give a raise of x percent to, essentially, everyone at once. If you were to write the same program using a conventional high-level language like C++, C#, or Visual Basic, you'd have to write a kind of loop (which Microsoft calls a foreach) that steps through each employee one at a time, but only after executing a convoluted call that translates record set logic into sequential, slow, procedural logic.

That kind of translation was at one time the "hallmark" of the original ActiveX Data Objects (ADO) library, but now with LINQ, the set logic that comes from database programming is integrated into the high-level language.

This changes the meaning of doing something "all at once," because now, you don't have to break down your data into repetitive cycles or multi-iteration loops. You'd think that "all at once" would, by design, be parallel. It's not, and that's for a non-obvious reason: Maybe your program doesn't split your terms up into individual items, one-at-a-time, but under the hood, the compiler's doing that for you.

Now comes a concept that has probably been under development at Microsoft since the time LINQ was first incubated, but could only be tested in the field at the onset of Visual Studio 2008: It's called PLINQ (Parallel Language Integrated Query), and what it involves is basically a mild change to the existing LINQ syntax for C# and Visual Basic.

That change comes in the form of a method that's tacked onto the name of the variable used to address a LINQ (or PLINQ) database table: .AsParallel(). All it requires is a reference to a new assembly, System.Concurrency.dll, at compile time. And all it essentially says is this: If there are multiple threads available -- and these days, there typically are -- use them all at once.

"PLINQ allows LINQ developers to take advantage of parallel hardware -- including achieving better performance and building more intrinsically scalable software -- without needing to understand concurrency or data parallelism," write Joe Duffy and Ed Essey in a recent article for MSDN Magazine. "The programming model is simple, enabling a broader number of developers to take advantage of more parallel hardware."

Since Microsoft has never been one to carry forward a slightly decent name from the project's development period (Escher, Avalon, Viridian), the first preview of this library is now available as what it has decided to call Parallel Extensions to .NET Framework 3.5, or ParallelFX for short.

As a preview release only, Microsoft warns, the company reserves its right to choose whether or not the final edition is ever officially released. So the viability of this new library in the general market may be determined by the level and quality of feedback its developers receive.

View comments by with a score of at least

The new face of Android: No face

With Sony Ericsson's new Xperia X10, the focus is less on Android and more on a unique experience.

With beefed up 3G, more networks to get 'Droid'

Telefonica's O2 may be in fourth place in Germany, but it's ramped up its UMTS networks and is getting the Motorola Milestone, also known as Droid.

Must Microsoft Store copy Apple Store to succeed?

They say imitation is the finest form of flattery, With Apple, many competitors have done many bad imitations, including Microsoft. Is Microsoft Store yet another bad Apple knock-off? Does Microsoft even need retail stores?

Antisocial media: Lack of safeguards is killing the experience

Carmi Levy | Wide Angle Zoom: Step one was to gather the audience, and social media has done that. Step two now is to keep them safe.

Performance drain: The first public perception test of the Windows 7 era

Scott Fulton On Point: The opinion that regular users out there won't care about the changes happening in software even as we speak, is flat wrong.

On the eve of a new EU constitution, Poland suggests distance from 'open source'

A curious document purporting to be an important EU regulatory framework draft proposes that openness, including in terms of software, is relative.

For those who missed Google Voice beta, Ribbit Mobile opens in beta

British Telecom-owned company Ribbit today opened its own "single number" calling solution.

CinemaNow streaming movies coming to Best Buy

First it partnered with Netflix, now CinemaNow. Best Buy has fully embraced streaming video.

Internet Explorer slows down again: Is Microsoft messing up IE's JavaScript?

Almost the entire speed gap between IE7 and IE8 has been erased in just the last two months, most recently by a bug fix Microsoft started distributing today.

A taste of Android's freshly baked Eclair

Android version 2.0 brings a set of new features to the table, including native support for Microsoft Exchange.

Could Google be killing Google Groups over and over again?

The continued lack of tools for filtering mailing lists continues to cause groups administrators headaches...nearly a decade after Usenet "died" the first time.