On June 1st I gave a talk at the .NET BC User Group meeting.

This talk was entitled “Beyond Hello Cloud – Developing Applications for Windows Azure”.

I promised to make the code and slides for the talk available on my blog, so I think its entirely appropriate to post it here as part of my Windows Azure blog series.

Powerpoint Sildes - NET BC User Group Presentation-Azure.zip

Code Samples - Windows Azure.zip


Posted in: Azure  Tags: , , ,

In the previous article in this series I introduced the Windows Azure Platform and described the three basic components of Windows Azure, the Compute and Storage services and the Fabric Controller.

Let’s now take a look at how Windows Azure scales out.

The windows Azure Compute Service can run many kinds of applications.  The primary purpose, however, of the Windows Azure Platform is to support applications that have large numbers of simultaneous users.  After a while scaling-up, using bigger and bigger machines to support more and more users, is no longer possible.  So Windows Azure is designed to support applications that scale out, using multiple instances of the same code running on multiple machines.

To accomplish this, a Windows Azure application can have multiple instances, with each instance executing in its own virtual machine (VM). Each VM is provided by a hypervisor (based on Hyper-V) that’s been modified for use in Microsoft’s cloud, and it provides a Windows interface to the instance it contains.

Figure 1: A typical Windows Azure Application Running on Multiple Virtual Machines
Azure_Dev_11

Windows Azure currently supports two instance types – a Web Role Instance and a Worker Role instance (Figure 1).

As its name suggests a Web Role can receive incoming HTTP or HTTPS requests and a Web Role instance includes IIS7 to provide this support.  Developers can use ASP.NET in the Web Role but they are not restricted to this technology – PHP or other web technologies can also be used.

Worker roles are similar to Web Roles but they do not have IIS7 installed and so they cannot receive Web requests (HTTP or HTTPS) directly.  They are usually used to process background tasks.

A Windows Azure Application can consist of all Web Roles or all Worker Roles but typically will be a combination of the two.  If an applications load increases more instances can be launched, depending on the load this may mean more Web Role instances, more Worker Role instances or both.  If the load then decreases the extra instances can be stopped.

In a production environment this is managed through the Windows Azure Portal.  In a development environment the developer can configure the initial configuration by modifying the properties of the Cloud Service.

If we go back to the “Hello Cloud” Application we created in the first article, we can see that in the HelloCloudService project there is a Roles folder which contains a single “Role” – the Hello Cloud Web Role, that is the other project in the solution (Figure 2)

Figure 2: The Hello Cloud Solution in Solution Explorer
Azure_Dev_5

If we right-click on the HelloCloud role in the Roles folder, and select Properties, we can configure this Role.

Figure 3: Configuring the Hello Cloud Web Role
Azure_Dev_12

We can set the size of the VM and the number of instances to launch, when first deployed.  The VMs can be Small, Medium, Large or Extra Large.  Each type has a different number of CPU cores, system RAM and local Storage – see http://msdn.microsoft.com/en-us/library/ee814754.aspx for the exact configuration of the available VMs.

In a multi-Role Application, each Role can be separately configured and customized for the expected demand, and once launched the Windows Azure Portal can be used to add or delete running instances according to demand.

In the next article we will take a look at the Storage Service and how that can be used in Windows Azure applications.


In the previous article in this blog series on Windows Azure, I showed how you can download the tools that Microsoft provides to develop your own Windows Azure application and we developed our very first “Hello Cloud” application.

So far – so good.  But what is Windows Azure and why should we care?

Lets first look at what Microsoft says on its Windows Azure site.

The Windows Azure platform offers a flexible, familiar environment for developers to create cloud applications and services. With Windows Azure, you can shorten your time to market and adapt as demand for your service grows.

There are a number of key words and phrases in this marketing statement.

  • Platform – Windows Azure is a platform – as a platform it will provide a number of key services.
  • Cloud Applications and Services – Windows Azure allows developers to create cloud applications and services.  ie it is not for writing desktop applications or even simple web sites
  • Shorten … Time to Market – As Windows Azure is based on technologies that we already know it can reduce the time it takes developers to create Azure applications
  • Adapt as Demand .. Grows – Windows Azure provides easy configurable scalability which allows you to scale your application to meet demand.  This can be scaling up to meet increasing demand AND equally scaling back to meet reduced demand.

There are four major components that make up the Windows Azure Platform.

  • Windows Azure – the windows Azure Operating System
  • SQL Azure – A cloud service based on the familiar SQL Server.
  • AppFabric – Services which allow you t “connect” cloud services with “on-premise” applications
  • Codenamed “Dallas” – A standards based information marketplace

This is summarized in Figure 1 (from www.windowsAzure.com)

Figure 1: The Windows Azure Platform
 Azure_Dev_8

 

Windows Azure

Windows Azure is the backbone of the Windows Azure Platform.  windows Azure runs on machines in Microsoft Data Centres.  Rather than an Operating System that can be installed on an individual PC, Windows Azure is a service that runs in the cloud.  While ii is not strictly an Operating System (OS), users can install applications that run on Windows Azure, so in many respects it looks like an OS.

Figure 2: Windows Azure runs in Microsoft Data Centres
Azure_Dev_9

There are three main components to Windows Azure.

  • Compute – The Compute service runs Windows Azure applications
  • Storage – The Storage service stores data in Blobs, Tables and Queues
  • Fabric – The Fabric service provides a common way to manage and monitor applications
Figure 3: The three main components of Windows Azure
Azure_Dev_10

This has been a very brief overview of what Windows Azure is.  In the next, article I will look more deeply at the Compute Service and how windows Azure scales out.


Posted in: Azure  Tags: , ,

 Search Blog

 Calendar

«  February 2012  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
View posts in large calendar

 Tags

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Thoughts from the Wet Coast