SlideShare a Scribd company logo
MSDN Events Presents:Real World Azureclint edmonson | architect evangelist | www.notsotrivial.netmike benkovich | developer evangelist | www.benkotips.com
This is JimPatterns for Cloud Computing
Jim has many questions about cloud computingPatterns for Cloud Computing
The more he reads, the more confused he gets Patterns for Cloud Computing
“What is Cloud Computing?”Patterns for Cloud Computing
“What can I use the Cloud for?”Patterns for Cloud Computing
“What is Microsoft’s roadmap in this space?”Patterns for Cloud Computing
Real World Azure - Dev
Define Cloud ComputingBreak down the partsHighlight the implementation of a Real World Azure scenario
Real World Azure - Dev
Jim has heard all the buzzwords
Service Oriented Architecture
Rich Internet Applications
Software as a Service
Software + Services
Are any of these cloud computing?
Styles of application architecture
These styles can work in the cloud, but they are not cloud computing
Where do your applications “live”?
On PremisesHostedCloudVendor’s Problem
“What is Microsoft doing in Cloud Computing?”
3 x Critical Concepts
RolesWeb RoleWorker Role
StorageTable, Blob, Relational
MessagingQueues
Patterns for Cloud ComputingUsing the Cloud for Scale
“Isn’t the cloud good for applications that need to scale dynamically?”Patterns for Cloud Computing
For example, tax applicationsPatterns for Cloud Computing
“How does this work?”Patterns for Cloud Computing
Let’s do some white boarding for Jim…Patterns for Cloud Computing
Using the Cloud for Scale“Wow!  What a great site!”DatabaseRequestWeb TierB/L TierBrowserResponse
Using the Cloud for ScaleBrowserBrowserDatabaseWeb TierB/L TierBrowser“Server Busy”BrowserBrowser
Using the Cloud for ScaleBrowserBrowserDatabaseWeb TierB/L TierBrowser“Timeout”BrowserBrowser
How would Jim do this today on premises?
Using the Cloud for ScaleHow would Jim do this today on premises?BrowserWeb TierN L BBrowserDatabaseWeb TierB/L TierBrowserBrowserWeb TierBrowser
Using the Cloud for ScaleHow would Jim do this today on premises?BrowserB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserB/L TierBrowser
Using the Cloud for ScaleHow would Jim do this today on premises?BrowserWeb TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser
Using the Cloud for ScaleHow would Jim do this today on premises?Browserp1 p2 p3Web TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser
Not without consequences...
Using the Cloud for ScaleHow would Jim do this today on premises?Browserp1 p2 p3Web TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser“That took a lot of work - and money!”
Using the Cloud for ScaleHow would Jim do this today on premises?p1 p2 p3“Not so great now…”Web TierN L BB/L TierN L BDatabaseWeb TierBrowserB/L TierWeb TierB/L Tier“That took a lot of work - and money!”“Hmmm...  Most of this stuff is sitting idle...”
Using the Cloud for ScaleDatacenter peak loadIdle timeUsageJanAprJulOct
How can Windows Azure help?
Using the Cloud for Scale“Wow!  What a great site!”Azure StorageRequestWeb RoleWorker RoleBrowserResponse
Using the Cloud for ScaleBrowserBrowserAzureStorageWeb RoleWorker RoleBrowser“Server Busy”BrowserBrowser
Real World Azure - Dev
Using the Cloud for ScaleBrowserWeb RoleN L BBrowserAzureStorageWeb RoleWorker RoleBrowserBrowserWeb RoleBrowserYou don’t see this bit
Using the Cloud for ScaleBrowserWeb RoleN L BWorker RoleN L BBrowserAzureStorageWeb RoleBrowserWorker RoleBrowserWeb RoleWorker RoleBrowser
Using the Cloud for ScaleBrowserp1 p2 p3Web RoleN L BWorker RoleN L BBrowserAzureStorageWeb RoleBrowserWorker RoleBrowserWeb RoleWorker RoleBrowser
What’s going on behind the scenes?
Windows AzureYourServiceDNSLBWeb Portal(API)LBFabricController
ServiceServiceServiceModelYourServiceDNSLBWeb Portal(API)DNSconfigLBService DeploymentFabricController
YourServiceServiceServiceDNSServiceServiceServiceServiceServiceLBServiceWeb Portal(API)LBModelService ScalingFabricController
YourServiceServiceDNSServiceServiceServiceLBWeb Portal(API)!LBModelService Monitoring & RecoveryFabricController
On to the Case Study…
RXD Incubation ProjectProject VisionProject Austin delivers a next-generation, micro-community based opportunity management and collaboration experience to our managed partners …Project GoalsGain first-hand experience on AzureCloud Storage – Security – Integration – Web – SQL AzureExplore a business scenario that leverages the promises of the cloudProvide enterprise feedback to the Azure teamDeliver a working prototype in FY09Project Austin Overview
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
Web RoleMulti-Tenant; Web App; Web ServiceIntegrationWorker Role; .NET Service Bus; SiebelData StorageTables; Blobs; Queues; SQL AzureLive ID IntegrationWeb Auth; Access Control Service; WIF; RPSTechnical Overview
CommunityCommunity Micro CommunityFactoryCommunityCommunityCommunityGroupsCommunity Group ACommunity Group BPersonalizationMembershipContentPersonalizationMembershipContentHigh Level ServicesPersonalizationCustomizationContentSecurityIntegration…NavigationSearchMembershipIdentityGroups…Foundation ServicesIdentitySecurityStorageEventingConfigContent…Micro CommunityCompute59
Real World Azure - Dev
Real World Azure - Dev
(TODO: Insert Austin Screenshots or walkthrough application)
(Transition to Developer Evangelist…)This slide is Hidden
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.
Feedback.
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.something@microsoft.com
The Development Experience…
Visual StudioTemplatesDebugging.NET platform.NET, IIS7, WCF“The cloud on your desktop”Complete offline cloud simulationLike Cassini (web development server)Consistent, Familiar Development
Write code on your development machineTest locallyBuild package w/VS ToolsUpload your package to the web portalPush “deploy”Monitor, upgrade, scale…Publishing Your Service To The Cloud
Demo:  Developer Experience
RolesWeb RoleWorker RoleWindows Server 2008 x64.NET StartNative CodeUser ModeWindows Server 2008 x64
IIS 7
FastCGI - PHP
Native Code
Full Trust
User ModeDemo:  Guest Book
Service Models & RolesBid Now ServiceWorker XWeb A(port 80)Main Web100 instancesImage Resize2 instancesWorker YAuction Processing25 instancesWeb B (port 8081)Admin2 instancesWorker ZNotifications10 instances
Debugging the cloud really means loggingSimple logging API todayMore functionality over timeDebugging in the Cloud
Demo:  Guest Book Logging
Storage in the Cloud…
Blobs, Tables, Relational
Blobs, Tables, Relational
Blobs stored in Containers1 or more Containers per accountScoping is at container level…/Container/blobpathBlobsCapacity 50GB in CTPMetadata, accessed independently name/value pairs (8kb total)Private or Public container accessUse Blobs for file systemBlobs
Using the Cloud for StorageBlob ContainerPutBlobPUT http://account.blob.core.windows./net/containername/blobnameAzure Blob StorageREST APIClienthttp://account.blob.core.windows.net/containername/blobnamePutBlob = 64Mb MAXMetaData = 8Kb per Blob
Using the Cloud for StorageBlob ContainerAzure Blob StorageREST APIClientGetBlobGET http://account.blob.core.windows./net/containername/blobnamehttp://account.blob.core.windows.net/containername/blobname
Using the Cloud for StorageBlob ContainerAzure Blob StorageREST APIClientGetBlobGET http://account.blob.core.windows./net/containername/blobnameRange:  bytes=329300 - 730000http://account.blob.core.windows.net/containername/blobname
Using the Cloud for StorageBlob ContainerPutBlock(blobname, blockid, data)PutBlockList(blobname, blockid1, …, blockidN)Azure Blob StorageREST APIClienthttp://account.blob.core.windows.net/containername/blobnamePutBlock = 4Mb MAX to a maximum of 50GbBlockId = 64 bytes
Blobs, Tables, Relational
Using the Cloud for StorageREST:  GET http://account.table.core.windows.net/Customer?$filter=%20PartitionKey%20eq%20valueLINQ:var customers = from o in context.CreateQuery<customer>(“Customer”) where o.PartitionKey == value select o;AzureTable StorageWorker Rolehttp://account.table.core.windows.netEach Table:  PartitionKey (e.g. DocumentName) to ensure scalabilityRowKey (e.g. version number)[fields] for data
Entities and properties (rows & columns)Tables scoped by accountDesigned for billions+Scale-out using partitionsPartition key & row keyOperations performed on partitionsEfficient queriesNo limit on number of partitionsUse ADO.NET Data ServicesTables
Provides structured storageMassively scalable tables (TBs of data)Highly availableDurableFamiliar and easy-to-use APIADO.NET Data Services – .NET 3.5 SP1.NET classes and LINQREST – with any platform or languageIntroduction to Tables
For scalable applications:Billions of rows, TBs of dataAutomatic load management (hot data)For online applications:High availabilityBuilt-in replicationFlexible schema (no big “schema migration”)Optimistic concurrencyAdvantages
No joinNo group byNo order byThink: relational DB partitioned to the maxNot a Relational Database
TableA Table is a set of Entities (rows)An Entity is a set of Properties (columns)EntityTwo “key” properties form unique IDPartitionKey – enables scaleRowKey – uniquely ID within a partitionData Model
Key Example – Blog PostsPartition 1Partition 2Getting all of dunnry’s blog posts is fastSingle partitionGetting all posts after 2008-03-27 is slowTraverse all partitions
Partition Key – how data is partitionedRow Key – unique in partition, defines sortGoalsKeep partitions small (increased scalability)Specify partition key in common queriesQuery/sort on row keyKeys
Tradeoff between locality and scalabilityConsiderationsEntity group transactionsQuery efficiencyScalabilityFlexible PartitioningChoosing a Partition Key
Pick potential keys (common query filters)Order keys by importanceIf needed, include an additional unique keyUse two most important keys as PK, RKConsider concatenating to form keysA Method of Choosing Keys
A Method for Choosing Keys…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 keysNon-key queries are scansImprove performance by scopingUsually by partition keyBut what about by table?3 tablesTop 1,000 popular itemsTop 10,000 popular itemsEverythingNow arbitrary “top 1,000” queries are fastBetter locality than clever partition keysMultiple Tables, Same Keys
Demo:  Guest Book Table Storage
Lessons LearnedAzure StorageAzure tables are *not* a relational databaseRequires a mind shiftAzure tables scale3 - 9s availabilityAzure tables support exactly one keyPartitionKey + RowKeyCase MattersNo foreign keysNo referential integrityNo stored proceduresLeverage the community
Lessons LearnedAzure StorageAzure storage Client LibraryNo longer just a “sample”Azure storage is available via RESTNot limited to Azure hosted appsNot limited to Microsoft platform or toolsGetting the signature correct is the hard partConsole tools are easy to writeUltimate flexibilityUse the REST interface early as you’re versioning your tables
Lessons LearnedAzure Storage - RESTfulREST is *not* TDSBe prepared to parseLINQ and XML classes helpSometimes, string parsing is the best choiceDon’t forget to close your HTTP connectionsAzure storage names are pickySo are Azure key valuesIt’s possible to create an entity in a table and not be able to update or delete it
Lessons LearnedAzure Storage – Roundtrips are expensiveOften better to pull back more than you need vs. multiple roundtripsLINQ on results in memory is fast & flexibleforeach works well toodon’t forget the break;Sort and cache tables on the web tierUse XML Serialization to write the results to local storageIt’s generally faster to hydrate from local storageNot as fast as caching in memory
Lessons LearnedAzure Storage – List<>Using List<> with entity typesList<> binds wellLINQ works well with List<>So does foreachList<> serializes wellAdd intelligence to your entitiesCompare, Equals, ToString, etc.
Blobs, Tables, Relational
SQL Server Data Services (MIX08)
Using the Cloud for StorageThis is what I’m doing on premises...DataTDSRDBMSClientDB Server
Using the Cloud for StorageSo, this is what I would like to do in the cloud...DataTDSRDBMSClientDB Server
SQL Data Services (MIX09)
SQL Azure (July 2009)
Using the Cloud for StorageSo, this is what I would like to do…DataTDSRDBMSClientSQL Azure
Using the Cloud for StorageHTTPTDSRDBMSBrowserWeb RoleSQL Azure
Using the Cloud for StorageQueueTDSHTTPRDBMSBrowserWeb RoleWorker RoleSQL Azure
Migration!
Using the Cloud for Storage“The Data Center”TDSHTTPRDBMSBrowserWeb TierBus. LogicSQL Server
Using the Cloud for Storage“The Cloud”QueueTDSHTTPRDBMSBrowserWeb RoleWorker RoleSQL Azure
Demo:  SQL Azure CTP
CTP Limitations TodaySET ANSI_NULLS ONSET ANSI_NULLS OFFPAD_INDEX  = OFFSET ANSI_PADDING OFFALLOW_ROW_LOCKS  = ONALLOW_PAGE_LOCKS  = ONON [PRIMARY]FILLFACTOR = 90Three-part naming (e.g. dbo.TableName.ColumnName)Cannot use “WITH IGNORE_DUP_KEY” w/o the quotesNo @@servernameNo CREATE SCHEMA(Not an exhaustive list)
Lessons LearnedSQL AzureFrom the database “down” it’s just SQL ServerWell, almost …Most tools don’t work todaySystem catalog is differentNo CLRAbove the database is taken care of for youYou can’t really change anything
Lessons LearnedSQL AzureSQL Server is very familiarSQL Azure *is* SQL Server in the cloudSecurity of Azure tables is unknownSQL Server has a very good pedigreeA lot of our customers LOVE SQL ServerUnderstand Azure storageUnderstand SQL AzureMake the right recommendation
Lessons LearnedSQL AzureAzure tables are *not* SQL AzureSQL Azure is not the only storage optionSQL Azure is not always the best storage optionSQL Azure costs moreDelivers a *lot* more functionalitySQL Azure is more limited on scale [today]
Queues
Simple asynchronous dispatch queueCreate and delete queuesMessage:Retrieved at least onceMax size 8kbOperations:EnqueueDequeueRemoveMessageQueues
Azure QueuesRemoveMessageGetMessage (Timeout)Worker RolePutMessageQueueMsg 1Msg 2Msg 2Msg 1Web RoleWorker RoleWorker RoleMsg 3Msg 4Msg 2
Patterns in the CloudUsing the Cloud for Multi Tenancy
“I like the idea of scaling Web roles…”Patterns for Cloud Computing
“…but need to serve multiple customers”Patterns for Cloud Computing
“Without creating separate codebases!”Patterns for Cloud Computing
Using the Cloud for Multi TenancyDatabaseWeb TierB/L TierBrowserCustomer #1
How would Jim do this today on premises?
#2 - Using the Cloud for Multi TenancyHow would Jim do this today on premises?DatabaseWeb TierB/L TierBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2DatabaseWeb TierB/L TierBrowserCustomer #3
Gets expensive pretty quickly
Using the Cloud for Multi TenancyBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3
Schema CustomizationsUI Customizations
Schema CustomizationsUI Customizations
3 options for data in multi tenant environment
Using the Cloud for Multi TenancyBrowserFixed SchemaCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserOption 1:  Everyone Uses the Same Database/SchemaCustomer #3Pros:  Simplest approach, easy to maintain/upgrade.Cons:  No customizations.  Restoring of tenant data.
Using the Cloud for Multi TenancyDatabaseBrowserCustomer #1Customer #1DatabaseWeb TierB/L TierBrowserCustomer #2Customer #2DatabaseBrowserCustomer #3Customer #3Option 2:  Give Each Customer Their Own Database/SchemaPros:  Flexible.  Tenant restore is easier.  High Isolation.Cons:  Can be costly.  Difficult to upgrade db schemas.
Using the Cloud for Multi TenancyFixed Schemawith CustomizationsBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserOption 3:  Fixed Database/Schema, with customizationsCustomer #3Pros:  Customers can add their own custom fieldsCons:  Non standard way of customizing the schema.  Tenant restore is difficult.
Using the Cloud for Multi TenancyTenant1*intTenantIDnvarcharTenantName**TypeEmployeeintTypeIDintEmployeeIdnvarcharNamenvarcharFirstNamenvarcharnvarcharCLRTypeLastName11CustomizationintCustomizationID**nvarcharValue
Using the Cloud for Multi TenancyTenant1*1TenantIDUK BranchTenantName**TypeEmployee1TypeID1EmployeeIdPostalCodeNameGordonFirstNamestringBrownCLRTypeLastName11Customization1CustomizationID**SW1A 2AAValue
Using the Cloud for Multi TenancyTenant1*2TenantIDUS BranchTenantName**TypeEmployee2TypeID2EmployeeIdZipCodeNameBarackFirstNamestringObamaCLRTypeLastName11Customization2CustomizationID**20500Value
Using the Cloud for Multi TenancyTenant1*2TenantIDFixed SchemaApplies to All TenantsCould be bothUS BranchTenantName**TypeEmployee2TypeID2EmployeeIdCustomizableTenant by Tenant BasisZipCodeNameBarackFirstNamestringObamaCLRTypeLastName11Customization2CustomizationID**20500Value
Schema CustomizationsUI Customizations
#2 - Using the Cloud for Multi TenancyBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3
URL Handing
Can ASP.NET MVC Help?
Single Controller per Tenant http://employeedata.cloudapp.net/contoso (ContosoController)http://employeedata.cloudapp.net/fabrikam(FabrikamController)
Shared Controller per Tenant http://employeedata.cloudapp.net/contoso (EmployeeController)http://employeedata.cloudapp.net/fabrikam(EmployeeController)
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)
Using the Cloud for Multi Tenancyhttp://hr.chase.co.ukBrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3http://hr.citigroup.com
Using the Cloud for Multi Tenancyhttp://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)BrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)
Using the Cloud for Multi Tenancyhttp://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)BrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2Use custom routing in ASP.NET MVCBrowserCustomer #3http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)
Demo:  Multi-Tenant Routing with ASP.NET MVCTentative
Patterns for Moving to the CloudUsing the Cloud for Communications
Jim’s organization needs to communicate with other organizationsPatterns for Cloud Computing
“This has always been a very tricky and expensive process to get working”Patterns for Cloud Computing
“Does the cloud offer anything to help?”Patterns for Cloud Computing
How would Jim have done this before?
Using the Cloud for CommunicationsTelco provided WANCompany 2Company 1ServerClientFTPServerFTPClient
Using the Cloud for CommunicationsInternetTelco provided WANCompany 2Company 1ServerClientFTPServerFTPClient
Using the Cloud for CommunicationsInternetTelco provided WANCompany 2Company 1DMZServerClientExtranetSiteBrowser
What does the cloud provide?
Using the Cloud for Communicationshttp://app.queue.core.windows.net/Azure QueueRESTClient
Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTCompany 2Client
Using the Cloud for CommunicationsxCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTCompany 2Client
Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientMaster KeyAzure QueueRESTCompany 2ClientMaster Key
Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTWeb RoleCompany 2Client
Using the Cloud for CommunicationsProxy?Company 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb RoleCompany 2ClientFirewall
Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100NAT?
Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100OK, so I’ll do a HTTP poll every minute
Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100…and how about other protocols other than HTTP?
How does the .NET Service Bus help?
Using the Cloud for CommunicationsCompany 1sb://.../myqueueClient.NET Service BusCompany 2ClientFirewallOutbound bi-directional socketKept alive in background
Using the Cloud for CommunicationsCompany 1Firewallsb://.../myqueueClientOutbound one-way socket.NET Service BusCompany 2Message routedaccordinglyClientFirewallOutbound bi-directional socketKept alive in background

