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 PDF redaction problem: TSA may have been using old software

Betanews tests and research reveals that if the Transportation Security Administration was using modern software, it might not have a security issue now.

Google Maps doesn't prevent car accidents, only search accidents

This week, Google updated Maps for Android 3.3.1, adding topography, nearby points of interest, and error reporting.

The $1 DVD rental debate: LA group says Redbox will lose movie makers $1B

A report from the Los Angeles Economic Development Corporation says cheap Redbox DVD rentals could seriously damage the movie business.

After telling US to mind its own business, Kroes slaps caps on Rambus royalties

The holder of many patents worldwide pertaining to DDR memory offered to reduce its royalty stake in that technology, and today the EU said yes.

Third-party mobile browsers Skyfire and Bolt give Opera a run for its money

Opera may be the biggest name in third party mobile browsers, but Skyfire and Bolt are charging forth with compelling updates.

In a peace offering to newspapers, Google offers a new news format

It's probably not a solution to the woes of major news publishers, but Living Stories may gather a few of those publishers together in search of one.

DOJ: Microsoft interop docs are now 'substantially complete'

A major milestone in the US Government's oversight of Microsoft is passed, as the Justice Dept. is now saying the company's protocol documents make sense.

First impressions of Droid: Easy, breezy, friendly, if a little fat

Though it's not quite as well-polished as Apple's iPhone OS, the version of Android that Motorola's Droid phone sports is still a breeze to use.

EC's Kroes to US senators: Mind your own business on Oracle + Sun

UPDATED The EU's antitrust chief told the United States Senate Tuesday that any merger that takes place in the world is more her affair than theirs.

Betanews Podcast: Rupert Murdoch and the buying stuff online problem

We'll have a more difficult time paying for online news if the underlying protocol for online payment has a big gaping hole in it.

Windows fix for TLS security bug still forthcoming, won't be Tuesday

Anyone looking for a fix for last month's discovery of a potentially serious security hole in TLS and SSL may have to wait until everyone is ready to act together.