24
WINDOWS AZURE STORAGE SERVICES Duy Lam

Windows Azure Storage Services

  • Upload
    duy-lam

  • View
    1.890

  • Download
    1

Embed Size (px)

DESCRIPTION

This presentation shows overview about storage services (tables, queues, blob) in Windows Azure platform. The demo project can be found here: http://cid-fb4ac1330711a759.skydrive.live.com/redir.aspx?resid=FB4AC1330711A759!119

Citation preview

Page 1: Windows Azure Storage Services

WINDOWS AZURE STORAGE SERVICESDuy Lam

Page 2: Windows Azure Storage Services

Cloud computing

Cloud Application

Cloud Platforms

Cloud Infrastructure

2

Page 3: Windows Azure Storage Services

Windows Azure platform• A group of cloud technologies, each providing a specific set of services to

application developers• Windows Azure Platform Offers

3

Page 4: Windows Azure Storage Services

Windows Azure• “Compute” to run Windows applications• “Storage” to store the data in the cloud

4

Page 5: Windows Azure Storage Services

Compute

5

• Implemented using ASP.NET, WCF, or another technology that works with IISWeb role

• Not being hosted in IISWorker role

Page 6: Windows Azure Storage Services

Storage

6

• Unstructured dataBlobs• Literally table, not relational tableTables• Communicate between Web role and Worker roleQueues

<http|https>://<account-name>.<service>.core.windows.net/<resource-path>

blobqueuetable

Page 7: Windows Azure Storage Services

• This “tables” is not relational tables. It’s structured storage and flexible schema: form of Tables, which contain a set of Entities, which contains a set of named Properties

• Work with LINQ, WCF (ADO .NET) Data Services and REST

• Practice:• Visual Studio Project Template• “Hello world” Window Azure Table

7

Tables Service

Page 8: Windows Azure Storage Services

How to debug

Observe underline REST request with Fiddler: DevelopmentStorageProxyUri=http://ipv4.fiddler

8

Page 9: Windows Azure Storage Services

Fun with properties• Timestamp property:

• Read only• Optimistic Concurrency

• PartitionKey & RowKey properties• Provide the uniqueness for an entity in a table• Scale the table• Sorting

9

Page 10: Windows Azure Storage Services

10

PartitionKey(Category)

RowKey(Title)

Timestamp ReleaseDate

Action Fast & Furious

… 2009

Action The Bourne Ultimatum

… 2007

… … … …

Animation Open Season 2

… 2009

Animation The Ant Bully

… 2006

… … … …

Comedy Office Space

… 1999

… … … …

SciFi X-Men Origins: Wolverine

… 2009

… … … …

War Defiance … 2008

Partitioning

Page 11: Windows Azure Storage Services

11

PartitionKey(Category)

RowKey(Title)

Timestamp

ReleaseDate

Action Fast & Furious … 2009

Action The Bourne Ultimatum

… 2007

… … … …

Animation Open Season 2 … 2009

Animation The Ant Bully … 2006PartitionKey(Category)

RowKey(Title)

Timestamp

ReleaseDate

Comedy Office Space … 1999

… … … …

SciFi X-Men Origins: Wolverine

… 2009

… … … …

War Defiance … 2008

Partitioning

Page 12: Windows Azure Storage Services

Other features• Entity group transactions (EGT)

• Atomically manipulate entities in same partition in a single transaction

• 100 commands in a single transaction and payload < 4 MB

• Continuation Tokens x-ms-continuation-NextPartitionKey x-ms-continuation-NextRowKey

12

Page 13: Windows Azure Storage Services

Remember• Support query operators: From, Where, Take, First,

FirstOrDefault• Cross-Table Consistency

13

Page 14: Windows Azure Storage Services

14

Queues Service

Page 15: Windows Azure Storage Services

Benefits

Scalability

Traffic Bursts

Decoupling Front-End Roles from Back-End Roles

15

Page 16: Windows Azure Storage Services

How it works

16

VisibilityTimeout

Page 17: Windows Azure Storage Services

Notes• Queue

• No limit on the number of messages• A message is stored for at most a week• Can have metadata associated in the form of <name, value>

pairs(up to 8KB in size per queue)• Messages

• Up to 8KB in size• VisibilityTimeout: 30 seconds by default, 2 hours maximum• PopReceipt: is required when deleting a message• No guaranteed return order of the messages from a queue

17

Page 18: Windows Azure Storage Services

18

Page 19: Windows Azure Storage Services

19

Blob Service

Page 20: Windows Azure Storage Services

Models

20

Page 21: Windows Azure Storage Services

Notes• Use directory-like hierarchy for the blob names and then

list all the "directories“ by using CloudBlobContainer.GetDirectoryReference() method

• Permission on blob containers

21

var storageAccount = CloudStorageAccount.FromConfigurationSetting("DataConnection").CreateCloudBlobClient().GetContainerReference("movies");

var blobContainer = storageAccount.CreateCloudBlobClient().GetContainerReference("movies");

blobContainer.CreateIfNotExist();

var blobPermissions = blobContainer.GetPermissions();blobPermissions.PublicAccess = BlobContainerPublicAccessType.Container;blobContainer.SetPermissions(blobPermissions);

Action/Rocky1.wmvAction/Rocky2.wmvAction/Rocky3.wmv

Page 22: Windows Azure Storage Services

22

Page 23: Windows Azure Storage Services

Q & AThank you

Page 24: Windows Azure Storage Services

To start with• Install Windows Azure SDK• Microsoft Whitepapers:

• Introducing the Windows Azure Platform• Windows Azure Table – Programming Table Storage• Windows Azure Blob – Programming Blob Storage• Windows Azure Queue - Programming Queue Storage

• Windows Azure Tables and Queues Deep Dive - PDC09• Windows Azure Blob and Drive Deep Dive - PDC09• Neil Mackenzie blog

24