Multicore Programming Possibilities with Windows Azure SDK 1.3
You can use your parallelized algorithms that exploit modern multicore microprocessors in Windows Azure. Since the release of Microsoft Azure SDK v1.2, you can use .NET Framework 4 as the target framework for any of your cloud-targeted projects. The newest Windows Azure SDK version is 1.3 and you can take advantage of Parallel Extensions with this SDK.When Microsoft launched Windows Azure, almost a year ago, you had to use .NET Framework 3.5 or earlier versions as the target framework for any of your cloud-targeted projects. Remember that Microsoft launched Windows Azure before Visual Studio 2010 RTM. Thus, you will find many Windows Azure sample applications that use .NET Framework 3.5 as the target framework. You can change the target framework for an existing cloud-targeted project from previous .NET Framework versions to .NET Framework 4, and you will have access to Parallel Extensions.
If you right-click on an existing cloud-targeted project in the Solution Explorer, in Visual Studio 2010, and then you go to the Application page, you will see .NET Framework 4 as one of the available options in the Target framework dropdown list.
The entry point for a Windows Azure Worker Role is the Run() method and it's already famous infinite loop that processes messages in the queue and calls the Thread.Sleep method. You can reduce the time required to process compute-bound messages by using Parallel Extensions to take advantage of the available cores. Then, you can select the target VM (short for Virtual Machine) size according to the desired response time for each request and your budget. Windows Azure allows you to scale from 1 to 8 cores. You can use your Parallel Extensions knowledge to design and code a Worker Role that scales as the VM size increases. Each worker can run code optimized to take advantage of multicore. However, one of the problems with the Windows Azure Platform is that the ExtraLarge VM size is twice the price of the Large VM size. The former provides 8 cores and the latter 4 cores. You shouldn't expect your algorithm to achieve linear speedup when you change the VM size from Large to ExtraLarge. You can check the different VM sizes in the "How to Configure Virtual Machine Sizes" MSDN documentation article. The lowest price ExtraSmall VM size shares the CPU cores with others and it is still in Beta version.
I received dozens of e-mails with similar questions about the relationship between Windows Azure and Parallel Extensions. Developers and architects have many doubts about the usage of Parallel Extension with Azure projects. You can use Parallel Extensions to create efficient algorithms that scale as the number of cores available in the target VM increase. If you need a better response time in a compute-intensive algorithm prepared to take advantage of multicore, you just need to select a target VM with more cores. Of course, you also have to pay more money for the new VM size. Your code should be as efficient as possible because you want to take full advantage of the cores that you're paying for. If you create an efficient service or building block component that scales with the VM size, you can submit it to the new Windows Azure Marketplace.
The Windows Azure VM Role is still in Beta version. However, this new role provides an excellent opportunity to move a server image to the cloud. Applications that already take advantage of multicore running on Windows Server 2008 R2 can run in the VM Role with the desired number of cores. If you don't have an octo-core CPU and you want to test scalability for an existing algorithm on Windows Server 2008 R2, you can create and deploy a VM Role. Then, you can select the desired VM size and you will be able to test the scalability from 1 to 8 cores. The VM Role is very helpful for developers that want to test scalability for parallelized algorithms and to make it simpler to move existing Windows applications to the cloud.
I do believe multicore programming is very important for Windows Azure and for any cloud-targeted project. Each VM size provides different number of cores and you pay for those cores. Many services will require multicore optimization and there is a great opportunity for Parallel Extensions to be extremely popular in Windows Azure projects.
Dennis Gannon and Dan Reed provide an excellent overview of the relationship between parallelism and the cloud in "Parallelism and the Cloud."
Amit Chatterjee wrote a very interesting article "Parallelism: In the Cloud, Cluster and Client." The article promotes Microsoft tools and languages. However, Amit's post provides an interesting explanation of the challenges in parallel computing and the complexity of modern IT solutions.