Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay.

Similar presentations


Presentation on theme: "MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay."— Presentation transcript:

1 MSDN Event

2 WINDOWS AZURE STORAGE

3 Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay for what the service uses Exposed via RESTful Web Services –Use from Windows Azure Compute –Use from anywhere on the internet Various storage abstractions –Tables, Blobs, Queues, Drives

4 The Storage Client API The Main API are RESTfuls –Can call these from any HTTP client e.g. Flash, Silverlight, etc… For easier.NET access, a Client API from SDK Microsoft.WindowsAzure.StorageClient –Provides a strongly typed wrapper around REST services

5 Windows Azure Storage Account User specified globally unique account name –Can choose geo-location to host storage account US – “North Central” and “South Central” Europe – “North” and “West” Asia – “East” and “Southeast” –Can CDN Enable Account Blobs delivered via 18 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 100TB per account

6 Storage in the Development Fabric Provides a local “Mock” storage Emulates storage in cloud Allows offline development Requires SQL Express 2005/2008 or above There are some differences between Cloud and Dev Storage. http://msdn.microsoft.com/dd320275 A good approach for developers: To test pre-deployment, push storage to the cloud first Use Dev Fabric for compute connect to cloud hosted storage. Finally, move compute to the cloud. There are some differences between Cloud and Dev Storage. http://msdn.microsoft.com/dd320275 A good approach for developers: To test pre-deployment, push storage to the cloud first Use Dev Fabric for compute connect to cloud hosted storage. Finally, move compute to the cloud.

7 Windows Azure Storage Abstractions

8 Windows Azure Storage Account

9 Blob Storage Concepts Blob Container Account cohowinery images PIC01.JPG PIC02.JPG videos VID1.AVI http://.blob.core.windows.net/ /

10 Blob Features and Functions

11 Blob Client Library CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("CloudStorageAccount"); CloudBlobClient blobClient = new CloudBlobClient( account.BlobEndpoint, account.Credentials); // Create Container CloudBlobContainer cloudContainer = blobClient.GetContainerReference(containerName); bool hasCreated = cloudContainer.CreateIfNotExist(); // Access Blob in the Container CloudBlob cloudBlob = cloudContainer.GetBlobReference(blobName); //BlobRequestOptions has retry policy, timeout etc. BlobRequestOptions options = new BlobRequestOptions(); //Upload the local file to Blob service cloudBlob.UploadFile(uploadFileName, options); //Download to local file name cloudBlob.DownloadToFile(downloadFileName, options);

12 Two types of Blobs under the hood

13 Block Blob Streaming Workload w/ Random Reads + Committed Writes 10 GB Movie Windows Azure Storage Block Id 1 Block Id 2 Block Id 3 Block Id N blobName = “blob.wmv”; PutBlock(blobName, blockId1, block1Bits); PutBlock(blobName, blockId2, block2Bits); ………… PutBlock(blobName, blockIdN, blockNBits); PutBlockList(blobName, blockId1, blockId2…,blockIdN); blobName = “blob.wmv”; PutBlock(blobName, blockId1, block1Bits); PutBlock(blobName, blockId2, block2Bits); ………… PutBlock(blobName, blockIdN, blockNBits); PutBlockList(blobName, blockId1, blockId2…,blockIdN); blob.wmv

14 Page Blob – Random Read/Write 0 10 GB 10 GB Address Space 512 1024 1536 2048 2560

15 Windows Azure Content Delivery Network

16 Blobs Tips

17 Windows Azure Drive

18 Windows Azure Drives Capabilities

19 Cloud Library Sample //Create Local Storage resource and initialize the local cache for drives CloudDrive.InitializeCache(localCacheDir, cacheSizeInMB); CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("CloudStorageAccount"); //Create a cloud drive (PageBlob) CloudDrive drive = account.CreateCloudDrive(pageBlobUri); drive.Create(1000 /* sizeInMB */); //Mount the network attached drive on the local file system string pathOnLocalFS = drive.Mount(cacheSizeInMB, DriveMountOptions.None); //Use NTFS APIs to Read/Write files to drive … //Snapshot drive while mounted to create backups Uri snapshotUri = drive.Snapshot(); //Unmount the drive drive.Unmount();

20 Windows Azure Tables

21 Table Storage Concepts EntityTableAccount cohowinery customers Name =… Email = … Name =… Email = … winephotos Photo ID =… Date =… Photo ID =… Date =…

22 Entity Properties

23 PartitionKey and Partitions

24 Purpose of the Partition Key

25 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Action Fast & Furious…2009 Action The Bourne Ultimatum…2007 … ……… Animation Open Season 2…2009 Animation The Ant Bully…2006 PartitionKey (Category) RowKey (Title) TimestampReleaseDate Comedy Office Space…1999 … ……… SciFi X-Men Origins: Wolverine…2009 … ……… War Defiance…2008 PartitionKey (Category) RowKey (Title) TimestampReleaseDate 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 Partitions and Partition Ranges Server B Table = Movies [Comedy - MaxKey) Server B Table = Movies [Comedy - MaxKey) Server A Table = Movies [MinKey - Comedy) Server A Table = Movies [MinKey - Comedy) Server A Table = Movies Server A Table = Movies

26 Table Operations

27 Hello Azure Architecture

28 DEMODEMO Twitter Table

29 Table Tips

30 Table Tips – cont. Avoid large table scans when performance is critical Restructure your schema if required Concatenate different keys to form appropriate index Most Optimal: PartitionKey == “SciFi” and RowKey == “Star Wars” Scans: Expect continuation tokens (REST) PartitionKey == “SciFi” and “Sphere” ≤ RowKey ≤ “Star Wars” “Action” ≤ PartitionKey ≤ “Thriller” PartitionKey == “Action” || PartitionKey == “Thriller” - currently scans entire table “Cars” ≤ RowKey ≤ “Star Wars” - scans entire table

31 Queue Storage Concepts MessageQueueAccount order processing customer ID order ID http://… cohowinery

32 Loosely Coupled interaction with Queues Azure Queue Input Queue (Work Items)

33 Queue’s Reliable Delivery Azure Queue Input Queue (Work Items)

34 DEMODEMO Twitter Queue

35 Queue Tips

36


Download ppt "MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay."

Similar presentations


Ads by Google