More Related Content

PPTX
Saa s multitenant database architecture
PPTX
ELEKS DevTalks #4: Amazon Web Services Crash Course
PDF
Tenant-based resource allocation model for cost-effective scaling Software-as...
PDF
Open Architecture for Developing Multitenant Software-as-a-Service Applications
ODP
Multi-Tenant SOA Middleware for Cloud Computing
PPT
Cloud architecture
PPT
Multi-tenancy In the Cloud
PDF
Best Practice Public Cloud Security
Saa s multitenant database architecture
ELEKS DevTalks #4: Amazon Web Services Crash Course
Tenant-based resource allocation model for cost-effective scaling Software-as...
Open Architecture for Developing Multitenant Software-as-a-Service Applications
Multi-Tenant SOA Middleware for Cloud Computing
Cloud architecture
Multi-tenancy In the Cloud
Best Practice Public Cloud Security

What's hot (20)

PDF
Microsoft And Cloud Computing
PDF
Cloud Architecture
PPTX
Microsoft Cloud Computing
PPTX
Unit 2
PPTX
Patterns of Cloud Applications Using Microsoft Azure Services Platform
PPTX
Cloud architecture
PPTX
Cloud Resource Management
PPTX
Single vs. Multi Tenant Cost Comparison
PDF
What are cloud service models
PPTX
Cloud Service Models
DOCX
Private Cloud With System Center Project
PPTX
Cloud computing lecture 1
PPTX
Introduction to Cloud computing and Microsoft azure
PPTX
An Overview of Windows Azure
PDF
Cloud Computing - PaaS
PDF
IBM Private Cloud Solutions with IBM i
PDF
Open source and standards - unleashing the potential for innovation of cloud ...
KEY
webOS App by Example: Sorting Thoughts
PDF
Microsoft Azure : Microsoft Strategy for Cloud Computing
PDF
Cloud computing saas
Microsoft And Cloud Computing
Cloud Architecture
Microsoft Cloud Computing
Unit 2
Patterns of Cloud Applications Using Microsoft Azure Services Platform
Cloud architecture
Cloud Resource Management
Single vs. Multi Tenant Cost Comparison
What are cloud service models
Cloud Service Models
Private Cloud With System Center Project
Cloud computing lecture 1
Introduction to Cloud computing and Microsoft azure
An Overview of Windows Azure
Cloud Computing - PaaS
IBM Private Cloud Solutions with IBM i
Open source and standards - unleashing the potential for innovation of cloud ...
webOS App by Example: Sorting Thoughts
Microsoft Azure : Microsoft Strategy for Cloud Computing
Cloud computing saas
Ad

