What email address or phone number would you like to use to sign in to Docs.com?
If you already have an account that you use with Office or other Microsoft services, enter it here.
Or sign in with:
Signing in allows you to download and like content, and it provides the authors analytical data about your interactions with their content.
Embed code for: Azure (1)
Select a size
Microsoft Azure Platform
November 3rd, 2010
Overview of Azure
Windows Azure Platform AppFabric
Platform-as-a-Service running custom applications on pre-configured virtual machines
Common Cloud Benefits
The “Familiarity” of the Stack and the integrated toolchain
Runs on Microsoft data centers
Wide range of app dev technology:
.NET Framework, Unmanaged code, others..
C#, VB, C++, Java, ASP.NET, WCF, PHP
Several Storage Options
BLOBs and simple data structures
RESTful approach to Windows Azure storage
Traditional Relational, SQL Azure Database
Connectivity with other distributed applications
A. Windows Azure
What is an Azure application?
A service must include at least one role of either type
Web role is frontend, Worker Role is backend
Web role is worker role with IIS installed
Hosted IIS 7
Fast CGI + PHP
Managed Code Start
Any TCP Port
Web Roles and Worker Roles
Fault Tolerance and Recovery
Under-the-cover Multiple instances
Each runs in Microsoft Virtual Machine
Handled automatically by hypervisor
Agent and Fabric
Exposes the API
Monitors the failure conditions of the application
Allocate resources according to configuration file
Detect and restart failed web roles and workers
Windows Azure Storage
Scalable storage in the cloud
100 TB per storage account
Auto-scale to meet massive volume and throughput
4 Types: Tables, Queues, BLOBs, Drives
Accessible via RESTful Web Service API
Access from Windows Azure Compute
Access from anywhere via internet
Support .NET client library
Fault-Tolerance: All data replicated 3 times
Globally Visible: Accessible by non-Azure apps
BLOBs (Basic Large OBjects)
Intended for unstructured data
Containers and BLOBs
Each Azure account has containers
Containers have one or more BLOBs.
BLOBs can be as large as terabyte
Mechanism for viewing persistent storage as if it were a local drive
BLOBs can be exposed via Xdrives
A mounted drive on a BLOB
NTFS VHD mounted into Compute instance
Cannot be remotely mapped
Structured data but not quite relational
Table has a collection of entities
Entities are similar to ‘rows’
Entity has a primary key and properties (set of name/value pairs)
E.g. an Entity of GuestBook which contains the guest user’s information
[“GuestName”] = Joe Smith
[“Address”] = 30 Rockefeller Plaza, New York, NY
In addition, Entity has PartitionKey and Timestamp
PartitionKey for load balancing
Simple message queue
E.g., Web role receives a request and adds it to the queue. Worker role can wait on the queue.
Read at least once
Delete to remove message, otherwise is returned to queue
Azure Storage – Design Issues
Transmission Problems with BLOBs?
Divided into blocks for efficient transfer and retransmissions
BLOBs can have associated metadata (e.g., photo)
Geolocation via content delivery network
Storing frequently accessed data closer to apps that use it
B. SQL Azure
SQL Azure Database
Cloud version of Microsoft SQL Server
Indexes, views, stored procedures, triggers, etc..
SQL Server Reporting Services can hook into it
Similar in usage to SQL Server
SQL semantics (CREATE, SELECT, UPDATE, etc)
Difference in administration
Cannot control physical resources allocation
Automatic fail-over, replication
Automatic fail-over from hardware failures
Simply increase data storage in config
Familiar and Standard Data Model
Not to be confused with Window Azure’s Fabric Controller
Connecting distributed applications
Service Bus – What it does
Connect Cloud app and Non-Cloud (on-premise) app
NAT, firewall challenges
Service Bus – How it works
Support Several Patterns:
Asynchronous / Buffered
Try to predict and probe NAT
E.g., file transfer in IM
Service Registry allows endpoints to be discoverable
Control on who can access these Service Bus endpoints
Claim-based security model
Claim-based Security Model
Client must present token for action
Security token for “listen” claim
Security token for “send” claim
Clients and Services supply credentials to Access Control to acquire security tokens
Access Control has GUI for managing rules for issuing claims
Getting ready for Developing Azure applications
Install the following:
IIS 7.0 (Internet Information Services)
Microsoft Visual Studio 2008 or 2010
.NET Framework 4.0
Download the Azure Platform SDK
Sign-up for an Account (Optional)
Needed if you want to deploy your app to the cloud
Unfortunately their free trial ended on Oct 30
DEMO 1: Hello Cloud
What we are going to do…
Create Visual Studio Project for Cloud
Create WebRole to implement “Hello Cloud”
Deploy – say hello to the cloud!
Visual Studio 2010
Visual C# -> Cloud
ASP.NET of our Cloud App
Write our web page..
Local Simulator Started
Hello Cloud on localhost
Let’s Deploy it!
Create Service Package
Package for Deployment
Azure Developer Portal
New “Hosted Services” Service
Create a Service
Instantiate our application
Deploy and Run
Live on the cloud…
DEMO2: Guestbook I. Storage Service II. App Design with Worker Role & Storage
I. Create a Storage Service on Cloud
Portal – Create “Storage Account”
“Secrets” you need to connect…
From now on, access using…
You will need this info
Primary Key: Yn0OzqXmlCxiHcXBY2SB71qroiWVqbarXWZS3rNCz2Po23Od+4LDYm6czQqxCVYdz1rWyCca5CtTD1mhjaPWQg==
II. Guestbook Application
‘guestbook’ signing you see on web pages
Key components of this app
WebRole: display the guest book
WorkerRole: update the image so it’s a thumbnail
Windows Azure Storage: store guestbook entry
Application & Service Configuration
Deploy to Staging Data Center
Modify Service Configuration
GuestBook running on staging
Waits for message on queue
On which image it should shrink
Stores new thumbnail image in BLOB
Creating Storage Components
Initializing Storage Components
Processing Queue Message
Connecting to Storage Service
Azure Table Storage
Entry indexes by <PARTITION KEY, ROW KEY>
 “Introducing the Windows Azure Platform” David Chappell
 “An Introduction to Windows Azure AppFabric for Developers” Keith Brown
