real world azure - dev

180
MSDN Events Presents: Real World Azure clint edmonson | architect evangelist | www.notsotrivial.net mike benkovich | developer evangelist | www.benkotips.com

Upload: clint-edmonson

Post on 09-May-2015

4.148 views

Category:

Technology


5 download

DESCRIPTION

MSDN Events Presents – for the Developer & Architect from In this session, we will discuss: Cloud computing architectures in general and the Azure architecture in particular Several aspects of Azure from the developer’s and architect’s perspective Azure roles (web, web service and worker) Azure storage options Azure security and identity options How Azure-based applications can be integrated with on-premise applications Configuration, deployment and scaling Azure-based applications How development teams can optimize their applications for better management and monitoring

TRANSCRIPT

Page 1: Real World Azure - Dev

MSDN Events Presents:Real World Azureclint edmonson | architect evangelist | www.notsotrivial.netmike benkovich | developer evangelist | www.benkotips.com

Page 2: Real World Azure - Dev

This is Jim

Patterns for Cloud Computing

Page 3: Real World Azure - Dev

Jim has many questions about cloud computing

Patterns for Cloud Computing

Page 4: Real World Azure - Dev

The more he reads, the more confused he gets

Patterns for Cloud Computing

Page 5: Real World Azure - Dev

“What is Cloud Computing?”

Patterns for Cloud Computing

Page 6: Real World Azure - Dev

“What can I use the Cloud for?”

Patterns for Cloud Computing

Page 7: Real World Azure - Dev

“What is Microsoft’s roadmap in this space?”

Patterns for Cloud Computing

Page 8: Real World Azure - Dev

Session Objectives

Page 9: Real World Azure - Dev

Session Objectives

Define Cloud Computing

Highlight the implementation of a Real World Azure scenario

Break down the parts

Page 10: Real World Azure - Dev

Defining Cloud Computing

Page 11: Real World Azure - Dev

Defining Cloud Computing

Jim has heard all the buzzwords

Page 12: Real World Azure - Dev

Defining Cloud Computing

Service Oriented Architecture

Page 13: Real World Azure - Dev

Defining Cloud Computing

Rich Internet Applications

Page 14: Real World Azure - Dev

Defining Cloud Computing

Software as a Service

Page 15: Real World Azure - Dev

Defining Cloud Computing

Software + Services

Page 16: Real World Azure - Dev

Defining Cloud Computing

Are any of these cloud computing?

Page 17: Real World Azure - Dev

Defining Cloud Computing

Styles of application architecture

Page 18: Real World Azure - Dev

Defining Cloud Computing

These styles can work in the cloud, but they are not cloud

computing

Page 19: Real World Azure - Dev

Defining Cloud Computing

Where do your applications “live”?

Page 20: Real World Azure - Dev

Defining Cloud Computing

On PremisesHostedCloud

Vendor’s Problem

Page 21: Real World Azure - Dev

Defining Cloud Computing

“What is Microsoft doing in Cloud Computing?”

Page 22: Real World Azure - Dev

Defining Cloud Computing

3 x Critical Concepts

Page 23: Real World Azure - Dev

Defining Cloud Computing

Roles

Web RoleWorker Role

Page 24: Real World Azure - Dev

Defining Cloud Computing

Storage

Table, Blob, Relational

Page 25: Real World Azure - Dev

Defining Cloud Computing

Messaging

Queues

Page 26: Real World Azure - Dev

Patterns for Cloud Computing

Using the Cloud for Scale

Page 27: Real World Azure - Dev

“Isn’t the cloud good for applications that need to scale dynamically?”

Patterns for Cloud Computing

Page 28: Real World Azure - Dev

For example, tax applications

Patterns for Cloud Computing

Page 29: Real World Azure - Dev

“How does this work?”

Patterns for Cloud Computing

Page 30: Real World Azure - Dev

Let’s do some white boarding for Jim…

Patterns for Cloud Computing

Page 31: Real World Azure - Dev

Using the Cloud for Scale

Web TierBrowserRequest

B/L Tier Database

Response

“Wow! What a great site!”

