Windows Azure Storage Anton Boyko.NET developer
US Europe Asia Can choose geo-location to host storage account:
Blob Storage
BlobContainerAccount / Pages/ Blocks contoso PIC01.JPG Block/Page PIC02.JPG images VID1.AVIvideos
Main Web Service Operations
Associate Metadata with Blob
Blob always accessed by name
GET miter=/ Tents/PalaceTent.wmv Tents/ShedTent.wmv Products/Bikes/SuperDuperCycle.jpg Products/Bikes/FastBike.jpg Products/Canoes/Whitewater.jpg Products/Canoes/Flatwater.jpg Products/Canoes/Hybrid.jpg Products/Tents/PalaceTent.jpg Products/Tents/ShedTent.jpg
results=2 &marker=MarkerValue Canoes/Hybrid.jpg results=2 Canoes/Whitewater.jpg Canoes/Flatwater.jpg MarkerValue
TheBlob.wmv 10 GB Movie Block Id 1Block Id 2Block Id 3 Block Id N blobName = “TheBlob.wmv”; PutBlock(blobName, blockId1, block1Bits); PutBlock(blobName, blockId2, block2Bits); ………… PutBlock(blobName, blockIdN, blockNBits); PutBlockList(blobName, blockId1,…,blockIdN); TheBlob.wmv THE BLOB Windows Azure Storage
Create MyBlob Specify Blob Size = 10 Gbytes Sparse storage - Only charged for pages with data stored in them Fixed Page Size = 512 bytes Random Access Operations PutPage[512, 2048) PutPage[0, 1024) ClearPage[512, 1536) PutPage[2048,2560) GetPageRange[0, 4096) returns valid data ranges: [0,512), [1536,2560) GetBlob[1000, 2048) returns All 0 for first 536 bytes Next 512 bytes are data stored in [1536,2048) 0 10 GB GB Address Space
pic1.jpg GET pic1.jpg 404 TTL Content Delivery Network Windows Azure Blob Service
Drives
VM OS Application Drive X:
Tables
EntityTableAccount contoso Name =… = … Name =… Add= customers Photo ID =… Date =… photos Photo ID =… Date =…
Insert Update Merge – Partial update Replace – Update entire entity Upsert Delete Query Entity Group Transactions Multiple CUD Operations in a single atomic transaction Create, Query, Delete Tables can have metadata Not an RDBMS! Table Entities
FIRSTLASTBIRTHDATE WadeWegner2/2/1981 NathanTotten3/15/1965 NickHarrisMay 1, 1976 FAV SPORT Canoeing
FIRSTLASTBIRTHDATE WadeWegner2/2/1981 NathanTotten3/15/1965 NickHarrisMay 1, 1976 ?$filter=Last eq ‘Wegner’
PARTITIONKEY (CATEGORY) ROWKEY (TITLE) TIMESTAMPMODELYEAR BikesSuper Duper Cycle…2009 Bikes Quick Cycle 200 Deluxe …2007 ………… CanoesWhitewater…2009 CanoesFlatwater…2006 PARTITIONKEY (CATEGORY) ROWKEY (TITLE) TIMESTAMPMODELYEAR Rafts14ft Super Tourer…1999 ………… Skis Fabrikam Back Trackers …2009 ………… TentsSuper Palace…2008 PARTITIONKEY (CATEGORY) ROWKEY (TITLE) TIMESTAMPMODELYEAR BikesSuper Duper Cycle…2009 Bikes Quick Cycle 200 Deluxe …2007 ………… CanoesWhitewater…2009 CanoesFlatwater…2006 Rafts14ft Super Tourer…1999 ………… Skis Fabrikam Back Trackers …2009 ………… TentsSuper Palace…2008