Microsoft first announced Windows Azure to the developer audience at the Professional Developer’s Conference in Los Angeles in November, 2008. Windows Azure is a set of services that is available for users, IT administrators, and developers. What’s interesting about Azure is that it is cloud based. But, unlike competing solutions from other vendors, Microsoft has taken care to design Azure to be more than just a hosted application platform “somewhere out there.”
But, if you are happy developing applications for the Windows platform today, why should you spend your time learning about a high-flying technique such as cloud computing? And, what does all this have to do with clouds in the sky?
As you will learn later on, cloud computing can have many benefits. However, it should be mentioned right away that cloud computing or Windows Azure won’t be replacing traditional Windows development anytime soon. That is, cloud computing should be thought of as a complementary technology for developing and running your applications.
One of the biggest benefits of cloud-based computing is that the end user doesn’t necessarily need to maintain a server farm to run their applications. It is relatively easy to build a small application and serve it to five or ten users, but things get considerably more difficult if you multiply the number of users by one hundred or one thousand. In a cloud, you have more or less endless computing power (at least while your wallet is thick enough). In Azure, supporting more users merely requires changing a configuration setting.
Other obvious benefits of cloud-based computing is the possibility to access a common storage from everywhere. For instance, setting up a local SQL Server installation is relatively straightforward, but if you want to access this database from outside the firewall, security and access control quickly are big issues. Cloud computing can ease this pain.
Windows Azure: The Big Picture
If the previously mentioned benefits seem interesting to you, why not learn a bit about Windows Azure? When studying this new Microsoft offering, you should understand the big picture first. Firstly, Windows Azure is not ready yet, and is not technically complete. Furthermore, although current preview usage is free, there will be costs involved in using the computing resources provided by Azure. How much these costs are, you can’t get the answer from Microsoft just yet. It will take some time for the pricing to finalize.
Technically speaking, Azure’s architecture can be thought of as consisting currently of four different services. These are:
- Windows Azure itself, the “operating system” services
- .NET Services
- SQL Data Services (SDS)
- Live Services
Each of these services has a different purpose, and must be used and programmed in different ways (see Figure 1). The first service, Windows Azure, can be thought of as the base platform for other services. Azure differs from other hosted services in that you cannot upload your ready-made executable and run it on Microsoft’s datacenter. Neither can you directly access the (virtual) machine hosting your application.
Figure 1: Windows Azure’s architecture.
Instead, you have to follow development rules to make sure your applications are Azure compatible. Configurations are done by using a web-based portal where you can change settings for your applications. Presently, this portal is somewhat limited, but more functionality will surely appear on the site later.
Currently, you can develop two kinds of applications that run on the Windows Azure platform. Both these applications can in turn use the other remaining services: data, .NET, and Live services. The two types that you can develop are ASP.NET web applications and so-called background applications (Microsoft calls these roles). ASP.NET web applications are equal to the traditional ASP.NET web applications, whereas background applications perform tasks on the Azure platform on their own. For instance, they could read records from a database on the Azure datacenters, perform processing on them, and then store the results back to the database.
In this article, you are going to learn how to write a simple ASP.NET web application (a web role) that is hosted on the Azure platform. If you are already familiar with ASP.NET development, you can use your existing skills to get up to speed in no time. If, instead, you are not yet familiar with ASP.NET, you should spend some time in familiarizing yourself with this technology. After that, you are able to better benefit from Windows Azure.
A Quick Example: Your First Azure Web Application
As with many complex technologies, it is possible to write about them at length. But more often than not, a simple example will better summarize the workings of the system. Thus, you next will learn how to build a simple Windows Azure web application using Visual Studio 2008. But before firing up Visual Studio, you need to make sure you have the prerequisites installed.
To develop Azure applications in Visual Studio, you need both the Windows Azure SDK and the Azure tools for Visual Studio installed. This SDK and the tools are free downloads from Microsoft (see the end of the article for download links). The SDK works on machines that have Windows Vista SP1 of Windows Server 2008 installed; unfortunately, Windows XP will not do. You also will need to have IIS web server installed on your development machine. Finally, to test and debug your solutions locally, a local installation of SQL Server Express is required.