Windows Azure Storage Windows Azure Windows Azure Storage

  • Slides: 51
Download presentation
Windows Azure Storage

Windows Azure Storage

Windows Azure

Windows Azure

Windows Azure Storage Services SQL Data

Windows Azure Storage Services SQL Data

Windows Azure Storage

Windows Azure Storage

Windows Azure Storage blobs tables queues

Windows Azure Storage blobs tables queues

Windows Azure Storage Account

Windows Azure Storage Account

Fundamental Data Abstractions Blobs Tables Queues

Fundamental Data Abstractions Blobs Tables Queues

Blob Storage Concepts Account Container Blob IMG 001. JPG pictures IMG 002. JPG sally

Blob Storage Concepts Account Container Blob IMG 001. JPG pictures IMG 002. JPG sally movies MOV 1. AVI

Storage Account and Blob Containers

Storage Account and Blob Containers

Blob Namespace blob http: //sally. blob. core. windows. net/music/rock/rush/xanadu. mp 3

Blob Namespace blob http: //sally. blob. core. windows. net/music/rock/rush/xanadu. mp 3

Blob Features and Functions Put. Blob Get. Blob Delete. Blob

Blob Features and Functions Put. Blob Get. Blob Delete. Blob

REST Put. Blob Account Container Blob Name PUT http: //dvd. blob. core. windows. net/movies/The.

REST Put. Blob Account Container Blob Name PUT http: //dvd. blob. core. windows. net/movies/The. Blob. wmv HTTP/1. 1 Content-Length: 100000 Content-Type: binary/octet-stream x-ms-meta-year: 1958 x-ms-meta-tagline: Beware%20 of%20 the%20 Blob Content-MD 5: HUXZLQLMu. I/KZ 5 KDc. JPc. OA== x-ms-date: Mon, 27 Oct 2008 17: 00: 25 GMT Authorization: Shared. Key dvd: F 5 a+d. UDvef+Pf. Mb 4 T 8 Rc 2 j. Hcwf. K 58 Kec. SZY+l 2 na. Iao= ……… Blob Data Contents ………

REST Get. Blob GET http: //dvd. blob. core. windows. net/movies/The. Blob. wmv HTTP/1. 1

REST Get. Blob GET http: //dvd. blob. core. windows. net/movies/The. Blob. wmv HTTP/1. 1 Authorization: Shared. Key dvd: RGll. HMtz. KMi 4 y/ned. Sk 5 Vn 74 IU 6/f. RMwi. Ps. L+u. YSDj. Y= x-ms-date: Mon, 27 Oct 2008 17: 00: 25 GMT GET http: //dvd. blob. core. windows. net/movies/The. Blob. wmv HTTP/1. 1 Range: bytes=1024000 -2048000

Blob Storage Concepts Account Container pictures Blob IMG 001. JPG Block IMG 002. JPG

Blob Storage Concepts Account Container pictures Blob IMG 001. JPG Block IMG 002. JPG sally Block 1 movies MOV 1. AVI Block 2 Block 3

Uploading a Blob Via Blocks Block Id N Block Id 1 Block Id 2

Uploading a Blob Via Blocks Block Id N Block Id 1 Block Id 2 Block Id 3 10 GB Movie blob. Name = “The. Blob. wmv”; Put. Block(blob. Name, block. Id 1, block 1 Bits); Put. Block(blob. Name, block. Id 2, block 2 Bits); ………… Put. Block(blob. Name, block. Id. N, block. NBits); Put. Block. List(blob. Name, block. Id 1, …, block. Id. N); The. Blob. wmv Windows Azure Storage

Put. Block. List Example Block Id 2 Block Id 4 Block Id 3 Block

Put. Block. List Example Block Id 2 Block Id 4 Block Id 3 Block Id 4 Block Id 2 Block Id 3 Block Id 4 Block Id 1 Blob. Name = Example. Blob. wmv Sequence of Operations Put. Block. Id 1 Block. Id 3 Block. Id 4 Block. Id 2 Block. Id 4 Put. Block. List Block. Id 2, Block. Id 3, Block. Id 4 Committed and readable version of blob

Block Details Put. Block. List Get. Block. List

Block Details Put. Block. List Get. Block. List

Blob Concurrency

Blob Concurrency

Choosing a Block ID

Choosing a Block ID

Summary Of Windows Azure Blobs

Summary Of Windows Azure Blobs

Fundamental Data Abstractions Blobs Tables – Provide structured storage. A table is a set

Fundamental Data Abstractions Blobs Tables – Provide structured storage. A table is a set of entities, which contain a set of properties Queues

Windows Azure Tables

Windows Azure Tables

Table Storage Concepts Account Table Entity Name =… Email = … users Name =…

Table Storage Concepts Account Table Entity Name =… Email = … users Name =… Email = … sally Photo ID =… Date =… photo index Photo ID =… Date =…

Table Data Model

Table Data Model

Partition Key And Partitions

Partition Key And Partitions

Partition Example Partition Key Row Key Property 3 Document Version Modification Name Time …

Partition Example Partition Key Row Key Property 3 Document Version Modification Name Time … Property N Description Example Doc V 1. 0 8/2/2007 … Committed version Example Doc V 2. 0. 1 9/28/2007 Partition 1 Alice’s working version FAQ Doc V 1. 0 5/2/2007 Committed version FAQ Doc V 1. 0. 1 7/6/2007 Alice’s working version Partition FAQ Doc V 1. 0. 2 8/1/2007 Sally’s working version 2

Purpose of the Partition Key

Purpose of the Partition Key

Choosing a Partition Key

Choosing a Partition Key

Table Entities and Properties

Table Entities and Properties

Table Programming Model

Table Programming Model

Example Table Definition [Data. Service. Key("Partition. Key", "Row. Key")] public class Customer { //

Example Table Definition [Data. Service. Key("Partition. Key", "Row. Key")] public class Customer { // Partition key – Customer Last name public string Partition. Key { get; set; } // Row Key – Customer First name public string Row. Key { get; set; } // User defined properties here public Date. Time Customer. Since { get; set; } public double Rating { get; set; } } public string Occupation { get; set; }

Create and Insert Entity Customer cust = new Customer( “Lee”, // Partition Key =

Create and Insert Entity Customer cust = new Customer( “Lee”, // Partition Key = Last Name “Geddy”, // Row Key = First Name Date. Time. Utc. Now, // Customer Since 2. 0, // Rating “Engineer” // Occupation); // Service Uri is “http: //<Account>. table. core. windows. net/” Data. Service. Context context = new Data. Service. Context(service. Uri); context. Add. Object(“Customer”, cust); Data. Service. Response response = context. Save. Changes();

Query a Table Data. Service. Context context = new Data. Service. Context(“http: //myaccount. table.

Query a Table Data. Service. Context context = new Data. Service. Context(“http: //myaccount. table. core. windows. net”); var customers = from o in context. Create. Query<Customer>(“Customer”) where o. Partition. Key == “Lee” select o; foreach (Customer customer in customers) { } GET http: //myaccount. table. core. windows. net/Customer? $filter= Partition. Key eq ‘Lee’

. NET and ADO. NET Perf Tips Service. Point. Manager. Default. Connection. Limit =

. NET and ADO. NET Perf Tips Service. Point. Manager. Default. Connection. Limit = X; Service. Point. Manager. Expect 100 Continue = false; Merge. Option = Merge. Option. No. Tracking Data. Service. Context. Resolve. Type

Table Tips

Table Tips

Summary of Windows Azure Tables

Summary of Windows Azure Tables

Fundamental Data Abstractions Blobs Tables Queues – Provide reliable storage and delivery of messages

Fundamental Data Abstractions Blobs Tables Queues – Provide reliable storage and delivery of messages for an application

Web + Worker Role Pattern Public internet n Web role Load balancer m Q

Web + Worker Role Pattern Public internet n Web role Load balancer m Q Worker role Cloud storage (tables, blobs, queues)

Windows Azure Queues

Windows Azure Queues

Queue Storage Concepts Account Queue Message 128 x 128, http: //… thumbnail jobs 256

Queue Storage Concepts Account Queue Message 128 x 128, http: //… thumbnail jobs 256 x 256, http: //… sally photo processing jobs http: //…

Account, Queues and Messages queue

Account, Queues and Messages queue

Queue Programming API

Queue Programming API

Dequeue and Delete Messages Producers Consumers C 1 P 2 4 P 1 3

Dequeue and Delete Messages Producers Consumers C 1 P 2 4 P 1 3 2 1. Dequeue(Q, 30 sec) msg 1 1 C 2 2. Dequeue(Q, 30 sec) msg 2

Dequeue and Delete Messages Producers Consumers 1 P 2 4 33 2 1 1.

Dequeue and Delete Messages Producers Consumers 1 P 2 4 33 2 1 1. Dequeue(Q, 30 sec) msg 1 5. C 1 crashed 6. msg 1 visible 30 seconds after Dequeue 2 P 1 C 2 2. Dequeue(Q, 30 sec) msg 2 3. C 2 consumed msg 2 4. Delete(Q, msg 2) 7. Dequeue(Q, 30 sec) msg 1

Queue Best Practices

Queue Best Practices

Windows Azure Data Storage Concepts Containe r Blobs http: //<account>. blob. core. windows. net/<container>

Windows Azure Data Storage Concepts Containe r Blobs http: //<account>. blob. core. windows. net/<container> Account Table Entities http: //<account>. table. core. windows. net/<table> Queue Messages http: //<account>. queue. core. windows. net/<queue>

Takeaways

Takeaways

More Information http: //www. microsoft. com/azure/windowsazure. mspx http: //msdn. microsoft. com/en-us/azure/cc 994380. aspx http:

More Information http: //www. microsoft. com/azure/windowsazure. mspx http: //msdn. microsoft. com/en-us/azure/cc 994380. aspx http: //tweval. com/wa-storage/

Please Complete an Evaluation Form Your feedback is important!

Please Complete an Evaluation Form Your feedback is important!

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names

© 2009 Microsoft Corporation. All rights reserved. Microsoft, 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.