Microsoft regearing .Net for easy concurrency

Two new features being developed for the .Net framework will make greater use of multicore processors

Microsoft is building two new additions to its .Net framework that should make it much easier for programmers to utilize all the cores of a multicore processor.

The additions should not only ease the complexities of writing a program to run across multiple cores, but also address how the requirements for programs have changed over the past few years, said Danny Shih, the Microsoft program manager for .Net concurrency development.

"Applications are becoming more and more connected," Shih said, speaking at the Microsoft TechEd conference in Atlanta. "It's more common for applications to use Web services, to store data in the cloud, or offload general computation into the cloud."

This waiting for the data can be the source of latency, and badly written applications may just hang in a state of suspension until the data is delivered. Shih described a new approach to tackle this problem, called asynchronous programming.

The way data is handled is another area of change in the requirements of programs. Traditional programming assumes that a predefined data set already exists and the amount of the data is fairly well-known. Newer programs, however, may have to process a wildly varying amount of data.

The two new libraries, Asynch and The Task Parallel Library Dataflow (TPL Dataflow), both available in preview form for .Net and the Visual Studio IDE (integrated developer environment), address these problems.

Parallel programming is not new to .Net. Version 4 of .Net already includes some tools to help create a program that runs on multiple processors, most notably APM (Asynchronous Programming Model) and the Event-based Asynchronous Pattern (EAP).

"These patterns were pretty good when they came out, but as asynchronous programming became more prevalent, we're finding more and more flaws with these patterns," Shih said. One is complexity: Shih showed an example of how four lines of code can balloon to more than 40 by using APM.

In a program with a standard "synchronous" approach, as Shih called it, the program halts executing until the data it requested is delivered. The Async library offers a set of keywords that developers can use to signify a block of code can be executed in parallel with the rest of the program. The "await" keyword, for instance, when placed in front of a block of code such as a method, tells the rest of the program not to wait for the results of that operation.

Shih said that the company is developing Async for inclusion in a future version of .Net. It will first be implemented in Microsoft's own C# and Visual Basic languages, with the hope it will be adopted by other languages as well.

Async is now available in a CTP (Community Technology Preview) that can run on the newest edition of Visual Studio. The download replaces the standard compiler with one that supports the new keywords.

The TPL Dataflow .Net library allows developers to break blocks of codes into what Shih called dataflow blocks. Dataflow blocks can act like agents, an instrumental concept in programming for parallel computing.

Blocks can send messages to one another in predetermined patterns. The input for one block can be the output for another. Unlike traditional programs, they do not execute synchronously. Multiple agents can run at once as long as each agent has its required input.

"This model of doing things is often referred to as data flow parallelism. In essence you are creating a computational network through which data will eventually flow," Shih said.

TPL Dataflow has a number of predefined blocks, or primitives, for handling tasks such as buffering data, broadcasting data, filtering data, joining two different flows of data, or transforming data in some way. Developers can also build their own blocks.

One session attendee, who wished to remain anonymous, noted that the concepts being previewed were "dead-on" in their attack of how to fully harness multicore processors. But he also worried that the presentation glossed over too many implementation details, which may have given attendees a false impression that running these technologies on their own systems may be easier than it actually turns out to be.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the PC World newsletter!

Error: Please check your email address.

Tags Development toolsapplication developmentWeb services developmentLanguages and standardsTECH EDMicrosoftsoftware

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Essentials

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?