Even though I sat in the audience at the Microsoft Professional Developers Conference during the November keynote session when Azure was announced with great fanfare, I did not fully comprehend why Windows Azure should matter to me. Why, as an ASP.NET developer, should I care about Windows Azure?
Windows Azure will change the way I think about building every website in the future. Windows Azure changes what it means to develop applications for the web.
What is Windows Azure?
The short, and not very informative, explanation of Windows Azure is that Windows Azure is “Windows in the cloud.” But, what exactly does that mean?
Imagine that you need to build a new web application. It doesn’t really matter what the application is. You might need to build a new internal web application used by a few dozen of the employees of your company. Or, you might be launching a new startup and you want millions of people to use your new application. It doesn’t really matter because you’ll most likely want to use Azure for any type of web application that you create.
Imagine, furthermore, that you have an unlimited amount of funds. There was a massive bank error and you end up with billions in your checking account that you can use to build your application. You decide to go on a spending spree to set up the hardware for your web application.
If money were not a consideration then you would buy multiple servers. If your startup is successful then you want your application to scale to meet the demand. In that case, you would want hundreds of machines to host your website so you could handle thousands, or even millions, of visitors to your website. You would need the ability to load balance the traffic to your website across multiple servers.
Furthermore, you would want hardware redundancy. If one server fails, you don’t want your application to fail. You want your application to fail over to a new server automatically. And, if you want to sleep very peacefully at night, then you would want the servers to be located at different geographical locations. That way, if a blackout brings down your web servers hosted in Iowa, then your website could fail over automatically to web servers in Texas.
If you had an unlimited amount of funds then you would spend the money maintaining multiple data centers located at multiple geographical locations even if your needs were modest. If you take the trouble to build a web application then you don’t want it to fail because of a hardware failure even when the application is being used by a small number of users.
In short, you want to build a web application and then you don’t want to worry about it.
Microsoft knows how to Scale
Microsoft has spent billions of dollars building data centers to host thousands of servers. We have built data centers in Iowa, Washington, Texas, and Illinois and we are planning, or in the process of building, data centers at other locations dispersed around the world.
Microsoft has developed a tremendous amount of institutional experience around creating web applications and web services that can scale to meet huge traffic demands. Microsoft is responsible for maintaining many of the highest traffic websites on the Internet including Hotmail, Microsoft.com, MSDN, and MSN. And the Microsoft Windows Update service scales to meet the demand of hundreds of millions of clients worldwide, 350 million unique scans per day, 60,000 ASP.Net requests per second, and 1.5 million concurrent connections (see http://technet.microsoft.com/en-us/mscomops/cc424867.aspx).
Microsoft had to build vast data centers to handle the traffic demands of our websites and services. By taking advantage of Windows Azure, you can host your web applications on our web servers. You can take advantage of the billions of dollars that Microsoft has spent in capital investments to build our data centers to host your web applications.
Windows Azure is Utility Computing
Windows Azure provides you with utility computing and storage (but it offers much more than that). The idea behind utility computing is that you should pay for processor time and storage in the same way as you pay for a utility such as electricity. In order to power your toaster to toast your bread in the morning, you don’t need to pay the billions of dollars needed to build the nuclear power plant or hydroelectric dam providing the electricity for your community. Instead, you pay only for the electricity that you actually use. You don’t pay billions, you pay pennies.
When you use Windows Azure, you only pay for the computer processor time and storage that you need. You can take advantage of the vast economies of scale that Microsoft derives from building its vast data centers. Because of these vast economies of scale, Microsoft can offer processer time and storage very cheaply.
Here’s how it works. You build an ASP.NET Web Forms or ASP.NET MVC application using Visual Studio by taking advantage of a new project template named the Web Cloud Service template (see Figure 1).
Figure 1 – Creating a new Cloud Services project
Building an ASP.NET application that you plan to run in the cloud has certain requirements. You must code the application in such a way that it can be scaled. For example, you cannot use in-process session state in an ASP.NET application that you plan to host within Windows Azure.
After you build your web application, you publish the application to the cloud (the Microsoft data centers) by right-clicking your project in the Solution Explorer window and selecting the Publish menu option. Selecting Publish opens the Azure Services Developer Portal in a browser window enabling you to upload your project to the cloud (see Figure 2).
After you upload your web application, the application becomes available to the world in a matter of minutes. For example, if you create a new application, and give it the name MyApp, then you can access the application by using the URL http://MyApp.CloudApp.net. Of course, you can point your own domain at your web application.
After you create a web application in the cloud, you can adjust the number of processors that the web application uses. If your web application needs to scale to handle the demands of millions of users, then you can easily modify the settings for your web application so that the application runs on hundreds or thousands of processors.
I’ve been involved in a number of successful Internet startups. One huge barrier to getting a new startup off the ground has always been the costs associated with building a website that can quickly scale to handle huge traffic demands. Azure removes all of these worries.
Windows Azure is a Services Platform
Utility computing is great and I would use Windows Azure even if the only thing that it offered was utility computing. However, Windows Azure offers much more than processor cycles and storage space. Windows Azure is a new Microsoft Windows server operating system.
An operating system provides services for running applications. Windows Azure is a services platform. You can take advantage of several types of services offered by Azure within your application.
For example, you can use Live Services within an Azure web application. The Live Services are the same services used by Microsoft web applications such as Windows Live Hotmail and Windows Live Messenger. They include services such as the identity service, communication service, presence service, search service, and geospatial service.
For example, the Identity Service is the service used by Windows Live ID. Whenever you log into a Microsoft website, such as Hotmail, you use the Identity Service behind the scenes. You can use the very same Identity Service to authenticate users for your web applications.
Windows Azure also works with another set of services called the SQL Services. The SQL Services are built on top of instances of Microsoft SQL Server running in the cloud. You can use the SQL Services to store the data for your cloud applications. SQL Services will support data synchronization and reporting.
Finally, Azure supports a set of services called the .NET Services. The .NET Services include support for services that are critical to enterprises such as workflow services.
Windows Azure enables Mesh Enabled Web Applications
Windows Azure enables you to easily build and host applications in the cloud. But Azure offers something much more than this. Azure enables you to create something called mesh enabled web applications. This final feature might end up being the most interesting aspect of Azure.
Live Mesh is part of the Live Services. You can sign up for Live Mesh by visiting Mesh.com (see Figure 3).
Live Mesh enables you to synchronize content between multiple devices. For example, I use a laptop and desktop computer at work, another laptop and desktop computer at home, a cell phone, and an Xbox. I don’t think that I am that unusual. Most people interact with the Web through multiple devices.
After you register a device with Live Mesh, you can synchronize any content that you place on one device with any other device automatically. For example, if I add a picture or Microsoft Word document to my home desktop computer, the picture or document is copied to my other computers and devices automatically. This feature of Mesh is very useful and I take advantage of it every day.
But, that feature only scratches the surface of what Live Mesh will enable you to do. Live Mesh will enable you not only to synchronize files across multiple devices; Mesh will enable you to synchronize applications across multiple devices.
You will be able to buy Mesh enabled web applications from a marketplace of applications. After you buy a Mesh enabled web application, you will be able to use the application with each and every device on your Mesh. By taking advantage of Azure and Live Mesh, you can build applications that span multiple devices.
Realize, and this is the interesting part, that you can run a Mesh enabled web application offline. Even if the application was built using a technology such as Silverlight, you can execute the application separately from a web browser. For example, you can execute a Mesh enabled web application within a Windows Mobile cell phone.
Windows Azure can be used for On Premises Applications
Finally, it is worth emphasizing that you can use Windows Azure in conjunction with on premises applications (on premises applications are contrasted with cloud applications). Your application can run on a server within your organization and interact with Azure over the Internet. You can interact with Azure through standard APIs such as REST.
For example, imagine that you have built an ASP.NET application that enables you to view customer records. You might need to store many, many gigabytes of customer records. However, you might not want to invest in the hardware to reliably store all of this data. In that case, you can use Azure as your storage service in the cloud. Your ASP.NET application can store and retrieve the customer records across the Internet.
Windows Azure will change how I create every web application in the future. I want all of my applications to easily scale and I want all of my applications to run reliably. Windows Azure will enable me to concentrate on my web application code and stop worrying about the hardware.