1 / 33

Windows Azure Storage Cloud Computing Soup to Nuts

Windows Azure Storage Cloud Computing Soup to Nuts. Mike Benkovich Microsoft Corporation www.benkoTips.com - @ mbenko. btlod-72. Agenda. Storage Overview Getting started Working with Blobs Adding Tables and Queues Worker Roles. Windows Azure. Core Services. Additional Services.

asher
Télécharger la présentation

Windows Azure Storage Cloud Computing Soup to Nuts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Azure StorageCloud Computing Soup to Nuts Mike Benkovich Microsoft Corporation www.benkoTips.com - @mbenko btlod-72

  2. Agenda Storage Overview Getting started Working with Blobs Adding Tables and Queues Worker Roles

  3. Windows Azure Core Services Additional Services • Caching • CDN • Identity • HPC • Service Bus • Reporting • Data Sync • Azure Connect Database Compute Storage

  4. Windows Azure Storage Storage in the Cloud Scalable, durable, and available Anywhere at anytime access Only pay for what the service uses Instant Concurrency Exposed via RESTful Web Services Use from Windows Azure Compute Use from anywhere on the internet Wrapped in API by SDK Microsoft.WindowsAzure.StorageClient

  5. Windows Azure Storage Abstractions Tables Structured storage. A table is a set of entities; an entity is a set of properties. Blobs Simple named files along with metadata for the file. Queues Reliable storage and delivery of messages for an application. Drives Durable NTFS volumes for Windows Azure applications to use. Based on Blobs.

  6. Windows Azure Storage Account Create account in Management Portal http://windows.azure.com Geographically located with affinity You get 2 keys… API based on REST… http://btlod.blob.core.windows.net/public/helloworld.txt http://<account>.<BLOB|TABLE|QUEUE>.core.windows.net/...

  7. Tools to Explore Storage Many tools are available some for free, some from 3rd parties, including: Visual Studio http://myAzureStorage.cloudapp.net http://clumsyleaf.com http://cerebrata.com These give access to our storage account

  8. Storage Accounts Demo 1

  9. Windows Azure Storage Account Can CDN Enable Account Blobs delivered via 24 global CDN nodes Can co-locate storage account with compute account Explicitly or using affinity groups Accounts have two independent 512 bit shared secret keys 100 TBs per account

  10. Storage in the Development Fabric There are some differences between Cloud and DevStorage: http://msdn.microsoft.com/en-us/gg433135 A good approach for developers: To test pre-deployment, push storage to the cloud first Use Dev Fabric for compute connect to cloud hosted storageFinally, move compute to the cloud Deveopment Storage Emulator provides a local “Mock” storage Emulates storage in cloud Allows offline development Requires SQL Express 2005/2008 or above SSMS Provides local view of storage items

  11. Scalability Targets Storage Account • SLA – 99.9% Availability • Capacity – Up to 100 TBs • Transactions – Up to 5000 requests per second • Bandwidth – Up to a few hundred megabytes per second Single Blob Partition • Throughput up to 60 MB/s Single Queue/Table Partition • Up to 500 transactions (entities or messages) per second Scale Above the limits • Partition between multiple storage accounts and partitions • When limit is hit, app may see ‘503 server busy’: applications should implement exponential back-off

  12. Working with Blobs Binary Large Objects include resources we use in our applications like pictures, videos, html, css, etc. that may not fit best in a relational schema Choice of API’s – REST vs. SDK wrapper To use SDK add references to Microsoft.WindowsAzure.StorageClient Create Storage Account Object Add client for blobs Work with container references and blobs

  13. Our example… WPF Cloud Explorer Basic WPF Application Enabled drop events – iterate thru collection of files Create a blob container and upload blobs

  14. Cloud Explorer Demo 2 Uploading Blobs

  15. Table Storage Concepts Account Table Entity Name =… Email = … customers Name =… EMailAdd= contoso Photo ID =… Date =… photos Photo ID =… Date =…

  16. Table Details Create, Query, Delete Tables can have metadata Not an RDBMS! Table Insert Update Merge – Partial update Replace – Update entire entity Upsert Delete Query Entity Group Transactions Multiple CUD Operations in a single atomic transaction Entities

  17. Entity Properties Entity can have up to 255 properties Up to 1MB per entity Mandatory Properties for every entity PartitionKey & RowKey (only indexed properties) Uniquely identifies an entity Defines the sort order Timestamp Optimistic Concurrency Exposed as an HTTP Etag No fixed schema for other properties Each property is stored as a <name, typed value> pair No schema stored for a table Properties can be the standard .NET types String, binary, bool, DateTime, GUID, int, int64, and double

  18. No Fixed Schema FAV SPORT Canoeing

  19. Querying ?$filter=Last eq ‘Wegner’

  20. Purpose of the Partition Key Entity Locality Entities in the same partition will be stored together Efficient querying and cache locality Endeavour to include partition key in all queries Entity Group Transactions Atomic multiple Insert/Update/Delete in same partition in a single transaction Table Scalability Target throughput – 500 tps/partition, several thousand tps/account Windows Azure monitors the usage patterns of partitions Automatically load balance partitions Each partition can be served by a different storage node Scale to meet the traffic needs of your table

  21. Partitions and Partition Ranges Server A Table = Products [MinKey - Canoes) Server A Table = Products Server B Table = Products [Canoes - MaxKey)

  22. Table Properties Entity can have up to 255 properties Up to 1MB per entity Mandatory Properties for every entity PartitionKey & RowKey (only indexed properties) • Uniquely identifies an entity • Defines the sort order Timestamp • Optimistic Concurrency • Exposed as an HTTP ETag No fixed schema for other properties Each property is stored as a <name, typed value> pair No schema stored for a table Properties can be the standard .NET types String, binary, bool, DateTime, GUID, int, int64, and double

  23. Loosely Coupled Workflow with Queues Enables workflow between roles Load work in a queue Producer can forget about message once it is in queue Many workers consume the queue For extreme throughput (>500 tps) Use multiple queues Read messages in batches Multiple work items per message Input Queue (Work Items) Queue Web Role Worker Role Worker Role Web Role Worker Role Web Role Worker Role

  24. Queue Details Simple asynchronous dispatch queue No limit to queue length subject to storage limit 64kb per message ListQueues - List queues in account Queue operations CreateQueue DeleteQueue Get/Set Metadata Clear Messages Message operations PutMessage– Reads message and hides for time period GetMessages – Reads one or more messages and hides them PeekMessages – Reads one or more messages w/o hiding them DeleteMessage – Permanently deletes messages from queue UpdateMessage – Clients renew the lease and contents

  25. Queue’s Reliable Delivery Guarantee delivery/processing of messages (two-step consumption) Worker dequeuesmessage and it is marked as Invisible for a specified “Invisibility Time” Worker deletes message when finished processing If Worker role crashes, message becomes visible for another Worker to process

  26. Message lifecycle 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

  27. Creating Thumbnails WPF Uploader Blob uploads are good Can leverage in web applications Nice to have thumbnails created Next steps…catalog of uploads Create model for table storage Add class library to be shared between projects Define queue for work to generate thumbs Add queue message for image files

  28. Catalog Demo 3 Adding table and queue messages…

  29. Worker Process Ideally suited for Worker Role Read queue message with work Process thumbnail Update catalog table Sleep for predetermined time

  30. Worker Role Demo 4 Process thumbnails

  31. Windows Azure Storage Summary Fundamental data abstractions to build your applications Blobs: Files and large objects Drives: NTFS APIs for migrating applications Tables: Massively scalable structured storage Queues: Reliable delivery of messages Easy to use via the Storage Client Library Hands on Labs

  32. Where can I get more info? • Visit my site http://www.benkotips.com • Resources from today’s talk • Webcasts • Downloads • Check out the rest of this series! • http://bit.ly/s2nCloud • Ask questions on Windows Azure Office Hours • http://bit.ly/bqtWazOH • Get the Tools & the Trial • http://aka.ms/AzureMB • http://aka.ms/AzureTrialMB

More Related