Search This Blog


Introducing Windows Azure

Microsoft’s Windows Azure platform (originally known as the Azure Services Platform) is a group of cloud technologies, each providing a specific set of services to application developers. As Figure 1 shows, the Windows Azure platform can be used both by applications running in the cloud and by applications running on local systems.

Lets,look at four core scenarios for using Windows Azure:
a)creating a scalable Web application:-Windows Azure provides can handle much larger loads than more conventional Web technologies.So the application with occasional spikes can be benefitted by costing.Since Windows Azure charging is usage-based, this is likely to be cheaper than maintaining lots of mostly unused machines.
b)creating a parallel processing application:-The user might determine how many Worker instances should run.
c)creating a Web application with background processing:-For background processing, it relies on Worker role instances, passing them tasks via queues.
d)using cloud storage from an on-premises or hosted application:-A non-cloud applications can access cloud storage for storing the large amount of Past data.
A primary goal of Windows Azure for ISV is to be a platform on which (independent software vendor)ISVs can create Software as a Service (SaaS) applications. Customers are increasingly interested in having a SaaS option for the software they buy. To satisfy this demand and to keep pace with the competition, many ISVs will choose to offer a SaaS version of their current or future products. Creating a SaaS application requires building a highly scalable, highly reliable cloud-based service that can be used simultaneously by many customer organizations. Building your own foundation for this makes no more sense than would writing your own operating system for an on-premises application. Just as Windows provides a foundation for traditional on-premises applications, Windows Azure can provide a foundation for SaaS applications.
A cloud platform such as Windows Azure is different from traditional hosting. From a technical perspective, Windows Azure provides simpler administration, as well as services designed to create scalable and reliable applications. The business differences include minimal up-front commitment and easier ways to increase and decrease the computing resources your application uses. These differences mean that Windows Azure can potentially provide better technology and lower costs for ISV applications.
The components of the Windows Azure platform include:
Windows Azure: Provides a Windows-based environment for running applications and storing data on servers in Microsoft data centers.
SQL Azure: Provides data services in the cloud based on SQL Server.
.NET Services: Offers distributed infrastructure services to cloud-based and local applications.

At a high level, Windows Azure is simple to understand: It’s a platform for running Windows applications and storing their data in the cloud. Figure 2 shows its main components.

As the figure suggests, Windows Azure runs on a large number of machines, all located in Microsoft data centers and accessible via the Internet.Windows Azure has three main parts:
A.a Compute service that runs applications, .
B.a Storage service that stores data, and
C.a Fabric that supports the Compute and Storage services.

To use the Compute service, a developer creates a Windows application. This application might be written using C# and the .NET Framework, using C++ and the Win32 APIs, or in some other way. However it’s built, the application must be implemented as Web roles, Worker roles, or both.

A Web role instance accepts Web requests. It can be created using ASP.NET or
another technology that works with Internet Information Services (IIS). Whatever technology is used,Windows Azure provides built-in hardware load balancing across all Web role instances in a particular application.
A Worker role instance is just a Windows application with a main(),and it can run indefinitely. Among other things, this model allows creating scalable applications where Web role instances accept requests, then pass them to Worker role instances to be processed.
Applications usually need persistent storage, and so Windows Azure provides its own cloud-based mechanisms for storing and retrieving data. The platform offers three storage options, all accessed via standard HTTP GETs, PUTs, and DELETEs.

The three kinds of Windows Azure storage are:
Blobs: allow storing large binary objects, such as videos and images.
Tables: provide highly scalable entity-based storage (not relational tables).
Queues: allow sending and receiving messages, such as between an application’s Web role instances and Worker role instances.
All Windows Azure applications and all of the data in Windows Azure Storage live in some Microsoft data center. Within that data center, the set of machines dedicated to Windows Azure is organized into a fabric.

The Windows Azure Fabric consists of a (large) group of machines, all of which are managed by software called the fabric controller. The fabric controller is replicated across a group of five to seven machines, and it owns all of the resources in the fabric: computers, switches, load balancers, and more. Because it can communicate with a fabric agent on every computer, it’s also aware of every Windows Azure application in this fabric.

SQL AZURE:SQL Azure Database (formerly known as SQL Data Services) provides a database management system (DBMS) in the cloud.While Microsoft says that SQL Azure will eventually include a range of data-oriented capabilities, including reporting, data analytics, and others.
The second SQL Azure component announced so far is “Huron” Data Sync. Built on the Microsoft Sync Framework and SQL Azure Database, this technology synchronizes relational data across various on-premises DBMSs. The owners of that data can determine what should be synchronized, how conflicts should be handled, and more.

.NET SERVICES:Originally known as BizTalk Services, the functions provided by .NET Services address common infrastructure challenges in creating distributed applications.

The components of .NET Services are:
a)Access Control:Its identify the user and decide what this user is allowed to do based on their claims.
b)Service Bus:It expose Web services endpoints that can be accessed by other applications.

Step by Step Approach:

Now let create a sample website on Windows Azure
A great thing about working with Windows Azure is that we have a simulated environment for you for development and testing. We simulate both the Windows Azure Fabric, as well as Windows Azure Storage on you local machine so you are able to build and test applications taking advantages of these services

Development Environment
All you need to do is to install the following:
A.The Windows Azure SDK
B.Visual Studio Tools

A)For the Windows Azure SDK we need the following prerequisites (here to see details about pre-requisites for the SDK )

