94
Take Your Applications Sky High with Cloud Computing and the Windows Azure Platform Dave Bost Developer Evangelist http://davebost.com/blog

The Windows Azure Platform (MSDN Events Series)

Embed Size (px)

DESCRIPTION

This presentation was delivered as part of the MSDN Events series of technical seminars and provides a deep dive into cloud computing and the Windows Azure Platform. It starts with a developer-focused overview of the Windows Azure Platform and the cloud computing services that can be used either together or independently to build highly scalable applications. From there, the discussion explores data storage, SQL Azure, and the basics of deployment with Windows Azure.

Citation preview

Page 1: The Windows Azure Platform (MSDN Events Series)

Take Your Applications Sky High with Cloud Computing and the Windows Azure Platform

Take Your Applications Sky High with Cloud Computing and the Windows Azure Platform

Dave BostDeveloper Evangelist

http://davebost.com/blog

Page 2: The Windows Azure Platform (MSDN Events Series)

http://thirstydeveloper.com

For developers who have a thirst for

knowledge

Page 3: The Windows Azure Platform (MSDN Events Series)

Session 01:Introduction to Microsoft Windows Azure

Session 01:Introduction to Microsoft Windows Azure

Page 4: The Windows Azure Platform (MSDN Events Series)

Agenda

Windows Azure in Action Windows Azure Services Platform Core Services Getting Started Roles Developing Azure Applications

Page 5: The Windows Azure Platform (MSDN Events Series)

Objectives

How to get started with: Windows Azure Platform Windows Azure Windows Azure Data Services

Web and Worker Roles Development tools you need Ability to develop Windows Azure

applications

Page 6: The Windows Azure Platform (MSDN Events Series)

DemoLive Windows Azure Application In The Cloud

Page 7: The Windows Azure Platform (MSDN Events Series)

What is Cloud Computing?

• A New Style of Computing Consumption Based Pricing• Hosting, Storage, Database, Other

Services• Software as a Service (SaaS)• On-Demand Scale - Mammoth Capacity• High Availability and Reliable• Self-Service Management• Real and Here to Stay Additive to the Enterprise, Not Replacing

Page 8: The Windows Azure Platform (MSDN Events Series)

Scalable Web Application with

Worker Role Hosted inventory

management integrated with

retail POS terminals

What are the Windows Azure Use Cases?

Scalable WebBrand web site or

photo sharing service

On-Premise Application

and Cloud Storage Hosting output of 3D design and archiving

enterprise data Migration of Legacy Applications to Windows Azure

Move legacy applications without re-architecting

the infrastructure

Using Windows AzureComputational PowerScientific computationLarge-scale data mining

Page 9: The Windows Azure Platform (MSDN Events Series)

Why Are We Here?Because Cloud Computing is Huge

At Microsoft:

1 billion: Windows Live ID authentications each day

3 to 4 billion: the # of emails filtered daily from >6 million mail boxes by Forefront

2 billion: the # of queries each month on Bing

450 million: Hotmail users (now 15 years old)

100 million: users that get Windows Update worldwide, (now 12 years old)

20 million: Xbox Live users (now 9 years old)

+400,000: square footage of our new datacenters

For You:

A new paradigm

in computing

Page 10: The Windows Azure Platform (MSDN Events Series)

Platform Continuum

• Bring your own machines, connectivity, software, etc.

• Complete control• Complete

responsibility• Static capabilities• Upfront capital costs

for the infrastructure

• Renting machines, connectivity, software

• Less control• Fewer

responsibilities• Lower capital costs • More flexible• Pay for fixed

capacity, even if idle

• Shared, multi-tenant infrastructure

• Virtualized & dynamic

• Scalable & available• Abstracted from the

infrastructure• Higher-level services• Pay as you go

On-PremisesServers

Hosted Servers

Cloud Platform

Page 11: The Windows Azure Platform (MSDN Events Series)

Where the Cloud is Compelling

App Characteristic Example

Massive scale Outback promo on Facebook

High reliability eCommerce apps (Coke, Dominos)

Variable load Online tax preparation (CCH)

Unpredictable lifetime Hurricane relief site

Requiring parallel processing Genome sequencing

Scale fast or fail fast Web sites (Kelley Blue Book)

Not good fit for in-house data center

Frequently updated app

Needing external storage Online video archive

No desire to manage infrastructure

SaaS apps (Quark’s Promote app)

Page 13: The Windows Azure Platform (MSDN Events Series)

Windows Azure

Fabric – Service Management Infrastructure

Hosting – Applications, Web Services, Workers

Storage – Blobs, Queues, Tables, Drives Frictionless Upgrades

Compute Storage Management

Compute Storage Management

ManagementRelational data Connectivity Access control

Page 14: The Windows Azure Platform (MSDN Events Series)

SQL Azure

Core Database Functionality, Subset of SQL Server

Database available in limited sizes 1GB, 10GB

Management SQL Data Sync

ManagementRelational dataCompute Storage Management

ManagementRelational data Connectivity Access control

Page 15: The Windows Azure Platform (MSDN Events Series)

Windows Azure AppFabric

Service Bus Access Control Service Management

Compute Storage Management

ManagementRelational data Connectivity Access control

Page 16: The Windows Azure Platform (MSDN Events Series)

Windows Azure Cloud Fabric

Multiple virtual instances Easily provision of applications Detect failures Spin up new instances to replace the failed

ones How many instances and what role they

will play Load balances and DNS Elasticity of the service… scaling up/down

number of instances

Page 17: The Windows Azure Platform (MSDN Events Series)

Windows Azure

FabricController

Web Portal(API)

LB

LB

DNS

YourService

Page 18: The Windows Azure Platform (MSDN Events Series)

LB

LB

DNS

Service Deployment

YourService

FabricController

Web Portal(API)

Service ModelServiceService

DNSconfig

Page 19: The Windows Azure Platform (MSDN Events Series)

LB

LB

DNS

Service Scaling

YourService

FabricController

Web Portal(API)

Service

Service

Service

Model

Service

Service

ServiceService

Service

Page 20: The Windows Azure Platform (MSDN Events Series)

LB

LB

DNS

Service Monitoring & Recovery

YourService

FabricController

Web Portal(API)

Service

Service

Service

Model !

Service

Page 21: The Windows Azure Platform (MSDN Events Series)

Windows Azure DevFabricLocal Developer Simulation of AppFabric

Simulated “Cloud Experience” for Development Routes cloud requests to local machine Simulates data storage with local SQL server

database Azure SQL simulated with local SQL Server

database

Page 22: The Windows Azure Platform (MSDN Events Series)

Developer Experience

Leverage Existing Skills in .NET, SQL Server, WCF

Use Familiar tools – Visual Studio, SSMS RESTful HTTP cloud services, supports PHP,

Python Cloud apps can be developed locally / offline SDK Cloud Simulator – Dev Fabric, Dev

Storage

Developer ExperienceUse existing skills and tools

Page 23: The Windows Azure Platform (MSDN Events Series)

Getting Started With Windows AzureThe Windows Azure SDK

http://www.microsoft.com/windowsazure/developers/

Page 24: The Windows Azure Platform (MSDN Events Series)

Service Management

Automated Service ManagementProvisioning, Patching, UpgradesFabric

Self ManagementDeploy, Promote, Scale, UpgradeManagement

Portal

Programmatic ManagementProgrammatic deployments upgrades, etc. API for doing what the portal does

Management API

Page 25: The Windows Azure Platform (MSDN Events Series)

Getting Started with Windows AzureThe Windows Azure Platform Portal

Provision Deploy Promote Stop/Start Scale Upgrade Delete

Page 26: The Windows Azure Platform (MSDN Events Series)

Windows Azure SDK Features

C# and VB Visual Studio project templates Windows Azure Cloud Service solution with

multiple roles. Tools to manage and configure roles Local Development Fabric Local Development Storage services Local Cloud Service debugging support Cloud Service package and deployment

builder

No SDK Required for SQL Azure

Page 27: The Windows Azure Platform (MSDN Events Series)

Defining the Web and Worker Roles

WEB ROLE WORKER ROLE

Interacts with end-useror web services

Handles incomingHTTP/HTTPS requests

Develop with Microsoft andnon-Microsoft tools:

ASP.NET, WCF, other .NET toolsJava, PHP, etc.

Does not acceptincoming requests

Initiates their own requestsfor data or tasks from

the queue

Similar to a "batch job"or Windows service

Page 28: The Windows Azure Platform (MSDN Events Series)

Bid Now Service

Service Models & Roles

Web B (port 8081)

Worker X

Worker Y

Worker Z

Web A(port 80)

Main Web100 instances

Admin2 instances

Image Resize2 instances

Auction Processing25 instances

Notifications10 instances

Page 29: The Windows Azure Platform (MSDN Events Series)

Windows Azure Roles in Visual Studio

Page 30: The Windows Azure Platform (MSDN Events Series)

DemoBuilding Our First Cloud ApplicationWith Microsoft Windows Azure

Page 31: The Windows Azure Platform (MSDN Events Series)

Application Concerns—Hardware

Server Instances Plan for peak usage scenarios Plan for redundancy to reduce down time Make up-front capital expenditures

Servers Networking / Load Balancers Software Licensing

Hardware Diagnostics & Failure Recovery Detection of failures Repair or replacement Backup parts on-hand

Page 32: The Windows Azure Platform (MSDN Events Series)

Azure Solution– Hardware

Hardware Acquisition No up-front capital expenditures Windows Azure provides redundancy Windows Azure scales to meet peak usage

Hardware Diagnostics & Failure Recovery Windows Azure detects hardware failures Windows Azure dynamically repairs itself

Page 33: The Windows Azure Platform (MSDN Events Series)

Conclusion

You are now Windows Azure savvy… You’ve seen Windows Azure in action… You’ve learned about the platform and its

components and core services You understand instance roles You know the tools you will need to begin You’re excited to use this new technology And you can hardly wait for session 2 on

data…

Page 34: The Windows Azure Platform (MSDN Events Series)

Windows Azure Developer Platformhttp://www.microsoft.com/windowsazure/developers/

Channel 9 videoshttp://channel9.msdn.com/azure

Windows Azure Platform Training Kithttp://www.azure.com

Microsoft PDC 2009http://microsoftpdc.com/

Windows Azure SDKhttp://www.microsoft.com/windowsazure/developers/

Resources – Windows Azure Platform

Page 35: The Windows Azure Platform (MSDN Events Series)

Session 02: Windows Azure Platform Data Storage

Session 02: Windows Azure Platform Data Storage

Page 36: The Windows Azure Platform (MSDN Events Series)

Agenda

Windows Azure Platform Data Storage Options

Getting Started with SQL Azure Data Storage

Getting Started with Windows Azure Data Storage Blobs Tables Queues Drives

Inspecting the contents of Windows Azure Data Storage

Page 37: The Windows Azure Platform (MSDN Events Series)

Objectives

Learn the data storage options offered by the Windows Azure Platform and become familiar with choosing and using the appropriate one for your application

Page 38: The Windows Azure Platform (MSDN Events Series)

Azure Platform Data Storage Options• SQL Azure

• Relational data storage• Windows Azure Data Storage

• Blobs• Unstructured data storage

• Tables• Semi-structured or tabular data storage

• Queues• Buffered delivery data storage

• Drives• Durable NTFS volumes that Windows Azure

applications can use. See: http://microsoftpdc.com/Sessions/SVC14

Page 39: The Windows Azure Platform (MSDN Events Series)

SQL Azure Features

Supported Tables, Indexes,

Views Stored Procedures Triggers Constraints Table Variables Temp Tables

(#Name)

Not Supported Physical Server

Access Catalog DDL Common Language

Runtime Service Broker Reporting Services Analysis Services Distributed

Transactions and Queries

Page 40: The Windows Azure Platform (MSDN Events Series)

SQL Azure

Initial Services Database – Core SQL Server database

capabilities

Future Services Data Sync – Enables the sync framework Additional SQL Server capabilities available as

a service: Business Intelligence and Reporting

New services: Reference Data and Secure Data Hub

Page 41: The Windows Azure Platform (MSDN Events Series)

SQL AzureDeployment

Web Portal(API)

SQL AzureTDS

DB Script

Page 42: The Windows Azure Platform (MSDN Events Series)

SQL AzureAccessing databases

Web Portal(API)

SQL AzureTDS

Your App

Change Connection String

Page 43: The Windows Azure Platform (MSDN Events Series)

Database Replicas

Replica 1

Replica 2

Replica 3

DB

Single Database Multiple Replicas

Single Primary

Page 44: The Windows Azure Platform (MSDN Events Series)

SQL Azure Server Creation

Page 45: The Windows Azure Platform (MSDN Events Series)

SQL Azure Firewall Maintenance

Simple rules Easy one-screen portal maintenance

Page 46: The Windows Azure Platform (MSDN Events Series)

SQL Azure Database Connection String An administrative user is created with the

server User has system administrator permissions

like sa” Server=tcp:itte80vcfq.database.windows.net

; Database=FabrikamAzureDB;User ID=FredSa;Password=myPassword;Trusted_Connection=False;Encrypt=True;

Page 47: The Windows Azure Platform (MSDN Events Series)

DemoSQL Azure Database Application

Page 48: The Windows Azure Platform (MSDN Events Series)

Database Migrations

Scripts Transfer Schema

BCP Transfer Data

SSIS (SQL Server Integration Service) Transfer Schema and Data

Page 49: The Windows Azure Platform (MSDN Events Series)

Database Migrations (Cont.)

The SQL Azure Migration Wizard helps you migrate your local SQL Server 2005 / 2008 databases into SQL Azure. The wizard walks you through the selection of your SQL objects, creates SQL scripts suitable for SQL Azure, and allows you to migrate your data.”http://sqlazuremw.codeplex.com/

Page 50: The Windows Azure Platform (MSDN Events Series)

Database Management using SQL Management Studio

Page 51: The Windows Azure Platform (MSDN Events Series)

Getting Started with Windows Azure Data Storage

Page 52: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage

Page 53: The Windows Azure Platform (MSDN Events Series)

Account Name / Key

AccountName A unique name identifying the Azure Data Storage

AccountKey A blob of encrypted data used for authentication

Page 54: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage - Blobs Unstructured data storage Partitioned by container Unlimited containers

Page 55: The Windows Azure Platform (MSDN Events Series)

Demo• Windows Azure Data Storage –

BlobsThe GuestBook Application

• Examining the contents ofWindows Azure Data Storage

Page 56: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage - Tables Windows Azure Table provides scalable, available,

and durable structured (or semi-structured) storage in the form of tables.

The tables contain entities, and the entities contain properties.

The tables are scalable to billions of entities and terabytes of data, and may be partitioned across thousands of servers.

The tables support ACID transactions over single entities and rich queries over the entire table.

Simple and familiar .NET and REST programming interfaces are provided via ADO.NET Data Services.

http://go.microsoft.com/fwlink/?LinkId=153401

Page 57: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage – Tables (Terms Part 1) Table – contains a set of entities. Entity (Row) – Entities are the basic data

items stored in a table. Property (Column) – This represents a

single value in an entity. PartitionKey – The first key property of

every table. The system uses this key to automatically distribute the table’s entities over many storage nodes.

Page 58: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage – Tables (Terms Part 2) RowKey – A second key property for the

table. This is the unique ID of the entity within the partition it belongs to.

Timestamp – Every entity has a version maintained by the system.

Partition – A set of entities in a table with the same partition key value.

Sort Order – There is a single index provided for the CTP, where all entities in a table are sorted by PartitionKey and then RowKey

Page 59: The Windows Azure Platform (MSDN Events Series)

68

Getting all of dunnry’s blog posts is fast• Single partition

Getting all posts after 2008-03-27 is slow• Traverse all partitions

Key Example – Blog Posts

Partition KeyAuthor

Row KeyPermalin

k

Property 3Changed

OnProperty 4

Title

smarx i-love-tables 2009-07-04 I Love Tables!

smarx tables-are-awesome 2009-07-12 Tables are

Awesome!

dunnry cheetos 2008-03-27 I Love Cheetos

dunnry blogging-again 2009-07-15 Finally Blogging

Again

dunnry phluffyfotos 2008-04-09 PhluffyFotos!

Partition 1

Partition 2

Page 60: The Windows Azure Platform (MSDN Events Series)

SQL Azure and Windows Azure Table Comparison

SQL Azure Tables Fully structured Strongly typed Relational (RDMS) Highly scalable

Windows Azure Tables Semi-structured Loosely typed Non-Relational (Not

RDMS) Massively scalable

Page 61: The Windows Azure Platform (MSDN Events Series)

DemoWindows Azure Data Storage - TablesThe GuestBook Application

Page 62: The Windows Azure Platform (MSDN Events Series)

Windows Azure Data Storage - Queues Buffered delivery data storage Read at least once Delete to remove message, otherwise is

returned to queue Partitioned by Queue Name

Page 63: The Windows Azure Platform (MSDN Events Series)

Azure Queues

Queue

Msg 1

Msg 2

Msg 3

Msg 4

Worker Role

Worker Role

PutMessage

Web Role

GetMessage (Timeout)

RemoveMessage

Msg 2Msg 1

Worker Role

Msg 2

Page 64: The Windows Azure Platform (MSDN Events Series)

DemoWindows Azure Data Storage - QueuesThe GuestBook Application

Page 65: The Windows Azure Platform (MSDN Events Series)

Resources

Azure Portalhttp://windows.azure.com

Tools SQL Azure Migration Wizard

http://sqlazuremw.codeplex.com/

Azure Storage Explorer http://azurestorageexplorer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35189

Windows Azure Management Tool (MMC)http://cloudfex.com/cs/blogs/cloud/archive/2009/05/17/windows-azure-management-tool-mmc.aspx

Windows Azure Forumshttp://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/threads

Page 66: The Windows Azure Platform (MSDN Events Series)

ResourcesWindows Azure Data Storage

• Haridas, Jai. “Windows Azure Tables and Queues Deep Dive”. Microsoft PDC. 2009. http://microsoftpdc.com/Sessions/SVC09

• Calder, Brad. “Windows Azure Blob Deep Dive”. Microsoft PDC. 2009. http://microsoftpdc.com/Sessions/SVC14

Page 67: The Windows Azure Platform (MSDN Events Series)

Resources – White Papers

Windows Azure Table – Programming Table Storagehttp://go.microsoft.com/fwlink/?LinkId=153401

Windows Azure Blob – Programming Blob Storagehttp://go.microsoft.com/fwlink/?LinkId=153400

Windows Azure Queue – Programming Queue Storagehttp://go.microsoft.com/fwlink/?LinkId=153402

Page 68: The Windows Azure Platform (MSDN Events Series)

Session 03:Windows Azure ApplicationsFrom Construction through Deployment

Session 03:Windows Azure ApplicationsFrom Construction through Deployment

Page 69: The Windows Azure Platform (MSDN Events Series)

Agenda

Build Web Application Migrate Web Application to Windows

Azure Deploy to the Cloud Migrate Database to SQL Server Migrate SQL Database to SQL Azure Deploy SQL Azure Database Migrate Web Application to the Cloud

Page 70: The Windows Azure Platform (MSDN Events Series)

Objective

Understand the process of building and deploying web applications and databases to Windows Azure and SQL Azure.

Page 71: The Windows Azure Platform (MSDN Events Series)

Part 1 - Developing and Running Application From the Local DevFabricDevelopment Workstation

DevFabricWeb App

The Cloud

Page 72: The Windows Azure Platform (MSDN Events Series)

DemoPart 1 - Developing and Running Application From the Local DevFabric

Page 73: The Windows Azure Platform (MSDN Events Series)

Part 2 - Deploy A Web ApplicationFrom DevFabric to Windows Azure Staging

Cloud Fabric

Staging

Production

Development Workstation

DevFabric

Web AppWeb App

Page 74: The Windows Azure Platform (MSDN Events Series)

DemoPart 2 – Deploy A Web ApplicationFrom DevFabric to Windows Azure Staging Area

Page 75: The Windows Azure Platform (MSDN Events Series)

Part 3 - Deploy A Web ApplicationFrom Windows Azure Staging to Production

Cloud Fabric

Staging

Production

Web AppWeb App

Page 76: The Windows Azure Platform (MSDN Events Series)

DemoPart 3 – Deploy Our Windows Azure Application From The Windows Azure Staging Area into Production

Page 77: The Windows Azure Platform (MSDN Events Series)

Part 4 - Developing and Running ApplicationWith SQL Server From the Local DevFabric

Development Workstation

DevFabricWeb App

SQL DatabaseThe

Cloud

Page 78: The Windows Azure Platform (MSDN Events Series)

DemoPart 4 – Developing and Running Application With SQL Server From the Local DevFabric

Page 79: The Windows Azure Platform (MSDN Events Series)

Part 5 - Developing and Running ApplicationWith SQL Server From the Local DevFabricDevelopment Workstation

DevFabricWeb App

SQL Database

Cloud Fabric

Staging

Production

SQL Azure

SQL Database

Page 80: The Windows Azure Platform (MSDN Events Series)

DemoPart 5 - Developing and Running ApplicationWith SQL Server From the Local DevFabric

Page 81: The Windows Azure Platform (MSDN Events Series)

Part 5 - Developing and Running ApplicationWith Windows Azure and SQL AzureDevelopment Workstation

DevFabricWeb App

SQL Database

Cloud Fabric

Staging

Production

SQL Azure

SQL Database

Web App

Web App

Web App

Page 82: The Windows Azure Platform (MSDN Events Series)

DemoPart 5 - Developing and Running Application With Windows Azure and SQL Azure

Page 83: The Windows Azure Platform (MSDN Events Series)

Step 6 – Deploying ApplicationsWith Windows Azure and SQL Azure

Development Workstation

DevFabricWeb App

SQL Database

Cloud Fabric

Staging

Production

SQL Azure

SQL Databases

Web App

Web App

Web App

Page 84: The Windows Azure Platform (MSDN Events Series)

DemoStep 6 – Deploying ApplicationsWith Windows Azure and SQL Azure

Page 85: The Windows Azure Platform (MSDN Events Series)

Part 7 - Deploying Updates To Applications

Development Workstation

DevFabricWeb App

SQL Database

Cloud Fabric

Staging

Production

SQL Azure

SQL Database

Web App

Web AppWeb App

Page 86: The Windows Azure Platform (MSDN Events Series)

DemoPart 7 - Deploying Updates To Applications

Page 87: The Windows Azure Platform (MSDN Events Series)

Part 8 - Revising Application Configuration

Development Workstation

DevFabricWeb App

SQL Database

Cloud Fabric

Staging

Production

SQL Azure

SQL Database

Web App

Web AppWeb App

Config

Page 88: The Windows Azure Platform (MSDN Events Series)

DemoPart 8 - Revising Application Configuration

Page 89: The Windows Azure Platform (MSDN Events Series)

Part 9 - Creating SQL Azure Database Users

Development Workstation

SQL Database

SQL Azure

SQL Database

SQL Server 2008 R2 Mgmt

Studio

Page 90: The Windows Azure Platform (MSDN Events Series)

DemoPart 9 - Creating SQL Azure Database Users

Page 91: The Windows Azure Platform (MSDN Events Series)

Resources - Deployments

Kerner, Mathew. “Windows Azure Diagnostics, Logging and Monitoring in the Cloud.” Microsoft PDC. 2009. http://microsoftpdc.com/Sessions/SVC15

Page 92: The Windows Azure Platform (MSDN Events Series)

More Information On Stuff We Wanted To Talk About But Didn’t Have Time For…

AppFabric Smith, Justin. “REST Services Security Using the

Access Control Service”. Microsoft PDC. 2009 http://microsoftpdc.com/Sessions/SVC19

Page 93: The Windows Azure Platform (MSDN Events Series)

Q & AQ & A

Page 94: The Windows Azure Platform (MSDN Events Series)