Getting up and going with Windows Azure
If you have been thinking about looking at Windows Azure, but not really been sure where to start, perhaps this posting will help. If you have a few hours to spare, you could a lot worse than follow through some of the sample and links below . . .
For those already have some familiarity with Microsoft .NET and ASP.NET, and this is an assumption being made for this post, Azure is actually not that new – it’s very much an evolution of the platform, building on the skill sets and tools that developers and designers are already familiar with.
Whilst you don’t strictly speaking need the SDK and development environment to look at the source code and understand the samples and underlying technology, getting hold of them and installing them really makes it easier to view the code, and test out the samples for yourself. One of my colleagues, Mike Ormond, list all the links you need to get your development environment up and going, so head off there now, and get yourself prepared for the rest of this tutorial . . .
One additional resource that is incredibly useful, and which will be referenced here, is the “Windows Azure Training Kit” so get it now, as it has a whole host of labs, step by step demos, presentations, etc, that are well worth looking over.
If you don’t want to download everything now, or have any problems at any stage, we have the ideal solution – we have prepared a number of videos that take you through Azure, you can kick back, grab your latte and watch some videos at http://www.microsoft.com/azure/videos.mspx. The "How Do I?" videos are a great selection of “bite sized” videos, each focusing on a specific aspect of either the platform or development cycle. Why not start with “How Do I: Get Started Developing with Windows Azure?” just to get a feel for what’s coming up.
Finally, to get a good overview of the whole platform, before we dive into its depths, please read David Chappell’s excellent white paper “INTRODUCING WINDOWS AZURE”.
There is a “Hello World” sample which is part of the SDK samples which is a easy starting point to get an understanding of Azure, how it works and how you program for it. So, to start this tour of Azure, load the Hello World project into Visual Studio and have a little look around it. ASP.NET programmers should find it very familiar.
One of the great benefits of the Azure platform from a development cycle is the availability of a local development environment that duplicates many elements of the full cloud based platform, but can be run locally, prior to deployment, to test applications and step through code – you can’t attach a debugger to the cloud.
Check that you can run the application locally – by default the Azure “Development Fabric” will start automatically and you can see the deployment of your application taking place to the desktop, rather than the cloud.
The final step in mastering the Azure development environment is to make a change to the Hello World sample, such as changing the message text on screen, and deploying the new version up to Azure, and running it in the cloud.
The first time you deploy an application up to Azure, it can feel a little confusing as there are a number of steps to go through, and in its current pre-release form, the process is not as seamless and automatic as it will be by launch.
The interaction for deploying an Azure application is through the Azure portal:
Once familiar with the process, it is straight forward.
Check out http://blogs.msdn.com/mikeormond/archive/2009/08/11/deploying-your-first-windows-azure-app.aspx for a step by step guide, or this Channel 9 video https://channel9.msdn.com/posts/dunnry/Deploying-Applications-on-Windows-Azure/
You should be able to deploy the Hello World application up to Azure. One aspect of the Azure portal that makes it easy to manage the lifecycle of an application is the ability to, at the click of a button, swap the Staging and Production environments:
New Features in Azure
So what is new and different about Windows Azure as a development platform?
As you will have seen from the deployment process up to the Windows Azure portal, the way applications are packaged and deployed is slightly different, and reflects the ways in which the applications are managed by the Azure “fabric” once they are deployed.
In Windows Azure, instead of the more traditional “main()” entry points, code can run in either a web facing role or back end worker process role. Exploiting this new patter is key to creating scalable Azure applications:
Windows Azure also introduces some new storage options over and above the usual file system which developers are familiar from Windows client and server:
Windows Azure Tables provide scalable, available, and durable structured storage in the form of tables. The tables contain entities, and the entities contain properties. The tables are scalable to billions of entities and terabytes of data, and may be partitioned across thousands of servers. Windows Azure Blobs provide a simple interface for storing named files along with metadata for a file. Windows Azure Queues provide reliable storage and delivery of messages for an application and are the most common basis for Web and Worker role communication.
Understanding these new computational and storage models is key to migrating existing applications to Azure or building brand new Azure applications. One of the best ways to get to grips with them is through the sample programs. Check out the SDK and the Windows Azure Platform Training Kit “Hands On Labs” and “Demos” sections for sample applications that target these features. To understand Azure storage in more depth, its worth reading the Table, Blob and Queue white papers at http://www.microsoft.com/azure/whitepaper.mspx
– The previously discussed SDK HelloWorld application uses the simplest web role model, and is thus more like a traditional ASP.NET application
– The SDK DistributedSort Sample is a more typical Azure application, in that it has a web role that accepts the input data and adds it to a queue as a work item, and has a worker role that handles the actual more processor intensive sorting operation
At end of this process, you should be able to think about different applications architectures and how to design them to scale well and use the appropriate storage options. One of the subtleties in Azure is the potential ability to build solutions using a mixture of on-premise (including desktop, server and mobile) and Azure cloud elements together, tied together by web services:
Joshy Joseph’s MSDN article “Patterns For High Availability, Scalability, And Computing Power With Windows Azure” – is a great place to start exploring patterns for designing highly scalable Windows Azure applications.
Now is the time to start experimenting with Windows Azure and building your own applications.
Codeplex hosts a whole host of Azure based projects, so a great way to see the code for sample applications and join their community – http://www.codeplex.com/site/search?projectSearchText=Azure
Channel 9 has an ever growing array of videos and screen casts about Azure – https://channel9.msdn.com/tags/Windows+Azure/
Also, be sure to check out some of the Azure blogs