- Today, I will talk about Microsoft’s Cloud Computing Platform, called Azure. The word “Azure” means a bluish color, reminding you of the sky and the clouds.
- Prior to joining IBM Research, I was a software engineer at Microsoft working on one of their components called Windows Azure.
This is the outline of the talk. I will first give an overview of Azure.
Azure has three main components:
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.
Windows Azure platform AppFabric: Provides cloud services for connecting applications running in the cloud or off the cloud.
Then, I’ll try to do a live demo of writing and deploying a HelloWorld application onto Azure.
And then we can go into a larger example, showing how a GuestBook application might be designed with Azure.
Azure is a Platform-as-a-Service. What this means is that the developer doesn’t have to worry about setting up the server image and configuring the virtual machines. The platform comes with pre-configured virtual machines and developers focus on how they build custom applications on top of it.
Azure has some of the common cloud benefits such as
Virtualization: it abstracts the physical details of the machine and operating system running these applications
Scalability: if as a developer, your web application starts getting more hits, you can easily scale up or scale down
Pricing model is charge based on usage.. So some function of how long your application was running and how much you store
One of the key differentiating factor of Azure is the familiarity of the stack argument, especially for .NET web developers. In my opinion, it provides an almost seamless environment between traditional .NET web apps versus cloud versions.
Windows Azure is designed to run on cheap commodity hardware running in Microsoft-managed data centers.
There is a growing list of application development technology that it supports.
- From Microsoft centric technologies like .NET and C# to Java and other scripting languages.
It also has several storage options so you can choose what’s most appropriate for your application
- For example, for large images and videos, there’s support for storing BLOBs on the cloud
- If you need more traditional database functionality, there’s SQL Azure Database
- The Azure Platform also provides mechanisms for connecting distributed applications on and off the cloud.
So I mentioned that there are three main components in the Azure Platform. Windows Azure is one of them and this is the cloud operating system or runtime where you run your cloud applications.
An Azure application or service is made up of instances of two types of roles: web roles and worker roles.
You can think of a web role as the frontend of your web application and the worker role as the logic that handles all the backend tasks.
The main difference between the two is that web role includes IIS (Windows Web Server) capabilities which fits well if your web application is already written using ASP.NET.
Worker role is an executable with a well-defined code entry point. It is intended for running background type tasks but one can also use it to run Apache web server.
One of the goals of Azure is scalability. To support applications that can have a very large number of simultaneous users. So in order for an application to scale up as demand increase, the web roles and worker roles are designed to be stateless. Any state they have must be put into persistent storage on the cloud. This way, if the application’s load increase, the developer can just configure more instances of their web or worker roles to run.
Not having any state also helps with recovering crashed applications.
A developer doesn’t have to explicitly create VMs to run these roles and doesn’t have to supply a VM image for Windows Azure to run or worry about maintaining a copy of the Windows operating system. Instead, Windows Azure silently creates a VM for each instance, then runs the role in those VMs.
For each role, Windows Azure has an agent that monitors the failure conditions of the role and exposes the API.
These agent communicate with the “Fabric Controller” in Windows Azure. The Fabric Controller is responsible for allocating resources according to how the application was configured and detect and restart failed web roles and workers.
Provides scalable storage on the cloud
With up to 100 TB per storage for an account
Auto-scale is related to pricing?
Strong Consistency, an application is ensure to read what it has just written
So now that we can build standalone cloud applications that has some code in it along with some storage for its data. How do we allow them to communicate with each other and provide some restrictions on who can access them?
The AppFabric is the part of Azure that secures application connectivity and provides federated access control.
There are two main components to the AppFabric: Service Bus and Access Control
Service bus is an Internet-scale network infrastructure for connecting cloud apps with cloud apps as well as cloud apps with on-premise applications that might be sitting behind NAT and firewalls
It provides bidirectional communication between these applications
The Service Bus has a Relay Service.
Service behind a firewall can register a rendezvous address with the relay service and bind it to an outbound port
Clients (on the cloud) can register to listen on these Service Bus Rendezvous addresses
The reply services allows clients and services to communicate using a number of common messaging patterns
- The client can send one-way messages to the service
- It can be a request-response type
- There’s also multicast support, where a number of clients can subscribe to a service and the service can publish and multicast messages to its subscribers
- Also, the relay service can buffer some messages and so can support asynchronous messaging
- Communication protocol is either TCP or HTTP
Clients and Services can also try to communicate directly with each other, but this is a bit tricky and doesn’t always work
It has a port prediction and probing algorithm. If it succeeds, it will establish a direct connection between the client and the service.
This is similar to instant messaging service, when you send a file through IM, sometimes you notice the significant speedup in throughput, because it is able to establish such a direct connection
The Service Bus has a Service Registry when services can post their endpoints making them discoverable.
Who can access which service bus endpoints is handled by Access Control
It does this using a claim-based security model.
What do you need to do to get an application on the cloud?
Assuming we are developing an application with .NET. You will first need to install the following..
And Download the Azure Platform SDK from their website.
The SDK and visual studio provide a simulator for you to debug your application as though they are running on the cloud. However, if you want to deploy your application, you will need to sign up for an account. And unless it has changed, the free trial ended on Oct 30.
I’m using Visual Studio 2010 but some of these you can also do with Visual Studio 2008 once you download the Azure SDK.
- Here.. You can choose from several categories of application, from traditional windows applications, ASP.NET web applications, to Azure Cloud applications.. As well as office and sharepoint extensions.
We are going to look at the Cloud tab and Create Cloud Applications
Before we do that, in the learning and community resources, you can find sample code (one of the best way to learn)
[CAVEAT: you may have to run Visual Studio 2010 as administrator to get some of the debugging and deployment to work]
So let’s create a new project now.
More specifically, let’s create a C# Windows Azure Cloud Service
As mentioned, there are web roles which is the cloud application’s front facing part and worker roles which are more like background processes.
You can use different technology such as ASP.NET, WCF and CGI for web role.
You can also create worker role here.
For this example, we want to deploy a front-facing web site that says hello world, so we choose ASP.NET web role
Might want to add a slide to show what was generated.
Note: The generated solution contains two separate projects. The first project, named GuestBook, holds the configuration for the web and worker roles that compose the cloud application. It includes the service definition file, ServiceDefinition.csdef, which contains metadata needed by the Windows Azure fabric to understand the requirements of your application, such as which roles are used, their trust level, the endpoints exposed by each role, the local storage requirements and the certificates used by the roles. The service definition also establishes configuration settings specific to the application. The service configuration file, ServiceConfiguration.cscfg, specifies the number of instances to run for each role and sets the value of configuration settings defined in the service definition file. This separation between service definition and configuration allows you to update the settings of a running application by uploading a new service configuration file.
The Roles node in the cloud service project enables you to configure what roles the service includes (Web, worker or both) as well as which projects to associate with these roles. Adding and configuring roles through the Roles node will update the ServiceDefinition.csdef and ServiceConfiguration.cscfg files.
The second project, named GuestBook_WebRole, is a standard ASP.NET Web Application project template modified for the Windows Azure environment. It contains an additional class that provides the entry point for the web role and contains methods to manage the initialization, starting, and stopping of the role.
GuestBook: configuration info for the entire cloud application
GuestBook_Data: project exposes storage-related services
GuestBook_WebRole: implementation of the web role (web page functionalities and code behind ASP.NET page)
GuestBook_WorkerRole: implementation of the worker role that updates the image with thumbnail
This time, I’m going to work backwards and we will first see how this application runs.
So this is a similar screen as before when we were deploying the HelloCloud application.
Before, we deployed the application to the Production data center which takes a long time. For testing, we can actually deploy it to staging data centers. By deploying to the staging data center, we are given a temporary URL rather than the one we signed up for, there’s less setup and rollout compared to Production, and so can be faster.
Similar to last time, you click on “Deploy” and specify your application service package and the service description. Then once those are uploaded, you get a screen like this one where you can “Run” the application.
The Guestbook application has two roles and you can see the Worker Role and the Web Role instance here.
This the temporary web site URL.
There’s a typo in the configuration
sign up for an account. And unless it has changed, the free trial ended on Oct 30.
Note: The generated solution contains two separate projects. The first project, named GuestBook, holds the configuration for the web and worker roles that compose the cloud application. It includes the service definition file, ServiceDefinition.csdef, which contains metadata needed by the Windows Azure fabric to understand the requirements of your application, such as which roles are used, their trust level, the endpoints exposed by each role, the local storage req