Viewers also liked (9)

PPSX
SaaS & DBaas
PDF
SaaS Security Programs: Build What You Seek
PDF
SaaS Business Acceleration 2.0
PDF
SaaS Platform Securing
PPSX
Software Design Patterns
PDF
Building a SaaS Style Application
PPTX
Cloud computing Fundamentals
PPTX
Cloud Monetization: A Step-by-Step Guide to Optimizing Your SaaS Business Model
PPT
SaaS Presentation at SCIT Conference
SaaS & DBaas
SaaS Security Programs: Build What You Seek
SaaS Business Acceleration 2.0
SaaS Platform Securing
Software Design Patterns
Building a SaaS Style Application
Cloud computing Fundamentals
Cloud Monetization: A Step-by-Step Guide to Optimizing Your SaaS Business Model
SaaS Presentation at SCIT Conference
Ad

Similar to Real World Azure - Dev (20)

PPTX
Real World Azure - IT Pros
PPTX
Global Windows Azure Bootcamp - San Diego
PPTX
Microsoft Azure & Hybrid Cloud
PPTX
Microsoft Partner Roadshow - To the Cloud
PDF
Windows Azure introduction
PPTX
70 533 - Module 01 - Introduction to Azure
PPTX
Windows Azure & How to Deploy Wordress
PPTX
Azure rev002
PPT
128692851-Introducing-Windows-Azure.ppt
PPTX
SeattleUniv-IntroductionToCloudComputing-WinsowsAzure101
PPTX
Charla Azure TLF.pptx
PPTX
Cloud application architecture with sql azure and windows azure
PPTX
Sky High With Azure
PPTX
Azure and web sites hackaton deck
PPTX
What's New for the Windows Azure Developer? Lots!!
PPTX
Cloud computing
PPTX
Microsoft-Azure-Overvi2222222222222ew.pptx
PPTX
Jumpstart Azure
PPTX
Microsoft And The Cloud
PPTX
The Windows Azure Platform (MSDN Events Series)
Real World Azure - IT Pros
Global Windows Azure Bootcamp - San Diego
Microsoft Azure & Hybrid Cloud
Microsoft Partner Roadshow - To the Cloud
Windows Azure introduction
70 533 - Module 01 - Introduction to Azure
Windows Azure & How to Deploy Wordress
Azure rev002
128692851-Introducing-Windows-Azure.ppt
SeattleUniv-IntroductionToCloudComputing-WinsowsAzure101
Charla Azure TLF.pptx
Cloud application architecture with sql azure and windows azure
Sky High With Azure
Azure and web sites hackaton deck
What's New for the Windows Azure Developer? Lots!!
Cloud computing
Microsoft-Azure-Overvi2222222222222ew.pptx
Jumpstart Azure
Microsoft And The Cloud
The Windows Azure Platform (MSDN Events Series)