a)Operating System
(for x86 version of SDK) – 32-bit editions of Windows Vista SP1 or Windows Server 2008.
(for x64 version of SDK) – 64-bit edition of Windows Vista® SP1 or Windows Server® 2008
b).NET Framework 3.5 sp1
c)Sql Server
Express 2005
Express 2008
Local Instance of 2005, 2008 – See here for more details
d)Internet Information Services (IIS) 7.0 must be enabled, with ASP.NET and Windows
Communication Foundation (WCF) HTTP Activation – Click here for details how to configure

B)The prerequisites for the Visual Studio tools include everything above plus:
Microsoft Visual Studio 2008 SP1 or Microsoft Visual Web Developer 2008 Express Edition with SP1
Hotfix: Native Debugging Improvements
Hotfix: Improve Visual Studio Stability
Hotfix: Support for FastCGI on the Development Fabric

Set Up Your Windows Azure Account
With your development environment set up, you have everything you need to get started developing our Azure store sample application. However, you might want to actually deploy this code to the cloud. For that you are going to need an Azure account. We are currently in CTP, so there is no charge for this account (that will chance when we go to release). You do, however, need a token.

To Request A Token:

1.Navigate to Click on Try It Now

2.Click on Try It Now to register with Connect and Request a Token

3.Log In with your Windows Live ID (you will need to create an account if you don’t already have one)

4.You will then have to complete the registration information
5.Click on the connection directory tab

6.Scroll until you see Azure Service Invitations

7.You are registered and should see a page like this:

To Setup Your Azure Services Developer Portal
1.Navigate to
2.Log In with your live id
3.Fill in your country and lanugage and press I Agree to create a new account

4.You will be re-directed to a confirmation page. Press continue

5.You will be redirected to a page where you can redeem your invitation token. This token is necessary to create a Hosted Services project, as well as a Storage project. Don’t worry about closing the page or pressing cancel. You will be re-directed here the next time you log in. As I annotated below, you may have to wait a bit to receive your token (i.e. don’t proceed directly to Outlook and continually press refresh until you receive it). We are in CTP and have a limited number of tokens to hand out at any given time.

6.Once you have your token entered appropriately, you will no longer see this page. You will instead be re-directed to a page in the portal where you can create a project. Here is what you would see if you chose ‘Cancel’ on the previous page or if you click the ‘New Project’ link under the ‘Summary Tab’.

7.Here is the view you would see if you had entered a valid token:

8.You are now ready to create your Hosted Services Project. Click on ‘Hosted Services’ to add a new Hosted Services project.
9.On the next page, enter the following information:
----Project Label – Enter a label for your Hosted Services project. This label will be exposed on the Azure Services Developer Portal
----Project Description – Enter a description of the project you will be hosting

10.On the next page, enter a service name – a unique service / domain name to create the unique DNS name. You can check on the availability of service names. After you have settled on a unique service name, press the ‘Create’ button.

11.Your project is now created and you are ready to deploy a solution.

Creating our Cloud Project in Visual Studio:
In this part, we are going to create a “Hello World” web application, test it on the local development fabric and deploy it to the cloud.

Create the Cloud Project
1.Choose File > New > Project from the Visual Studio Menu.
2.Choose Cloud Service > Web Cloud Service

3.That’s it!

The template created 2 projects. The goals of these projects are as follows:
A Cloud Service Project

Allows you to build and package your cloud application to run in the local development fabric
Allows you to debug your cloud application in the local development fabric
Allows you to build and package your cloud application to deploy to the cloud
Stores configuration settings that apply to all instances of each role
Allows you to configure the number of instances to be created for each role
A Web Role

A web role in this template is really just an ASP.NET application. We have created additional web role projects, including a Cgi Web Role which allows you to host PHP and Ruby apps. This template, however creates an ASP.NET application.

Add Some Code
1.Add a label to Default.aspx, giving it an ID and setting runat=”server”.

2.Add some code to Default.aspx.cs that executes on the server that sets the text of the label. It doesn’t matter what you put here, we just want to illustrate that the server is doing some work and this is not simply a static page.

3.Run In The Development Fabric
Press F5 or the Start Debugging button to run the application in the development fabric. Here is the result:

What Happened
The Visual Studio tool do some nice work for you. Here is what happens.
Visual studio created a Windows Azure Service Package. This is the same package that is used to deploy to the web. However, in that instance, the package is zipped and encrypted. When running in the local development fabric, the extension of the package is csx and if you are running with debug symbols, you will find this in the debug directory. (See this post by Jim Nakashima for more information on how the service package is created)

VS ensures that development storage is started
VS ensures that the development fabric is started and deploys your package to the fabric (CSRun is the exe that does this)
If you are running with debug symbols, Visual Studio will attach the debugger to a role running in the development fabric
Debug It
Set a breakpoint on our code that sets the text of the label and start with debugging. Here is what you see:

Deploy Our Application To The Cloud
1.(optional) Set the application id in the project properties from your Hosted Service Application ID
Copy the application id from the Hosted Service Project to the clipboard

---Right-Click on the cloud services project (AzureStore) > Properties > Portal
---Paste the application id

2.Right-Click on the cloud services project (AzureStore) > Publish

3.A browser will be launched and it will automatically navigate you to the appropriate project if you completed step 1. Otherwise, navigate to the Hosted Service project where you want to deploy. An explorer window also opened to the location where the cspkg (encrypted, zipped project) and the cscfg files are.
4.Click on the Deploy button under Staging

5.Click on the Browse buttons and navigate to the publish directory under your project. It is the directory the explorer opened to.

6.Click Deploy. This process may take a few minutes.
7.Press Run. This process may also take a few minutes.
8.When the WebRole reads ‘Running’, you are ready to test.
9.Click on the ‘Web Site Url’ link.

10.That is it, you are running in the cloud! You are in staging, but feel free to swap it to production.

Resource obtained from :

No comments: