Your SlideShare is downloading. ×
Real World Azure - Dev
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Real World Azure - Dev

4,123

Published on

MSDN Events Presents – for the Developer & Architect from …

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

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,123
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
125
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 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.
  • = 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.
  • 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.
  • 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)
  • Community wants to control Personalization, Content, Membership
  • TODO: Convert to Whiteboard template
  • TODO: Convert to Whiteboard template
  • We will bend over backwards to help you out.
  • 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.
  • 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.
  • 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
  • 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
  • 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.
  • 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
  • 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
  • 14:58Keep partitions small, this increases scalability; this allows us to replicate data when its hot and spread data across multiple servers
  • 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)
  • 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)
  • 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
  • 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
  • 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
  • 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
  • 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)
  • 52:34List<> is your friend; works well, serializes well, binds wellThe team used this to work with the azure table data
  • 53:20(watch Dave Campbell session on SQL Azure)
  • 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
  • 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
  • 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.
  • 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
  • C:Program Files (x86)Microsoft .NET Services SDK (July 2009 CTP)SamplesServiceBusGettingStartedEcho
  • 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
  • Transcript

    • 1. MSDN Events Presents:Real World Azure
      clint edmonson | architect evangelist | www.notsotrivial.net
      mike benkovich | developer evangelist | www.benkotips.com
    • 2. This is Jim
      Patterns for Cloud Computing
    • 3. Jim has many questions about cloud computing
      Patterns 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
    • 8.
    • 9. Define Cloud Computing
      Break down the parts
      Highlight the implementation of a Real World Azure scenario
    • 10.
    • 11. Jim has heard all the buzzwords
    • 12. Service Oriented Architecture
    • 13. Rich Internet Applications
    • 14. Software as a Service
    • 15. Software + Services
    • 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”?
    • 20. On Premises
      Hosted
      Cloud
      Vendor’s Problem
    • 21. “What is Microsoft doing in Cloud Computing?”
    • 22. 3 x Critical Concepts
    • 23. Roles
      Web Role
      Worker Role
    • 24. Storage
      Table, Blob, Relational
    • 25. Messaging
      Queues
    • 26. Patterns for Cloud Computing
      Using 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 applications
      Patterns 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!”
      Database
      Request
      Web Tier
      B/L Tier
      Browser
      Response
    • 32. Using the Cloud for Scale
      Browser
      Browser
      Database
      Web Tier
      B/L Tier
      Browser
      “Server Busy”
      Browser
      Browser
    • 33. Using the Cloud for Scale
      Browser
      Browser
      Database
      Web Tier
      B/L Tier
      Browser
      “Timeout”
      Browser
      Browser
    • 34. How would Jim do this today on premises?
    • 35. Using the Cloud for Scale
      How would Jim do this today on premises?
      Browser
      Web Tier
      N L B
      Browser
      Database
      Web Tier
      B/L Tier
      Browser
      Browser
      Web Tier
      Browser
    • 36. Using the Cloud for Scale
      How would Jim do this today on premises?
      Browser
      B/L Tier
      N L B
      Browser
      Database
      Web Tier
      Browser
      B/L Tier
      Browser
      B/L Tier
      Browser
    • 37. Using the Cloud for Scale
      How would Jim do this today on premises?
      Browser
      Web Tier
      N L B
      B/L Tier
      N L B
      Browser
      Database
      Web Tier
      Browser
      B/L Tier
      Browser
      Web Tier
      B/L Tier
      Browser
    • 38. Using the Cloud for Scale
      How would Jim do this today on premises?
      Browser
      p1 p2 p3
      Web Tier
      N L B
      B/L Tier
      N L B
      Browser
      Database
      Web Tier
      Browser
      B/L Tier
      Browser
      Web Tier
      B/L Tier
      Browser
    • 39. Not without consequences...
    • 40. Using the Cloud for Scale
      How would Jim do this today on premises?
      Browser
      p1 p2 p3
      Web Tier
      N L B
      B/L Tier
      N L B
      Browser
      Database
      Web Tier
      Browser
      B/L Tier
      Browser
      Web Tier
      B/L Tier
      Browser
      “That took a lot of work - and money!”
    • 41. Using the Cloud for Scale
      How would Jim do this today on premises?
      p1 p2 p3
      “Not so great now…”
      Web Tier
      N L B
      B/L Tier
      N L B
      Database
      Web Tier
      Browser
      B/L Tier
      Web Tier
      B/L Tier
      “That took a lot of work - and money!”
      “Hmmm... Most of this stuff is sitting idle...”
    • 42. Using the Cloud for Scale
      Datacenter peak load
      Idle time
      Usage
      Jan
      Apr
      Jul
      Oct
    • 43. How can Windows Azure help?
    • 44. Using the Cloud for Scale
      “Wow! What a great site!”
      Azure Storage
      Request
      Web Role
      Worker Role
      Browser
      Response
    • 45. Using the Cloud for Scale
      Browser
      Browser
      Azure
      Storage
      Web Role
      Worker Role
      Browser
      “Server Busy”
      Browser
      Browser
    • 46.
    • 47. Using the Cloud for Scale
      Browser
      Web Role
      N L B
      Browser
      AzureStorage
      Web Role
      Worker Role
      Browser
      Browser
      Web Role
      Browser
      You don’t see this bit
    • 48. Using the Cloud for Scale
      Browser
      Web Role
      N L B
      Worker Role
      N L B
      Browser
      AzureStorage
      Web Role
      Browser
      Worker Role
      Browser
      Web Role
      Worker Role
      Browser
    • 49. Using the Cloud for Scale
      Browser
      p1 p2 p3
      Web Role
      N L B
      Worker Role
      N L B
      Browser
      AzureStorage
      Web Role
      Browser
      Worker Role
      Browser
      Web Role
      Worker Role
      Browser
    • 50. What’s going on behind the scenes?
    • 51. Windows Azure
      Your
      Service
      DNS
      LB
      Web Portal
      (API)
      LB
      Fabric
      Controller
    • 52. Service
      Service
      Service
      Model
      Your
      Service
      DNS
      LB
      Web Portal
      (API)
      DNS
      config
      LB
      Service Deployment
      Fabric
      Controller
    • 53. Your
      Service
      Service
      Service
      DNS
      Service
      Service
      Service
      Service
      Service
      LB
      Service
      Web Portal
      (API)
      LB
      Model
      Service Scaling
      Fabric
      Controller
    • 54. Your
      Service
      Service
      DNS
      Service
      Service
      Service
      LB
      Web Portal
      (API)
      !
      LB
      Model
      Service Monitoring & Recovery
      Fabric
      Controller
    • 55. On to the Case Study…
    • 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
    • 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 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
    • 59. Community
      Community
      Micro Community
      Factory
      Community
      Community
      Community
      Groups
      Community Group A
      Community Group B
      Personalization
      Membership
      Content
      Personalization
      Membership
      Content
      High Level Services
      Personalization
      Customization
      Content
      Security
      Integration

      Navigation
      Search
      Membership
      Identity
      Groups

      Foundation Services
      Identity
      Security
      Storage
      Eventing
      Config
      Content

      Micro Community
      Compute
      59
    • 60.
    • 61.
    • 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.
    • 65. Feedback.
    • 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
    • 67. The Development Experience…
    • 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
    • 69. Write code on your development machine
      Test locally
      Build package w/VS Tools
      Upload your package to the web portal
      Push “deploy”
      Monitor, upgrade, scale…
      Publishing Your Service To The Cloud
    • 70. Demo: Developer Experience
    • 71. Roles
      Web Role
      Worker Role
      Windows Server 2008 x64
      .NET Start
      Native Code
      User Mode
    • Demo: Guest Book
    • 77. Service Models & Roles
      Bid Now Service
      Worker X
      Web A
      (port 80)
      Main Web
      100 instances
      Image Resize
      2 instances
      Worker Y
      Auction Processing
      25 instances
      Web B
      (port 8081)
      Admin
      2 instances
      Worker Z
      Notifications
      10 instances
    • 78. Debugging the cloud really means logging
      Simple logging API today
      More functionality over time
      Debugging in the Cloud
    • 79. Demo: Guest Book Logging
    • 80. Storage in the Cloud…
    • 81. Blobs, Tables, Relational
    • 82. Blobs, Tables, Relational
    • 83. 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
    • 84. Using the Cloud for Storage
      Blob Container
      PutBlob
      PUT http://account.blob.core.windows./net/containername/blobname
      Azure
      Blob Storage
      REST API
      Client
      http://account.blob.core.windows.net/containername/blobname
      PutBlob = 64Mb MAX
      MetaData = 8Kb per Blob
    • 85. Using the Cloud for Storage
      Blob Container
      Azure
      Blob Storage
      REST API
      Client
      GetBlob
      GET http://account.blob.core.windows./net/containername/blobname
      http://account.blob.core.windows.net/containername/blobname
    • 86. Using the Cloud for Storage
      Blob Container
      Azure
      Blob Storage
      REST API
      Client
      GetBlob
      GET http://account.blob.core.windows./net/containername/blobname
      Range: bytes=329300 - 730000
      http://account.blob.core.windows.net/containername/blobname
    • 87. Using the Cloud for Storage
      Blob Container
      PutBlock(blobname, blockid, data)
      PutBlockList(blobname, blockid1, …, blockidN)
      Azure
      Blob Storage
      REST API
      Client
      http://account.blob.core.windows.net/containername/blobname
      PutBlock = 4Mb MAX to a maximum of 50Gb
      BlockId = 64 bytes
    • 88. Blobs, Tables, Relational
    • 89. Using the Cloud for Storage
      REST:
      GET http://account.table.core.windows.net/Customer?$filter=%20PartitionKey%20eq%20value
      LINQ:
      var customers = from o in context.CreateQuery&lt;customer&gt;(“Customer”) where o.PartitionKey == value select o;
      Azure
      Table Storage
      Worker Role
      http://account.table.core.windows.net
      Each Table:
      PartitionKey (e.g. DocumentName) to ensure scalability
      RowKey (e.g. version number)
      [fields] for data
    • 90. 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
    • 91. 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
    • 92. 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
    • 93. No join
      No group by
      No order by
      Think: relational DB partitioned to the max
      Not a Relational Database
    • 94. 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
    • 95. Key Example – Blog Posts
      Partition 1
      Partition 2
      Getting all of dunnry’s blog posts is fast
      Single partition
      Getting all posts after 2008-03-27 is slow
      Traverse all partitions
    • 96. 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
    • 97. Tradeoff between locality and scalability
      Considerations
      Entity group transactions
      Query efficiency
      Scalability
      Flexible Partitioning
      Choosing a Partition Key
    • 98. 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
    • 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 keys
    • 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
    • 104. Demo: Guest Book Table Storage
    • 105. Lessons LearnedAzure Storage
      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
    • 106. Lessons LearnedAzure Storage
      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
    • 107. Lessons LearnedAzure Storage - RESTful
      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
    • 108. Lessons LearnedAzure Storage – Roundtrips are expensive
      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
    • 109. Lessons LearnedAzure Storage – List&lt;&gt;
      Using List&lt;&gt; with entity types
      List&lt;&gt; binds well
      LINQ works well with List&lt;&gt;
      So does foreach
      List&lt;&gt; serializes well
      Add intelligence to your entities
      Compare, Equals, ToString, etc.
    • 110. Blobs, Tables, Relational
    • 111. SQL Server Data Services (MIX08)
    • 112. Using the Cloud for Storage
      This is what I’m doing on premises...
      Data
      TDS
      RDBMS
      Client
      DB Server
    • 113. Using the Cloud for Storage
      So, this is what I would like to do in the cloud...
      Data
      TDS
      RDBMS
      Client
      DB Server
    • 114. SQL Data Services (MIX09)
    • 115. SQL Azure (July 2009)
    • 116. Using the Cloud for Storage
      So, this is what I would like to do…
      Data
      TDS
      RDBMS
      Client
      SQL Azure
    • 117. Using the Cloud for Storage
      HTTP
      TDS
      RDBMS
      Browser
      Web Role
      SQL Azure
    • 118. Using the Cloud for Storage
      Queue
      TDS
      HTTP
      RDBMS
      Browser
      Web Role
      Worker Role
      SQL Azure
    • 119. Migration!
    • 120. Using the Cloud for Storage
      “The Data Center”
      TDS
      HTTP
      RDBMS
      Browser
      Web Tier
      Bus. Logic
      SQL Server
    • 121. Using the Cloud for Storage
      “The Cloud”
      Queue
      TDS
      HTTP
      RDBMS
      Browser
      Web Role
      Worker Role
      SQL 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 Azure
      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
    • 125. Lessons LearnedSQL Azure
      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
    • 126. Lessons LearnedSQL Azure
      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]
    • 127. Queues
    • 128. Simple asynchronous dispatch queue
      Create and delete queues
      Message:
      Retrieved at least once
      Max size 8kb
      Operations:
      Enqueue
      Dequeue
      RemoveMessage
      Queues
    • 129. Azure Queues
      RemoveMessage
      GetMessage (Timeout)
      Worker Role
      PutMessage
      Queue
      Msg 1
      Msg 2
      Msg 2
      Msg 1
      Web Role
      Worker Role
      Worker Role
      Msg 3
      Msg 4
      Msg 2
    • 130. Patterns in the Cloud
      Using 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 Tenancy
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #1
    • 135. How would Jim do this today on premises?
    • 136. #2 - Using the Cloud for Multi Tenancy
      How would Jim do this today on premises?
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #3
    • 137. Gets expensive pretty quickly
    • 138. Using the Cloud for Multi Tenancy
      Browser
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Customer #3
    • 139. Schema CustomizationsUI Customizations
    • 140. Schema CustomizationsUI Customizations
    • 141. 3 options for data in multi tenant environment
    • 142. Using the Cloud for Multi Tenancy
      Browser
      Fixed Schema
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Option 1: Everyone Uses the Same Database/Schema
      Customer #3
      Pros: Simplest approach, easy to maintain/upgrade.
      Cons: No customizations. Restoring of tenant data.
    • 143. Using the Cloud for Multi Tenancy
      Database
      Browser
      Customer #1
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Customer #2
      Database
      Browser
      Customer #3
      Customer #3
      Option 2: Give Each Customer Their Own Database/Schema
      Pros: Flexible. Tenant restore is easier. High Isolation.
      Cons: Can be costly. Difficult to upgrade db schemas.
    • 144. Using the Cloud for Multi Tenancy
      Fixed Schema
      with Customizations
      Browser
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Option 3: Fixed Database/Schema, with customizations
      Customer #3
      Pros: Customers can add their own custom fields
      Cons: Non standard way of customizing the schema. Tenant restore is difficult.
    • 145. Using the Cloud for Multi Tenancy
      Tenant
      1
      *
      int
      TenantID
      nvarchar
      TenantName
      *
      *
      Type
      Employee
      int
      TypeID
      int
      EmployeeId
      nvarchar
      Name
      nvarchar
      FirstName
      nvarchar
      nvarchar
      CLRType
      LastName
      1
      1
      Customization
      int
      CustomizationID
      *
      *
      nvarchar
      Value
    • 146. Using the Cloud for Multi Tenancy
      Tenant
      1
      *
      1
      TenantID
      UK Branch
      TenantName
      *
      *
      Type
      Employee
      1
      TypeID
      1
      EmployeeId
      PostalCode
      Name
      Gordon
      FirstName
      string
      Brown
      CLRType
      LastName
      1
      1
      Customization
      1
      CustomizationID
      *
      *
      SW1A 2AA
      Value
    • 147. Using the Cloud for Multi Tenancy
      Tenant
      1
      *
      2
      TenantID
      US Branch
      TenantName
      *
      *
      Type
      Employee
      2
      TypeID
      2
      EmployeeId
      ZipCode
      Name
      Barack
      FirstName
      string
      Obama
      CLRType
      LastName
      1
      1
      Customization
      2
      CustomizationID
      *
      *
      20500
      Value
    • 148. Using the Cloud for Multi Tenancy
      Tenant
      1
      *
      2
      TenantID
      Fixed Schema
      Applies to All Tenants
      Could be both
      US Branch
      TenantName
      *
      *
      Type
      Employee
      2
      TypeID
      2
      EmployeeId
      Customizable
      Tenant by Tenant Basis
      ZipCode
      Name
      Barack
      FirstName
      string
      Obama
      CLRType
      LastName
      1
      1
      Customization
      2
      CustomizationID
      *
      *
      20500
      Value
    • 149. Schema CustomizationsUI Customizations
    • 150. #2 - Using the Cloud for Multi Tenancy
      Browser
      Customer #1
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Customer #3
    • 151. URL Handing
    • 152. Can ASP.NET MVC Help?
    • 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 Tenancy
      http://hr.chase.co.uk
      Browser
      Customer #1
      http://employeedata.cloudapp.net
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Customer #3
      http://hr.citigroup.com
    • 157. Using the Cloud for Multi Tenancy
      http://hr.chase.co.uk -&gt; CNAME (employeedata.cloudapp.net)
      Browser
      Customer #1
      http://employeedata.cloudapp.net
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Browser
      Customer #3
      http://hr.citigroup.com -&gt; CNAME (employeedata.cloudapp.net)
    • 158. Using the Cloud for Multi Tenancy
      http://hr.chase.co.uk -&gt; CNAME (employeedata.cloudapp.net)
      Browser
      Customer #1
      http://employeedata.cloudapp.net
      Database
      Web Tier
      B/L Tier
      Browser
      Customer #2
      Use custom routing in ASP.NET MVC
      Browser
      Customer #3
      http://hr.citigroup.com -&gt; CNAME (employeedata.cloudapp.net)
    • 159. Demo: Multi-Tenant Routing with ASP.NET MVC
      Tentative
    • 160. Patterns for Moving to the Cloud
      Using the Cloud for Communications
    • 161. Jim’s organization needs to communicate with other organizations
      Patterns 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 Communications
      Telco provided WAN
      Company 2
      Company 1
      Server
      Client
      FTP
      Server
      FTP
      Client
    • 166. Using the Cloud for Communications
      Internet
      Telco provided WAN
      Company 2
      Company 1
      Server
      Client
      FTP
      Server
      FTP
      Client
    • 167. Using the Cloud for Communications
      Internet
      Telco provided WAN
      Company 2
      Company 1
      DMZ
      Server
      Client
      Extranet
      Site
      Browser
    • 168. What does the cloud provide?
    • 169. Using the Cloud for Communications
      http://app.queue.core.windows.net/
      Azure Queue
      REST
      Client
    • 170. Using the Cloud for Communications
      Company 1
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Company 2
      Client
    • 171. Using the Cloud for Communications
      x
      Company 1
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Company 2
      Client
    • 172. Using the Cloud for Communications
      Company 1
      http://app.queue.core.windows.net/
      Client
      Master Key
      Azure Queue
      REST
      Company 2
      Client
      Master Key
    • 173. Using the Cloud for Communications
      Company 1
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Web Role
      Company 2
      Client
    • 174. Using the Cloud for Communications
      Proxy?
      Company 1
      Firewall
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Web Role
      Company 2
      Client
      Firewall
    • 175. Using the Cloud for Communications
      Company 1
      Firewall
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Web Role
      65.55.33.204
      Company 2
      Client
      Firewall
      192.168.14.100
      NAT?
    • 176. Using the Cloud for Communications
      Company 1
      Firewall
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Web Role
      65.55.33.204
      Company 2
      Client
      Firewall
      192.168.14.100
      OK, so I’ll do a HTTP poll every minute
    • 177. Using the Cloud for Communications
      Company 1
      Firewall
      http://app.queue.core.windows.net/
      Client
      Azure Queue
      REST
      Web Role
      65.55.33.204
      Company 2
      Client
      Firewall
      192.168.14.100
      …and how about other protocols other than HTTP?
    • 178. How does the .NET Service Bus help?
    • 179. Using the Cloud for Communications
      Company 1
      sb://.../myqueue
      Client
      .NET
      Service Bus
      Company 2
      Client
      Firewall
      Outbound bi-directional socket
      Kept alive in background
    • 180. Using the Cloud for Communications
      Company 1
      Firewall
      sb://.../myqueue
      Client
      Outbound one-way socket
      .NET
      Service Bus
      Company 2
      Message routed
      accordingly
      Client
      Firewall
      Outbound bi-directional socket
      Kept alive in background
    • 181. Austin Integration with Siebel (on-premise)
      Austin
      Blob
      Table
      Queue
      sb://.../myqueue
      On-Premise DataCenter
      .NET
      Service Bus
      Synchronization Message
      Firewall
      bi-directional socket
      Kept alive in background
      Siebel
      Opp. Exchange
      Service
    • 182. Demo: Integration through the .NET Service Bus
    • 183. 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
    • 184. Resources
      Azure Services Training Kit
      Downloadable hands-on labs, demos, and presentations
      http://www.azure.com
      Blogs
      http://blog.smarx.com – Steve Marx
      http://blogs.msdn.com/clemensv - Clemens Vasters (.NET Services)
      Azure Services Platform Forums
      http://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
      • 188. Giveaways
      TODO
    • 189. 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
      • 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 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]
    • 191. “Be This Close”
      Country Music Festival 2009
      • Compelling 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&apos;t let us down.”
      Ben Henderson, Firefly Logic
    • 195. 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.”
      RanjithRamakrishnan, Chief Technology Officer for Cumulux
    • 196. What do I get?
      MSDN Premium
      Phone and Online Technical Support
      Profiled on Microsoft and other web properties
      How do I qualify?
      • Building software or software services
      • 197. Privately held
      • 198. In business for less than 3 years
      • 199. Less than US $1 million in annual revenue
      contact briangorbett
      bgorbett@microsoft.com
      425-538-0050
    • 200. dave.bost@microsoft.com
      http://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.

    ×