More from Clint Edmonson (20)

PPTX
New Product Concept Design.pptx
PPTX
Lean & Agile Essentials
PPTX
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
PPTX
Flow, the Universe and Everything
PPTX
Application architecture jumpstart
PPTX
Code smells and Other Malodorous Software Odors
PPTX
State of agile 2016
PPTX
Lean & Agile DevOps with VSTS and TFS 2015
PPTX
Application Architecture Jumpstart
PPTX
Agile Metrics That Matter
PPTX
Advanced oop laws, principles, idioms
PPTX
Application architecture jumpstart
PPTX
ADO.NET Entity Framework
PPTX
Windows 8 - The JavaScript Story
PPTX
Windows Azure Jumpstart
PPTX
Introduction to Windows Azure Virtual Machines
PPTX
Peering through the Clouds - Cloud Architectures You Need to Master
PPTX
Architecting Scalable Applications in the Cloud
PPTX
Windows Azure jumpstart
PPTX
Windows Azure Virtual Machines
New Product Concept Design.pptx
Lean & Agile Essentials
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
Flow, the Universe and Everything
Application architecture jumpstart
Code smells and Other Malodorous Software Odors
State of agile 2016
Lean & Agile DevOps with VSTS and TFS 2015
Application Architecture Jumpstart
Agile Metrics That Matter
Advanced oop laws, principles, idioms
Application architecture jumpstart
ADO.NET Entity Framework
Windows 8 - The JavaScript Story
Windows Azure Jumpstart
Introduction to Windows Azure Virtual Machines
Peering through the Clouds - Cloud Architectures You Need to Master
Architecting Scalable Applications in the Cloud
Windows Azure jumpstart
Windows Azure Virtual Machines

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Unlocking AI with Model Context Protocol (MCP)
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Real World Azure - Dev

  • 1. MSDN Events Presents:Real World Azureclint edmonson | architect evangelist | www.notsotrivial.netmike benkovich | developer evangelist | www.benkotips.com
  • 2. This is JimPatterns for Cloud Computing
  • 3. Jim has many questions about cloud computingPatterns for Cloud Computing
  • 4. The more he reads, the more confused he gets Patterns for Cloud Computing
  • 5. “What is Cloud Computing?”Patterns for Cloud Computing
  • 6. “What can I use the Cloud for?”Patterns for Cloud Computing
  • 7. “What is Microsoft’s roadmap in this space?”Patterns for Cloud Computing
  • 9. Define Cloud ComputingBreak down the partsHighlight the implementation of a Real World Azure scenario
  • 11. Jim has heard all the buzzwords
  • 14. Software as a Service
  • 16. Are any of these cloud computing?
  • 17. Styles of application architecture
  • 18. These styles can work in the cloud, but they are not cloud computing
  • 19. Where do your applications “live”?
  • 21. “What is Microsoft doing in Cloud Computing?”
  • 22. 3 x Critical Concepts
  • 26. Patterns for Cloud ComputingUsing the Cloud for Scale
  • 27. “Isn’t the cloud good for applications that need to scale dynamically?”Patterns for Cloud Computing
  • 28. For example, tax applicationsPatterns for Cloud Computing
  • 29. “How does this work?”Patterns for Cloud Computing
  • 30. Let’s do some white boarding for Jim…Patterns for Cloud Computing
  • 31. Using the Cloud for Scale“Wow! What a great site!”DatabaseRequestWeb TierB/L TierBrowserResponse
  • 32. Using the Cloud for ScaleBrowserBrowserDatabaseWeb TierB/L TierBrowser“Server Busy”BrowserBrowser
  • 33. Using the Cloud for ScaleBrowserBrowserDatabaseWeb TierB/L TierBrowser“Timeout”BrowserBrowser
  • 34. How would Jim do this today on premises?
  • 35. Using the Cloud for ScaleHow would Jim do this today on premises?BrowserWeb TierN L BBrowserDatabaseWeb TierB/L TierBrowserBrowserWeb TierBrowser
  • 36. Using the Cloud for ScaleHow would Jim do this today on premises?BrowserB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserB/L TierBrowser
  • 37. Using the Cloud for ScaleHow would Jim do this today on premises?BrowserWeb TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser
  • 38. Using the Cloud for ScaleHow would Jim do this today on premises?Browserp1 p2 p3Web TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser
  • 40. Using the Cloud for ScaleHow would Jim do this today on premises?Browserp1 p2 p3Web TierN L BB/L TierN L BBrowserDatabaseWeb TierBrowserB/L TierBrowserWeb TierB/L TierBrowser“That took a lot of work - and money!”
  • 41. Using the Cloud for ScaleHow would Jim do this today on premises?p1 p2 p3“Not so great now…”Web TierN L BB/L TierN L BDatabaseWeb TierBrowserB/L TierWeb TierB/L Tier“That took a lot of work - and money!”“Hmmm... Most of this stuff is sitting idle...”
  • 42. Using the Cloud for ScaleDatacenter peak loadIdle timeUsageJanAprJulOct
  • 43. How can Windows Azure help?
  • 44. Using the Cloud for Scale“Wow! What a great site!”Azure StorageRequestWeb RoleWorker RoleBrowserResponse
  • 45. Using the Cloud for ScaleBrowserBrowserAzureStorageWeb RoleWorker RoleBrowser“Server Busy”BrowserBrowser
  • 47. Using the Cloud for ScaleBrowserWeb RoleN L BBrowserAzureStorageWeb RoleWorker RoleBrowserBrowserWeb RoleBrowserYou don’t see this bit
  • 48. Using the Cloud for ScaleBrowserWeb RoleN L BWorker RoleN L BBrowserAzureStorageWeb RoleBrowserWorker RoleBrowserWeb RoleWorker RoleBrowser
  • 49. Using the Cloud for ScaleBrowserp1 p2 p3Web RoleN L BWorker RoleN L BBrowserAzureStorageWeb RoleBrowserWorker RoleBrowserWeb RoleWorker RoleBrowser
  • 50. What’s going on behind the scenes?
  • 55. On to the Case Study…
  • 56. RXD Incubation ProjectProject VisionProject Austin delivers a next-generation, micro-community based opportunity management and collaboration experience to our managed partners …Project GoalsGain first-hand experience on AzureCloud Storage – Security – Integration – Web – SQL AzureExplore a business scenario that leverages the promises of the cloudProvide enterprise feedback to the Azure teamDeliver a working prototype in FY09Project Austin Overview
  • 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
  • 58. Web RoleMulti-Tenant; Web App; Web ServiceIntegrationWorker Role; .NET Service Bus; SiebelData StorageTables; Blobs; Queues; SQL AzureLive ID IntegrationWeb Auth; Access Control Service; WIF; RPSTechnical Overview
  • 59. CommunityCommunity Micro CommunityFactoryCommunityCommunityCommunityGroupsCommunity Group ACommunity Group BPersonalizationMembershipContentPersonalizationMembershipContentHigh Level ServicesPersonalizationCustomizationContentSecurityIntegration…NavigationSearchMembershipIdentityGroups…Foundation ServicesIdentitySecurityStorageEventingConfigContent…Micro CommunityCompute59
  • 62. (TODO: Insert Austin Screenshots or walkthrough application)
  • 63. (Transition to Developer Evangelist…)This slide is Hidden
  • 64. 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.
  • 66. 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.something@microsoft.com
  • 68. Visual StudioTemplatesDebugging.NET platform.NET, IIS7, WCF“The cloud on your desktop”Complete offline cloud simulationLike Cassini (web development server)Consistent, Familiar Development
  • 69. Write code on your development machineTest locallyBuild package w/VS ToolsUpload your package to the web portalPush “deploy”Monitor, upgrade, scale…Publishing Your Service To The Cloud
  • 70. Demo: Developer Experience
  • 71. RolesWeb RoleWorker RoleWindows Server 2008 x64.NET StartNative CodeUser ModeWindows Server 2008 x64
  • 72. IIS 7
  • 76. User ModeDemo: Guest Book
  • 77. Service Models & RolesBid Now ServiceWorker XWeb A(port 80)Main Web100 instancesImage Resize2 instancesWorker YAuction Processing25 instancesWeb B (port 8081)Admin2 instancesWorker ZNotifications10 instances
  • 78. Debugging the cloud really means loggingSimple logging API todayMore functionality over timeDebugging in the Cloud
  • 79. Demo: Guest Book Logging
  • 80. Storage in the Cloud…
  • 83. Blobs stored in Containers1 or more Containers per accountScoping is at container level…/Container/blobpathBlobsCapacity 50GB in CTPMetadata, accessed independently name/value pairs (8kb total)Private or Public container accessUse Blobs for file systemBlobs
  • 84. Using the Cloud for StorageBlob ContainerPutBlobPUT http://account.blob.core.windows./net/containername/blobnameAzure Blob StorageREST APIClienthttp://account.blob.core.windows.net/containername/blobnamePutBlob = 64Mb MAXMetaData = 8Kb per Blob
  • 85. Using the Cloud for StorageBlob ContainerAzure Blob StorageREST APIClientGetBlobGET http://account.blob.core.windows./net/containername/blobnamehttp://account.blob.core.windows.net/containername/blobname
  • 86. Using the Cloud for StorageBlob ContainerAzure Blob StorageREST APIClientGetBlobGET http://account.blob.core.windows./net/containername/blobnameRange: bytes=329300 - 730000http://account.blob.core.windows.net/containername/blobname
  • 87. Using the Cloud for StorageBlob ContainerPutBlock(blobname, blockid, data)PutBlockList(blobname, blockid1, …, blockidN)Azure Blob StorageREST APIClienthttp://account.blob.core.windows.net/containername/blobnamePutBlock = 4Mb MAX to a maximum of 50GbBlockId = 64 bytes
  • 89. Using the Cloud for StorageREST: GET http://account.table.core.windows.net/Customer?$filter=%20PartitionKey%20eq%20valueLINQ:var customers = from o in context.CreateQuery<customer>(“Customer”) where o.PartitionKey == value select o;AzureTable StorageWorker Rolehttp://account.table.core.windows.netEach Table: PartitionKey (e.g. DocumentName) to ensure scalabilityRowKey (e.g. version number)[fields] for data
  • 90. Entities and properties (rows & columns)Tables scoped by accountDesigned for billions+Scale-out using partitionsPartition key & row keyOperations performed on partitionsEfficient queriesNo limit on number of partitionsUse ADO.NET Data ServicesTables
  • 91. Provides structured storageMassively scalable tables (TBs of data)Highly availableDurableFamiliar and easy-to-use APIADO.NET Data Services – .NET 3.5 SP1.NET classes and LINQREST – with any platform or languageIntroduction to Tables
  • 92. For scalable applications:Billions of rows, TBs of dataAutomatic load management (hot data)For online applications:High availabilityBuilt-in replicationFlexible schema (no big “schema migration”)Optimistic concurrencyAdvantages
  • 93. No joinNo group byNo order byThink: relational DB partitioned to the maxNot a Relational Database
  • 94. TableA Table is a set of Entities (rows)An Entity is a set of Properties (columns)EntityTwo “key” properties form unique IDPartitionKey – enables scaleRowKey – uniquely ID within a partitionData Model
  • 95. Key Example – Blog PostsPartition 1Partition 2Getting all of dunnry’s blog posts is fastSingle partitionGetting all posts after 2008-03-27 is slowTraverse all partitions
  • 96. Partition Key – how data is partitionedRow Key – unique in partition, defines sortGoalsKeep partitions small (increased scalability)Specify partition key in common queriesQuery/sort on row keyKeys
  • 97. Tradeoff between locality and scalabilityConsiderationsEntity group transactionsQuery efficiencyScalabilityFlexible PartitioningChoosing a Partition Key
  • 98. Pick potential keys (common query filters)Order keys by importanceIf needed, include an additional unique keyUse two most important keys as PK, RKConsider concatenating to form keysA Method of Choosing Keys
  • 99. A Method for Choosing Keys…Pick potential keys (common query filters)
  • 100. Order keys by importance
  • 101. If needed, include an additional unique key
  • 102. Use two most important keys as PK, RK
  • 103. Consider concatenating to form keysNon-key queries are scansImprove performance by scopingUsually by partition keyBut what about by table?3 tablesTop 1,000 popular itemsTop 10,000 popular itemsEverythingNow arbitrary “top 1,000” queries are fastBetter locality than clever partition keysMultiple Tables, Same Keys
  • 104. Demo: Guest Book Table Storage
  • 105. Lessons LearnedAzure StorageAzure tables are *not* a relational databaseRequires a mind shiftAzure tables scale3 - 9s availabilityAzure tables support exactly one keyPartitionKey + RowKeyCase MattersNo foreign keysNo referential integrityNo stored proceduresLeverage the community
  • 106. Lessons LearnedAzure StorageAzure storage Client LibraryNo longer just a “sample”Azure storage is available via RESTNot limited to Azure hosted appsNot limited to Microsoft platform or toolsGetting the signature correct is the hard partConsole tools are easy to writeUltimate flexibilityUse the REST interface early as you’re versioning your tables
  • 107. Lessons LearnedAzure Storage - RESTfulREST is *not* TDSBe prepared to parseLINQ and XML classes helpSometimes, string parsing is the best choiceDon’t forget to close your HTTP connectionsAzure storage names are pickySo are Azure key valuesIt’s possible to create an entity in a table and not be able to update or delete it
  • 108. Lessons LearnedAzure Storage – Roundtrips are expensiveOften better to pull back more than you need vs. multiple roundtripsLINQ on results in memory is fast & flexibleforeach works well toodon’t forget the break;Sort and cache tables on the web tierUse XML Serialization to write the results to local storageIt’s generally faster to hydrate from local storageNot as fast as caching in memory
  • 109. Lessons LearnedAzure Storage – List<>Using List<> with entity typesList<> binds wellLINQ works well with List<>So does foreachList<> serializes wellAdd intelligence to your entitiesCompare, Equals, ToString, etc.
  • 111. SQL Server Data Services (MIX08)
  • 112. Using the Cloud for StorageThis is what I’m doing on premises...DataTDSRDBMSClientDB Server
  • 113. Using the Cloud for StorageSo, this is what I would like to do in the cloud...DataTDSRDBMSClientDB Server
  • 114. SQL Data Services (MIX09)
  • 116. Using the Cloud for StorageSo, this is what I would like to do…DataTDSRDBMSClientSQL Azure
  • 117. Using the Cloud for StorageHTTPTDSRDBMSBrowserWeb RoleSQL Azure
  • 118. Using the Cloud for StorageQueueTDSHTTPRDBMSBrowserWeb RoleWorker RoleSQL Azure
  • 120. Using the Cloud for Storage“The Data Center”TDSHTTPRDBMSBrowserWeb TierBus. LogicSQL Server
  • 121. Using the Cloud for Storage“The Cloud”QueueTDSHTTPRDBMSBrowserWeb RoleWorker RoleSQL Azure
  • 122. Demo: SQL Azure CTP
  • 123. CTP Limitations TodaySET ANSI_NULLS ONSET ANSI_NULLS OFFPAD_INDEX  = OFFSET ANSI_PADDING OFFALLOW_ROW_LOCKS  = ONALLOW_PAGE_LOCKS  = ONON [PRIMARY]FILLFACTOR = 90Three-part naming (e.g. dbo.TableName.ColumnName)Cannot use “WITH IGNORE_DUP_KEY” w/o the quotesNo @@servernameNo CREATE SCHEMA(Not an exhaustive list)
  • 124. Lessons LearnedSQL AzureFrom the database “down” it’s just SQL ServerWell, almost …Most tools don’t work todaySystem catalog is differentNo CLRAbove the database is taken care of for youYou can’t really change anything
  • 125. Lessons LearnedSQL AzureSQL Server is very familiarSQL Azure *is* SQL Server in the cloudSecurity of Azure tables is unknownSQL Server has a very good pedigreeA lot of our customers LOVE SQL ServerUnderstand Azure storageUnderstand SQL AzureMake the right recommendation
  • 126. Lessons LearnedSQL AzureAzure tables are *not* SQL AzureSQL Azure is not the only storage optionSQL Azure is not always the best storage optionSQL Azure costs moreDelivers a *lot* more functionalitySQL Azure is more limited on scale [today]
  • 127. Queues
  • 128. Simple asynchronous dispatch queueCreate and delete queuesMessage:Retrieved at least onceMax size 8kbOperations:EnqueueDequeueRemoveMessageQueues
  • 129. Azure QueuesRemoveMessageGetMessage (Timeout)Worker RolePutMessageQueueMsg 1Msg 2Msg 2Msg 1Web RoleWorker RoleWorker RoleMsg 3Msg 4Msg 2
  • 130. Patterns in the CloudUsing the Cloud for Multi Tenancy
  • 131. “I like the idea of scaling Web roles…”Patterns for Cloud Computing
  • 132. “…but need to serve multiple customers”Patterns for Cloud Computing
  • 133. “Without creating separate codebases!”Patterns for Cloud Computing
  • 134. Using the Cloud for Multi TenancyDatabaseWeb TierB/L TierBrowserCustomer #1
  • 135. How would Jim do this today on premises?
  • 136. #2 - Using the Cloud for Multi TenancyHow would Jim do this today on premises?DatabaseWeb TierB/L TierBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2DatabaseWeb TierB/L TierBrowserCustomer #3
  • 138. Using the Cloud for Multi TenancyBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3
  • 141. 3 options for data in multi tenant environment
  • 142. Using the Cloud for Multi TenancyBrowserFixed SchemaCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserOption 1: Everyone Uses the Same Database/SchemaCustomer #3Pros: Simplest approach, easy to maintain/upgrade.Cons: No customizations. Restoring of tenant data.
  • 143. Using the Cloud for Multi TenancyDatabaseBrowserCustomer #1Customer #1DatabaseWeb TierB/L TierBrowserCustomer #2Customer #2DatabaseBrowserCustomer #3Customer #3Option 2: Give Each Customer Their Own Database/SchemaPros: Flexible. Tenant restore is easier. High Isolation.Cons: Can be costly. Difficult to upgrade db schemas.
  • 144. Using the Cloud for Multi TenancyFixed Schemawith CustomizationsBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserOption 3: Fixed Database/Schema, with customizationsCustomer #3Pros: Customers can add their own custom fieldsCons: Non standard way of customizing the schema. Tenant restore is difficult.
  • 145. Using the Cloud for Multi TenancyTenant1*intTenantIDnvarcharTenantName**TypeEmployeeintTypeIDintEmployeeIdnvarcharNamenvarcharFirstNamenvarcharnvarcharCLRTypeLastName11CustomizationintCustomizationID**nvarcharValue
  • 146. Using the Cloud for Multi TenancyTenant1*1TenantIDUK BranchTenantName**TypeEmployee1TypeID1EmployeeIdPostalCodeNameGordonFirstNamestringBrownCLRTypeLastName11Customization1CustomizationID**SW1A 2AAValue
  • 147. Using the Cloud for Multi TenancyTenant1*2TenantIDUS BranchTenantName**TypeEmployee2TypeID2EmployeeIdZipCodeNameBarackFirstNamestringObamaCLRTypeLastName11Customization2CustomizationID**20500Value
  • 148. Using the Cloud for Multi TenancyTenant1*2TenantIDFixed SchemaApplies to All TenantsCould be bothUS BranchTenantName**TypeEmployee2TypeID2EmployeeIdCustomizableTenant by Tenant BasisZipCodeNameBarackFirstNamestringObamaCLRTypeLastName11Customization2CustomizationID**20500Value
  • 150. #2 - Using the Cloud for Multi TenancyBrowserCustomer #1DatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3
  • 153. Single Controller per Tenant http://employeedata.cloudapp.net/contoso (ContosoController)http://employeedata.cloudapp.net/fabrikam(FabrikamController)
  • 154. Shared Controller per Tenant http://employeedata.cloudapp.net/contoso (EmployeeController)http://employeedata.cloudapp.net/fabrikam(EmployeeController)
  • 155. 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)
  • 156. Using the Cloud for Multi Tenancyhttp://hr.chase.co.ukBrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3http://hr.citigroup.com
  • 157. Using the Cloud for Multi Tenancyhttp://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)BrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2BrowserCustomer #3http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)
  • 158. Using the Cloud for Multi Tenancyhttp://hr.chase.co.uk -> CNAME (employeedata.cloudapp.net)BrowserCustomer #1http://employeedata.cloudapp.netDatabaseWeb TierB/L TierBrowserCustomer #2Use custom routing in ASP.NET MVCBrowserCustomer #3http://hr.citigroup.com -> CNAME (employeedata.cloudapp.net)
  • 159. Demo: Multi-Tenant Routing with ASP.NET MVCTentative
  • 160. Patterns for Moving to the CloudUsing the Cloud for Communications
  • 161. Jim’s organization needs to communicate with other organizationsPatterns for Cloud Computing
  • 162. “This has always been a very tricky and expensive process to get working”Patterns for Cloud Computing
  • 163. “Does the cloud offer anything to help?”Patterns for Cloud Computing
  • 164. How would Jim have done this before?
  • 165. Using the Cloud for CommunicationsTelco provided WANCompany 2Company 1ServerClientFTPServerFTPClient
  • 166. Using the Cloud for CommunicationsInternetTelco provided WANCompany 2Company 1ServerClientFTPServerFTPClient
  • 167. Using the Cloud for CommunicationsInternetTelco provided WANCompany 2Company 1DMZServerClientExtranetSiteBrowser
  • 168. What does the cloud provide?
  • 169. Using the Cloud for Communicationshttp://app.queue.core.windows.net/Azure QueueRESTClient
  • 170. Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTCompany 2Client
  • 171. Using the Cloud for CommunicationsxCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTCompany 2Client
  • 172. Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientMaster KeyAzure QueueRESTCompany 2ClientMaster Key
  • 173. Using the Cloud for CommunicationsCompany 1http://app.queue.core.windows.net/ClientAzure QueueRESTWeb RoleCompany 2Client
  • 174. Using the Cloud for CommunicationsProxy?Company 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb RoleCompany 2ClientFirewall
  • 175. Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100NAT?
  • 176. Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100OK, so I’ll do a HTTP poll every minute
  • 177. Using the Cloud for CommunicationsCompany 1Firewallhttp://app.queue.core.windows.net/ClientAzure QueueRESTWeb Role65.55.33.204Company 2ClientFirewall192.168.14.100…and how about other protocols other than HTTP?
  • 178. How does the .NET Service Bus help?
  • 179. Using the Cloud for CommunicationsCompany 1sb://.../myqueueClient.NET Service BusCompany 2ClientFirewallOutbound bi-directional socketKept alive in background
  • 180. Using the Cloud for CommunicationsCompany 1Firewallsb://.../myqueueClientOutbound one-way socket.NET Service BusCompany 2Message routedaccordinglyClientFirewallOutbound bi-directional socketKept alive in background
  • 181. Austin Integration with Siebel (on-premise)AustinBlobTableQueuesb://.../myqueueOn-Premise DataCenter.NET Service BusSynchronization MessageFirewallbi-directional socketKept alive in backgroundSiebelOpp. ExchangeService
  • 182. Demo: Integration through the .NET Service Bus
  • 183. High Level of AbstractionHardwareServer OSNetwork InfrastructureWeb ServerAvailabilityAutomated Service ManagementScalabilityInstance & PartitionsDeveloper ExperienceFamiliar Developer ToolsWindows Azure Benefits
  • 184. ResourcesAzure Services Training KitDownloadable hands-on labs, demos, and presentationshttp://www.azure.comBlogshttp://blog.smarx.com – Steve Marxhttp://blogs.msdn.com/clemensv - Clemens Vasters (.NET Services)Azure Services Platform Forumshttp://www.microsoft.com/azure/blog.mspx
  • 185. (Transition to Architect Evangelist for wrap-up…)Highlight customer wins or Partner experiences
  • 186. Q&A
  • 187. Collect surveys and Hand out tokens
  • 189. From start to finish in two weeksWest Monroe Partners asked to develop an interactive, printable map for the 2009 Taste of Chicago’s two million visitors
  • 190. 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 placeTaste 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]
  • 191. “Be This Close”Country Music Festival 2009Compelling Silverlight/DeepZoom experience leveraging Windows Azure as the storage mechanism
  • 192. Less than 1 hour to get up and running on Azure
  • 193. 850 high resolution photos broken into x,000 tiles
  • 194. Week a half to build Azure support[play it online]“Windows Azure was a breeze to use and didn't let us down.”Ben Henderson, Firefly Logic
  • 195. Customer Costs Reduced 60 PercentDelivers 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.”RanjithRamakrishnan, Chief Technology Officer for Cumulux
  • 196. What do I get?MSDN PremiumPhone and Online Technical SupportProfiled on Microsoft and other web propertiesHow do I qualify?Building software or software services
  • 198. In business for less than 3 years
  • 199. Less than US $1 million in annual revenue contact briangorbettbgorbett@microsoft.com425-538-0050
  • 200. dave.bost@microsoft.comhttp://davebost.com/blog© 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.

Editor's Notes

  • #52: Here’s the datacenter in the cloudA collection of commodity hardwareA collection of storage servers; triple replicationLoad BalancersFabric Controller: the “Brains” behind it all. Web Portal: where to deploy and manage applicationsService – any app you want to run is the service.It’s about running your service in the Microsoft datacenter. Windows Azure is not a SKU that you would install onsite.
  • #53: = Service Deployment (So easy, even a CEO can do it) =Service, the application you want to runModel, service configuration; tells what the service looks like, how many you want to run, etc.Today, you must deploy your service through the portal. In the future, there will be an API available that will you to deploy your service through command-line, TFS build procedures, and other types of automation In this scenario, we are deploying our service through the portal. We upload the two files (the service package and model configuration). The Fabric Controller reads the model configuration which describes how to deploy our service. In this case, we are deploying our service to 3 machines. The Fabric Controller determines which 3 machines to deploy to, copies the service package to the 3 machines, and fires up the services. [Transition] The Fabric Controller then configures the DNS so you have an endpoint exposed for your services for the outside world to communicate with your services. From there, it configures the load balancers and routers. That’s it. It’s completed automated.
  • #57: Managed partner pipeline review -opps in Seibel, partner, PAM; get together and collaborate on opps - more social collaboration, ability to comment, ability to bring people inDidn’t do much in SQL Azure as it wasn’t available at the timeAccomplished goals in 5 mos.
  • #59: Web role - support for multi-tennancy (host multiple customers or segments on set of infrastructure) - web service for updating the opportunity information.NET Service Bus was used to integrate on the backend with SeibelMoved worker role inside firewall as it made more sense (on premise)Heavy use of Tables and BlobsMost Queue work is done with the .NET Service Bus under-the-covers; not a whole lot of work writing directly to QueuesDuring development, SDS did a reset and became SQL Azure; use Azure storage until SQL Azure becomes available (one of the best decisions they made)
  • #60: Community wants to control Personalization, Content, Membership
  • #61: TODO: Convert to Whiteboard template
  • #62: TODO: Convert to Whiteboard template
  • #67: We will bend over backwards to help you out.
  • #80: BlobsBlobs are stored in containers. There are 0 or more blobs per container and 0 or more containers per account. (since you can have 0 containers, but then you would not have any blobs either)Typically url in the cloud is http://accountname.blob.core.windows.net/container/blobpathBlob paths can contain the / character, so you can give the illusion of multiple folders, but there is only 1 level of containers.Blob capacity at CTP is 50gb.There is an 8k dictionary that can be associated with blobs for metadata.Blobs can be private or public:Private requires a key to read and writePublic requires a key to write, but NO KEY to read.Use blobs where you would use the file system in the past.
  • #87: Tables are simply collections of Entities.Entites must have a PartitionKey and RowKey – can also contain up to 256 other properties.Entities within a table need not be the same shape! E.g.:Entity 1: PartitionKey, RowKey, firstnameEntity 2: PartitionKey, RowKey, firstname, lastnameEntity 3: PartitionKey, Rowkey, orderId, orderData, zipCodePartitions are used to spread data across multiple servers. This happens automatically based on the partition key you provide. Table “heat” is also monitored and data may be moved to different storage endpoints based upon usage.Queries should be targeted at a partition, since there are no indexes to speed up performance. Indexes may be added at a later date.Its important to convey that whilst you could copy tables in from a local data source (e.g. sql) it would not perform well in the cloud, data access needs to be re-thought at this level. Those wanting a more traditional SQL like experience should investigate SDS.
  • #88: Hosted in Microsoft data centersFor massive scalable applicationsWe’re talking millions of rows, terabytes of dataStorage is one of the pieces of the Azure PlatformIt is NOT relationalWe can take hot data, the data that’s being requested more often, and scale those out to more serversDesigned for online, high-scale, high-throughput applicationsFamiliar if you’re used to .NET, LINQ and ADO.NET Data ServicesShared-key authentication between client and server
  • #89: 05:17Flexible schema, tables don’t have to have the same columns (properties) defined up front; this is not an ‘Add Column’ or ‘Update Schema’Optimistic concurrency, protects you from someone else from modifying your data while you’re working on it
  • #90: 07:17It’s an “Entity Store”, you can store entities, can retrieve entities, do simple querying on these entitiesPartitioned SQL Server: - A-M on this server - N-Z on this serverTop 5 customers that ordered the most, you have to poll 26 servers and aggregate the dataThat’s sort of what we have with Azure Table storage. We went with a highly partitioned approach upfront to gain scale and gain availability. We’ve had to sacrifice some of the complex queries such as joins to support this. It’s just a different way of having to deal with your data.
  • #91: 09:18Entities (Rows)Properties (Columns)An Entity has 2 “Key” properties: -PartitionKey: How to partition data (ie. First-letter of last name, zip code) - every entity will be on the SAME physical server, this sets us up for scale - a good strategy is to keep your partitions small - RowKey: a unique identifier within a partition
  • #92: 11:53Getting the all of dunnry’s post it fast because we’re selecting the entities by a partition keyGetting all of the posts after a certain is slow because we may have to traverse across multiple servers because we’re selecting entities that span partition keysA query without the partition key is really a scan
  • #93: 14:58Keep partitions small, this increases scalability; this allows us to replicate data when its hot and spread data across multiple servers
  • #94: 16:34Whitepaper: Windows Azure Table - Programming Azure Tables, http://go.microsoft.com/fwlink/?LinkId=153401Locality, in working with your entities, you want them to be on the same server or close together; you gain locality by having large partitionsBut… for scalability, we said that you want smaller partitions so we can help manage the distribute the data and therefore the loadScalability is defined on who well you can manage your partition sizesConsiderations: - the only transaction we have our within the same table with the same partition key; take your transactional requirements into consideration when defining you want to partition your data - query efficiency; think through the top queries you want to execute - scalability: managing the size of your partitions - flexible partitioning : A-M, N-Z; change to A-M, N-R, S-Z - partitioning scheme by months (holiday sales, by month but in december by day)
  • #95: 21:51A simple formula for choosing keys (more info in the whitepaper)Potential keys… what are you going to query onOrder by importanceMay need additional information to make it unique (add a GUID)
  • #97: 23:35If you do a query on a non-key property, that’s a scan (very inefficient)Improve performance by scoping - by partition key, and range of row keys - scope by tables (came up in some customer discussions); users have arbitrary queries, no good set of keys (only querying from top 1000 items), make a table of just those 1000 items - data will be replicated but you can determine which partition to query from based on query typeIs it OK to duplicate data? Efficiency over consistency and slowing down updates - Certain types of applications
  • #99: 30:29One of the more important things to understand*NOT* a relational databaseBad – indexes, foreign keys, referential integrity don’t existGood – it scales!Have to write lower level code for Azure table access vs. SQL ServerStorage in triplicateOur experience is Azure storage has been remarkably stable during the CTP; amazing as it’s a CTP and its brand new codeIt is CASE SENSITIVELot of learning in the community
  • #100: 46:44During development, Azure Storage Client library was a sample; they couldn’t use a sample; since then its shipping as part of the SDK (production quality)Leverage client library where you canAzure storage is available via RESTThe hardest part is getting the signature right; its very picky (tutorial available on bartr’s blog)Client library uses ADO.NET Data ServicesSometimes its faster to just pull back a simple string then spin up a bunch of ADO.NET Data Services objectsREST is easier for dealing with versioning
  • #101: 49:23REST requires a lot of parsingLINQ and XML make it easy, but sometimes parsing is easier (and maybe the only thing needed)CLOSE your HTTP connections; wrap in ‘using’ block or physically close themStorage names are picky
  • #102: 50:32Drop table/Create table has about 30-40 sec lag timeOften better to get more data then you need (goes against T-SQL best practices)
  • #103: 52:34List<> is your friend; works well, serializes well, binds wellThe team used this to work with the azure table data
  • #118: 53:20(watch Dave Campbell session on SQL Azure)
  • #119: 54:32SQL Server is very familiar, Azure tables are new and unknownSQL Server will not scale as well for V1; make the right choice for your needs
  • #120: 56:09SQL Azure costs more, but delivers moreDBA’s don’t have the tools available yet to monitor SQL Azure… system catalog is different in the cloud then on premise… this is forthcoming
  • #122: Queues are simple:Messages are placed in queues. Max size is 8k (and it’s a string)Message can be read from the queue, at which point it is hidden.Once whatever read the message from the queue is finished processing the message, it should then remove the message from the queue. If not the message is returned to the queue after a specific user defined time limit. This can be used to handle code failures etc.
  • #123: Use queues as a way of communicating w/ the backend worker rolesWRs call getmessage and pass timeoutTimeout value is importantExpiration time is important; message is marked in the queue as invisible; for duration of timeout it’s invisibleWhen we’re done processing, we call a message to remove the message through a deleteTh reason we do this is imagine we have a second worker role; if something goes wrong, once the timeout expires, the message becomes visible, and the next person to do a get message will get the message
  • #176: C:Program Files (x86)Microsoft .NET Services SDK (July 2009 CTP)SamplesServiceBusGettingStartedEcho
  • #183: If you are or know someone starting a software business, get started building applications for Windows Azure * by joining BizSpark!*inclusion of Windows Azure in the BizSpark program is still being finalized and there is no public information on this topic we can share