Page 32: Real World Azure - Dev

Using the Cloud for Scale

Web Tier B/L Tier Database

Browser

Browser

Browser

Browser

Browser

“Server Busy”

Page 33: Real World Azure - Dev

Using the Cloud for Scale

Web Tier B/L Tier Database

Browser

“Timeout”

Browser

Browser

Browser

Browser

Page 34: Real World Azure - Dev

How would Jim do this today on premises?

Page 35: Real World Azure - Dev

Using the Cloud for Scale

Web Tier

B/L Tier Database

Browser

Browser

Browser

Browser

Browser

Web Tier

Web Tier

N L B

How would Jim do this today on premises?

Page 36: Real World Azure - Dev

Using the Cloud for Scale

Database

Browser

Browser

Browser

Browser

Browser

Web Tier B/L Tier

B/L Tier

B/L Tier

N L B

How would Jim do this today on premises?

Page 37: Real World Azure - Dev

Using the Cloud for Scale

Database

Browser

Browser

Browser

Browser

Browser

B/L Tier

B/L Tier

B/L Tier

N L B

Web Tier

Web Tier

Web Tier

N L B

How would Jim do this today on premises?

Page 38: Real World Azure - Dev

Using the Cloud for Scale

Browser

Browser

Browser

Browser

Browser

B/L Tier

B/L Tier

B/L Tier

N L B

Database

p1 p2 p3

Web Tier

Web Tier

Web Tier

N L B

How would Jim do this today on premises?

Page 39: Real World Azure - Dev

Not without consequences...

Page 40: Real World Azure - Dev

Using the Cloud for Scale

Browser

Browser

Browser

Browser

Browser

B/L Tier

B/L Tier

B/L Tier

N L B

Database

p1 p2 p3

Web Tier

Web Tier

Web Tier

N L B

“That took a lot of work - and money!”

How would Jim do this today on premises?

Page 41: Real World Azure - Dev

Using the Cloud for Scale

Browser B/L Tier

B/L Tier

B/L Tier

N L B

Database

p1 p2 p3

Web Tier

Web Tier

Web Tier

N L B

“Not so great now…”

“Hmmm... Most of this stuff is sitting idle...”

“That took a lot of work - and money!”

How would Jim do this today on premises?

Page 42: Real World Azure - Dev

Using the Cloud for Scale

Usage

Jan Apr Jul Oct

Datacenter peak load

Idle time

Page 43: Real World Azure - Dev

How can Windows Azure help?

Page 44: Real World Azure - Dev

Using the Cloud for Scale

Web RoleBrowserRequest

Worker Role

Azure Storag

eResponse

“Wow! What a great site!”

Page 45: Real World Azure - Dev

Using the Cloud for Scale

Web RoleWorker

Role

AzureStorag

e

Browser

“Server Busy”

Browser

Browser

Browser

Browser

Page 46: Real World Azure - Dev
Page 47: Real World Azure - Dev

Using the Cloud for Scale

Web Role

Worker Role

AzureStorag

e

Browser

Browser

Browser

Browser

Browser

Web Role

Web Role

N L B

You don’t see this bit

Page 48: Real World Azure - Dev

Using the Cloud for Scale

Web Role

AzureStorag

e

Browser

Browser

Browser

Browser

Browser

Web Role

Web Role

N L B

Worker Role

Worker Role

Worker Role

N L B

Page 49: Real World Azure - Dev

Using the Cloud for Scale

Web Role

AzureStorag

e

Browser

Browser

Browser

Browser

Browser

Web Role

Web Role

N L B

Worker Role

Worker Role

Worker Role

N L B

p1 p2 p3

Page 50: Real World Azure - Dev

What’s going on behind the scenes?

Page 51: Real World Azure - Dev

Windows Azure

FabricController

Web Portal(API)

LB

LB

DNS

YourService

Page 52: Real World Azure - Dev

LB

LB

DNS

Service Deployment

YourService

FabricController

Web Portal(API)

Service ModelServiceService

DNSconfig

Page 53: Real World Azure - Dev

LB

LB

DNS

Service Scaling

YourService

FabricController

Web Portal(API)

Service

Service

Service

Model

Service

Service

ServiceService

Service

Page 54: Real World Azure - Dev

LB

LB

DNS

Service Monitoring & Recovery

YourService

FabricController

Web Portal(API)

Service

Service

Service

Model !

Service

Page 55: Real World Azure - Dev

On to the Case Study…

Page 56: Real World Azure - Dev

56

RXD Incubation Project• Project Vision• Project Austin delivers a next-generation, micro-community

based opportunity management and collaboration experience to our managed partners …

• Project Goals• Gain first-hand experience on Azure

• Cloud Storage – Security – Integration – Web – SQL Azure• Explore a business scenario that leverages the promises of the

cloud• Provide enterprise feedback to the Azure team• Deliver a working prototype in FY09

Project Austin Overview

Page 57: Real World Azure - Dev

57

Project Austin delivers a next-generation, micro-community based opportunity management and collaboration experience that brings a managed feel to the unmanaged space, allowing Microsoft to observe and participate in the sales process at scale through dynamic, customer-driven collaboration.

Project Austin leverages Windows Azure, CRM Services, and SharePoint Services to provide a rich set of customer and partner capabilities in the cloud while integrating with existing on-premise solutions.

Project Austin significantly enhances our understanding of our customers and partners by facilitating relationships with and between customers, partners, and Microsoft, while providing data that allows Microsoft to identify and promote world-class selling techniques and content.

Project Austin Vision

Page 58: Real World Azure - Dev

58

Web Role• Multi-Tenant; Web App; Web Service

Integration• Worker Role; .NET Service Bus; Siebel

Data Storage• Tables; Blobs; Queues; SQL Azure

Live ID Integration• Web Auth; Access Control Service; WIF; RPS

Technical Overview

Page 59: Real World Azure - Dev

59

Community

Community

Community

Community

Micro CommunityFactory

CommunityGroups

Community Group A Community Group B

Foundation Services

Compute

Identity Security Storage Eventing Config Content …

High Level Services

Navigation

Personalization

Search

Customization

Membership

Content

Identity

Security

Groups

Integration

Micro Community

Personalization MembershipContent Personalization MembershipContent

Page 60: Real World Azure - Dev
Page 61: Real World Azure - Dev
Page 62: Real World Azure - Dev

(TODO: Insert Austin Screenshots or walkthrough application)

Page 63: Real World Azure - Dev

Warning – this session contains information about Microsoft Technologies that are in the CTP (pre-Beta) stages. Specifics of the technology may change before final release.

Page 64: Real World Azure - Dev

Feedback.

Page 65: Real World Azure - Dev

[email protected]

We are here to help. Send us your questions, doubts, concerns, challenges, adoration, regrets, denials, and alibis.

We will start a discussion and help you out.

Page 66: Real World Azure - Dev

The Development Experience…

Page 67: Real World Azure - Dev

68

Visual Studio• Templates• Debugging

.NET platform• .NET, IIS7, WCF

“The cloud on your desktop”• Complete offline cloud simulation• Like Cassini (web development server)

Consistent, Familiar Development

Page 68: Real World Azure - Dev

69

1. Write code on your development machine2. Test locally3. Build package w/VS Tools4. Upload your package to the web portal5. Push “deploy”

6. Monitor, upgrade, scale…

Publishing Your Service To The Cloud

Page 69: Real World Azure - Dev

Demo: Developer Experience

Page 70: Real World Azure - Dev

71

Windows Server 2008 x64

.NET Start Native Code User Mode

Roles

Web Role Worker Role

Windows Server 2008 x64

IIS 7 FastCGI - PHP Native Code Full Trust User Mode

Page 71: Real World Azure - Dev

Demo: Guest Book

Page 72: Real World Azure - Dev

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 73: Real World Azure - Dev

74

Debugging the cloud really means logging

Simple logging API today

More functionality over time

Debugging in the Cloud

Page 74: Real World Azure - Dev

Storage in the Cloud…

Page 75: Real World Azure - Dev

Blobs, Tables, Relational

Page 76: Real World Azure - Dev

Blobs, Tables, Relational

Page 77: Real World Azure - Dev

79

Blobs stored in Containers 1 or more Containers per account

• Scoping is at container level• …/Container/blobpath

Blobs• Capacity 50GB in CTP• Metadata, accessed independently • name/value pairs (8kb total)

Private or Public container access Use Blobs for file system

Blobs

Page 78: Real World Azure - Dev

Using the Cloud for Storage

Client Azure Blob Storage

REST API

PutBlob PUT http://account.blob.core.windows./net/containername/blobname

Blob Container

http://account.blob.core.windows.net/containername/blobname

PutBlob = 64Mb MAXMetaData = 8Kb per Blob

Page 79: Real World Azure - Dev

Using the Cloud for Storage

Client Azure Blob Storage

REST API

GetBlob GET http://account.blob.core.windows./net/containername/blobname

Blob Container

http://account.blob.core.windows.net/containername/blobname

Page 80: Real World Azure - Dev

Using the Cloud for Storage

Client Azure Blob Storage

REST API

GetBlob GET http://account.blob.core.windows./net/containername/blobnameRange: bytes=329300 - 730000

Blob Container

http://account.blob.core.windows.net/containername/blobname

Page 81: Real World Azure - Dev

Using the Cloud for Storage

Client Azure Blob Storage

REST API

PutBlock(blobname, blockid, data)PutBlockList(blobname, blockid1, …, blockidN)

Blob Container

http://account.blob.core.windows.net/containername/blobname

PutBlock = 4Mb MAX to a maximum of 50GbBlockId = 64 bytes

Page 82: Real World Azure - Dev

Blobs, Tables, Relational

Page 83: Real World Azure - Dev

Using the Cloud for Storage

Worker Role

AzureTable

Storage

Each Table:

PartitionKey (e.g. DocumentName) to ensure scalabilityRowKey (e.g. version number)[fields] for data

http://account.table.core.windows.net

REST: GET http://account.table.core.windows.net/Customer?$filter=%20PartitionKey%20eq%20value LINQ:var customers = from o in context.CreateQuery<customer>(“Customer”) where o.PartitionKey == value select o;

Page 84: Real World Azure - Dev

86

Entities and properties (rows & columns) Tables scoped by account Designed for billions+ Scale-out using partitions

• Partition key & row key• Operations performed on partitions• Efficient queries• No limit on number of partitions

Use ADO.NET Data Services

Tables

Page 85: Real World Azure - Dev

87

Provides structured storage• Massively scalable tables (TBs of data)• Highly available• Durable

Familiar and easy-to-use API• ADO.NET Data Services – .NET 3.5 SP1• .NET classes and LINQ• REST – with any platform or language

Introduction to Tables

Page 86: Real World Azure - Dev

88

For scalable applications:• Billions of rows, TBs of data• Automatic load management (hot data)

For online applications:• High availability• Built-in replication• Flexible schema (no big “schema migration”)• Optimistic concurrency

Advantages

Page 87: Real World Azure - Dev

89

No join No group by No order by

Think: relational DB partitioned to the max

Not a Relational Database

Page 88: Real World Azure - Dev

90

Table• A Table is a set of Entities (rows)• An Entity is a set of Properties (columns)

Entity• Two “key” properties form unique ID• PartitionKey – enables scale• RowKey – uniquely ID within a partition

Data Model

Page 89: Real World Azure - Dev

91

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 PostsPartition Key

AuthorRow Key

PermalinkProperty 3ChangedOn

Property 4Title

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 90: Real World Azure - Dev

92

Partition Key – how data is partitioned Row Key – unique in partition, defines sort

Goals• Keep partitions small (increased scalability)• Specify partition key in common queries• Query/sort on row key

Keys

Page 91: Real World Azure - Dev

93

Tradeoff between locality and scalability Considerations

• Entity group transactions• Query efficiency• Scalability• Flexible Partitioning

Choosing a Partition Key

Page 92: Real World Azure - Dev

94

Pick potential keys (common query filters) Order keys by importance If needed, include an additional unique key Use two most important keys as PK, RK Consider concatenating to form keys

A Method of Choosing Keys

Page 93: Real World Azure - Dev

96

Non-key queries are scans Improve performance by scoping

• Usually by partition key• But what about by table?

3 tables• Top 1,000 popular items• Top 10,000 popular items• Everything

Now arbitrary “top 1,000” queries are fast Better locality than clever partition keys

Multiple Tables, Same Keys

Page 94: Real World Azure - Dev

Demo: Guest Book Table Storage

Page 95: Real World Azure - Dev

98

Azure tables are *not* a relational database• Requires a mind shift• Azure tables scale• 3 - 9s availability• Azure tables support exactly one key• PartitionKey + RowKey

• Case Matters• No foreign keys• No referential integrity• No stored procedures

Leverage the community

Lessons LearnedAzure Storage

Page 96: Real World Azure - Dev

99

Azure storage Client Library• No longer just a “sample”

Azure storage is available via REST• Not limited to Azure hosted apps• Not limited to Microsoft platform or tools• Getting the signature correct is the hard part• Console tools are easy to write• Ultimate flexibility• Use the REST interface early as you’re versioning your tables

Lessons LearnedAzure Storage

Page 97: Real World Azure - Dev

100

REST is *not* TDS• Be prepared to parse• LINQ and XML classes help• Sometimes, string parsing is the best choice• Don’t forget to close your HTTP connections

Azure storage names are picky• So are Azure key values• It’s possible to create an entity in a table and not be able to

update or delete it

Lessons LearnedAzure Storage - RESTful

Page 98: Real World Azure - Dev

101

Often better to pull back more than you need vs. multiple roundtrips

LINQ on results in memory is fast & flexible• foreach works well too• don’t forget the break;

Sort and cache tables on the web tier• Use XML Serialization to write the results to local

storage• It’s generally faster to hydrate from local storage

• Not as fast as caching in memory

Lessons LearnedAzure Storage – Roundtrips are expensive

Page 99: Real World Azure - Dev

102

Using List<> with entity types• List<> binds well• LINQ works well with List<>• So does foreach• List<> serializes well• Add intelligence to your entities• Compare, Equals, ToString, etc.

Lessons LearnedAzure Storage – List<>

Page 100: Real World Azure - Dev

Blobs, Tables, Relational

Page 101: Real World Azure - Dev

SQL Server Data Services (MIX08)

Page 102: Real World Azure - Dev

Using the Cloud for Storage

DB ServerClient RDBMS

TDSData

This is what I’m doing on premises...

Page 103: Real World Azure - Dev

Using the Cloud for Storage

DB ServerClient RDBMS

TDSData

So, this is what I would like to do in the cloud...

Page 104: Real World Azure - Dev

SQL Data Services (MIX09)

Page 105: Real World Azure - Dev

SQL Azure (July 2009)

Page 106: Real World Azure - Dev

Using the Cloud for Storage

SQL AzureClient RDBMS

TDSData

So, this is what I would like to do…

Page 107: Real World Azure - Dev

Using the Cloud for Storage

SQL AzureBrowser RDBMS

TDSWeb Role

HTTP

Page 108: Real World Azure - Dev

Using the Cloud for Storage

SQL AzureBrowser RDBMS

TDS

Web RoleHTTP

Worker Role

Queue

Page 109: Real World Azure - Dev

Migration!

Page 110: Real World Azure - Dev

Using the Cloud for Storage

Browser RDBMS

Web TierHTTP

Bus. Logic

“The Data Center”

SQL Server

TDS

Page 111: Real World Azure - Dev

Using the Cloud for Storage

SQL AzureBrowser RDBMS

TDS

Web RoleHTTP

Worker Role

Queue

“The Cloud”

Page 112: Real World Azure - Dev

Demo: SQL Azure CTP

Page 113: Real World Azure - Dev

CTP Limitations TodaySET ANSI_NULLS ONSET ANSI_NULLS OFFPAD_INDEX  = OFF

SET ANSI_PADDING OFFALLOW_ROW_LOCKS  = ONALLOW_PAGE_LOCKS  = ON

ON [PRIMARY]FILLFACTOR = 90

Three-part naming (e.g. dbo.TableName.ColumnName)Cannot use “WITH IGNORE_DUP_KEY” w/o the quotes

No @@servernameNo CREATE SCHEMA

(Not an exhaustive list)

Page 114: Real World Azure - Dev

117

From the database “down” it’s just SQL Server• Well, almost …• Most tools don’t work today• System catalog is different• No CLR

Above the database is taken care of for you• You can’t really change anything

Lessons LearnedSQL Azure

Page 115: Real World Azure - Dev

118

SQL Server is very familiar• SQL Azure *is* SQL Server in the cloud• Security of Azure tables is unknown

• SQL Server has a very good pedigree

A lot of our customers LOVE SQL Server• Understand Azure storage• Understand SQL Azure• Make the right recommendation

Lessons LearnedSQL Azure

Page 116: Real World Azure - Dev

119

Azure tables are *not* SQL Azure• SQL Azure is not the only storage option• SQL Azure is not always the best storage option• SQL Azure costs more• Delivers a *lot* more functionality• SQL Azure is more limited on scale [today]

Lessons LearnedSQL Azure

Page 117: Real World Azure - Dev

Queues

Page 118: Real World Azure - Dev

121

Simple asynchronous dispatch queue• Create and delete queues

Message:• Retrieved at least once• Max size 8kb• Operations:• Enqueue• Dequeue• RemoveMessage

Queues

Page 119: Real World Azure - Dev

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 120: Real World Azure - Dev

Patterns in the Cloud

Using the Cloud for Multi Tenancy

Page 121: Real World Azure - Dev

“I like the idea of scaling Web roles…”

Patterns for Cloud Computing

Page 122: Real World Azure - Dev

“…but need to serve multiple customers”

Patterns for Cloud Computing

Page 123: Real World Azure - Dev

“Without creating separate codebases!”

Patterns for Cloud Computing

Page 124: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Customer #1

Page 125: Real World Azure - Dev

How would Jim do this today on premises?

Page 126: Real World Azure - Dev

#2 - Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Customer #2

Web TierBrowser B/L Tier Database

Customer #1

Web TierBrowser B/L Tier Database

Customer #3

How would Jim do this today on premises?

Page 127: Real World Azure - Dev

Gets expensive pretty quickly

Page 128: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

Page 129: Real World Azure - Dev

Schema Customizations

UI Customizations

Page 130: Real World Azure - Dev

Schema Customizations

UI Customizations

Page 131: Real World Azure - Dev

3 options for data in multi tenant environment

Page 132: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

Option 1: Everyone Uses the Same Database/Schema

Fixed Schema

Pros: Simplest approach, easy to maintain/upgrade.Cons: No customizations. Restoring of tenant data.

Page 133: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier

Database

Browser

Browser

Customer #1

Customer #2

Customer #3

Option 2: Give Each Customer Their Own Database/Schema

Customer #1

Database

Database

Customer #2

Customer #3

Pros: Flexible. Tenant restore is easier. High Isolation.Cons: Can be costly. Difficult to upgrade db schemas.

Page 134: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

Option 3: Fixed Database/Schema, with customizations

Fixed Schemawith

Customizations

Pros: Customers can add their own custom fieldsCons: Non standard way of customizing the schema. Tenant restore is difficult.

Page 135: Real World Azure - Dev

Using the Cloud for Multi Tenancy

TenantID

Tenant

int

TenantNamenvarchar

EmployeeId

Employee

int

FirstName nvarchar

LastName nvarchar

CustomizationID

Customization

int

Value nvarchar

TypeID

Type

int

Name nvarchar

CLRType nvarchar

1

*

*

1

*

1

*

*

Page 136: Real World Azure - Dev

Using the Cloud for Multi Tenancy

TenantID

Tenant

1

TenantNameUK Branch

EmployeeId

Employee

1

FirstName Gordon

LastName Brown

CustomizationID

Customization

1

Value SW1A 2AA

TypeID

Type

1

Name PostalCode

CLRType string

1

*

*

1

*

1

*

*

Page 137: Real World Azure - Dev

Using the Cloud for Multi Tenancy

TenantID

Tenant

2

TenantNameUS Branch

EmployeeId

Employee

2

FirstName Barack

LastName Obama

CustomizationID

Customization

2

Value 20500

TypeID

Type

2

Name ZipCode

CLRType string

1

*

*

1

*

1

*

*

Page 138: Real World Azure - Dev

Using the Cloud for Multi Tenancy

TenantID

Tenant

2

TenantNameUS Branch

EmployeeId

Employee

2

FirstName Barack

LastName Obama

CustomizationID

Customization

2

Value 20500

TypeID

Type

2

Name ZipCode

CLRType string

1

*

*

1

*

1

*

*

Fixed SchemaApplies to All

Tenants

CustomizableTenant by

Tenant Basis

Could be both

Page 139: Real World Azure - Dev

Schema Customizations

UI Customizations

Page 140: Real World Azure - Dev

#2 - Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

Page 141: Real World Azure - Dev

URL Handing

Page 142: Real World Azure - Dev

Can ASP.NET MVC Help?

Page 143: Real World Azure - Dev

Single Controller per Tenant

http://employeedata.cloudapp.net/contoso (ContosoController)

http://employeedata.cloudapp.net/fabrikam(FabrikamController)

Page 144: Real World Azure - Dev

Shared Controller per Tenant

http://employeedata.cloudapp.net/contoso (EmployeeController)

http://employeedata.cloudapp.net/fabrikam(EmployeeController)

Page 145: Real World Azure - Dev

Shared Controller per Tenant (with URL mask)

http://hr.contoso.co.uk(http://employeedata.cloudapp.net/employees)

http://hr.fabrikam.com(http://employeedata.cloudapp.net/employees)

Page 146: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

http://hr.chase.co.uk

http://hr.citigroup.com

http://employeedata.cloudapp.net

Page 147: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

http://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)

http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)

http://employeedata.cloudapp.net

Page 148: Real World Azure - Dev

Using the Cloud for Multi Tenancy

Web TierBrowser B/L Tier Database

Browser

Browser

Customer #1

Customer #2

Customer #3

http://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)

http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)

Use custom routing in ASP.NET MVC

http://employeedata.cloudapp.net

Page 149: Real World Azure - Dev

Demo: Multi-Tenant Routing with ASP.NET MVC

Tentative

Page 150: Real World Azure - Dev

Patterns for Moving to the Cloud

Using the Cloud for Communications

Page 151: Real World Azure - Dev

Jim’s organization needs to communicate with other organizations

Patterns for Cloud Computing

Page 152: Real World Azure - Dev

“This has always been a very tricky and expensive process to get working”

Patterns for Cloud Computing

Page 153: Real World Azure - Dev

“Does the cloud offer anything to help?”

Patterns for Cloud Computing

Page 154: Real World Azure - Dev

How would Jim have done this before?

Page 155: Real World Azure - Dev

Using the Cloud for Communications

Client Server

Company 1 Company 2Telco provided WAN

FTPClient

FTPServer

Page 156: Real World Azure - Dev

Using the Cloud for Communications

Client Server

Company 1 Company 2Telco provided WAN

FTPClient

FTPServer

Internet

Page 157: Real World Azure - Dev

Using the Cloud for Communications

Client Server

Company 1 Company 2Telco provided WAN

Browser

Internet

ExtranetSite

DMZ

Page 158: Real World Azure - Dev

What does the cloud provide?

Page 159: Real World Azure - Dev

Using the Cloud for Communications

ClientREST

Azure Queue

http://app.queue.core.windows.net/

Page 160: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Page 161: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2 x

Page 162: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Master Key

Master Key

Page 163: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Web Role

Page 164: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Web Role

Firewall

Firewall

Proxy?

Page 165: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Web Role

Firewall

Firewall

NAT?

65.55.33.204

192.168.14.100

Page 166: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Web Role

Firewall

Firewall

65.55.33.204

192.168.14.100OK, so I’ll do a

HTTP poll every minute

Page 167: Real World Azure - Dev

Using the Cloud for Communications

Client

REST

Azure Queue

http://app.queue.core.windows.net/

Client

Company 1

Company 2

Web Role

Firewall

Firewall

65.55.33.204

192.168.14.100…and how about other

protocols other than HTTP?

Page 168: Real World Azure - Dev

How does the .NET Service Bus help?

Page 169: Real World Azure - Dev

Using the Cloud for Communications

Client

Outbound bi-directional socketKept alive in background

.NET Service Bus

sb://.../myqueue

Client

Company 1

Company 2

Firewall

Page 170: Real World Azure - Dev

Using the Cloud for Communications

Client

Outbound bi-directional socketKept alive in background

.NET Service Bus

sb://.../myqueue

Client

Company 1

Company 2

Firewall

FirewallOutbound one-way socket

Message routedaccordingly

Page 171: Real World Azure - Dev

Austin Integration with Siebel (on-premise)

bi-directional socketKept alive in background

.NET Service

Bus

Siebel

On-Premise DataCenter

Firewall Synchronization Message

Opp. Exchan

geService

BlobTabl

eQueu

e

Austin

sb://.../myqueue

Page 172: Real World Azure - Dev

Demo: Integration through the .NET Service Bus

Page 173: Real World Azure - Dev

176

High Level of Abstraction• Hardware• Server OS• Network Infrastructure• Web Server

Availability• Automated Service Management

Scalability• Instance & Partitions

Developer Experience• Familiar Developer Tools

Windows Azure Benefits

Page 174: Real World Azure - Dev

177

Resources

Blogshttp://blog.smarx.com – Steve Marxhttp://blogs.msdn.com/clemensv - Clemens Vasters (.NET

Services)

Azure Services Platform Forumshttp://www.microsoft.com/azure/blog.mspx

Azure Services Training KitDownloadable hands-on labs, demos, and presentationshttp://www.azure.com

Page 175: Real World Azure - Dev

(Transition to Architect Evangelist for wrap-up…)

TODO

• Highlight customer wins or Partner experiences

• Q&A• Collect surveys and Hand out tokens• Giveaways

Page 176: Real World Azure - Dev

179

From start to finish in two weeks West Monroe Partners asked to

develop an interactive, printable map for the 2009 Taste of Chicago’s two million visitors

Had two weeks to design and build externally facing Web functionality, ensure scalability for up to 50,000 hits per day, with no defined hosting solution in place

Taste of Chicago

“With Windows Azure and Live Services, we built a solution that uses the equivalent of 25 servers, and yet it required no up-front

capital costs and minimal ongoing operational costs.”Cory Chaplin, Technology Solutions Practice Lead, West Monroe Partners

[case study]

Page 177: Real World Azure - Dev

180

“Be This Close”Country Music Festival 2009

[play it online]

Compelling Silverlight/DeepZoom experience leveraging Windows Azure as the storage mechanism

Less than 1 hour to get up and running on Azure

850 high resolution photos broken into x,000 tiles

Week a half to build Azure support

“Windows Azure was a breeze to use and didn't let us down.”Ben Henderson, Firefly Logic

Page 178: Real World Azure - Dev

181

Customer Costs Reduced 60 Percent Delivers enterprise line of

business data to mobile workers anytime, anywhere, at minimal cost to the enterprise.

Aggregated LOB data, LOB access rules, and, optionally, even LOBs themselves are stored in the cloud in Microsoft SQL Data Services.

Cumulux

[case study]

“With software-plus-services, we can get our customers up and running on mPortal in two weeks versus two months—a 75

percent time-to-market improvement over on-premises deployment.”

Ranjith Ramakrishnan, Chief Technology Officer for Cumulux

Page 179: Real World Azure - Dev

How do I qualify?• Building software or software services• Privately held• In business for less than 3 years• Less than US $1 million in annual revenue

What do I get?• MSDN Premium• Phone and Online Technical Support• Profiled on Microsoft and other web properties

contact brian [email protected]

Page 180: Real World Azure - Dev

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not

be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

[email protected]://davebost.com/blog