Windows Azure Data Storage Anton Boyko NET Developer
Windows Azure Data Storage Anton Boyko. NET Developer
Storage in the Cloud Exposed via RESTful Web Services
User specified globally unique account name Can choose geo-location to host storage account: US Europe North Central US West US East US South Central US Asia Northern Europe Western Europe East Asia South East Asia
There are some differences between Cloud and Dev Storage: http: //msdn. microsoft. com/enus/gg 433135 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
Windows Azure Storage provides simple security for calls to storage service Two 512 bit symmetric keys per storage account More granular security via Shared Access Signatures
Blob Storage
http: //<account>. blob. core. windows. net/<container>/<blobname> Account Container Blob Pages/ Blocks PIC 01. JPG Block/Page images PIC 02. JPG contoso Block/Page videos VID 1. AVI
Main Web Service Operations
Associate Metadata with Blob
Blob always accessed by name
GET Blob operation takes parameters http: //adventureworks. blob. core. windows. net/ Products/Bikes/Super. Duper. Cycle. jpg Products/Bikes/Fast. Bike. jpg GET Products/Canoes/Whitewater. jpg Products/Canoes/Flatwater. jpg http: //. . . /products? comp=list&prefix=Tents&deli Products/Canoes/Hybrid. jpg miter=/ Products/Tents/Palace. Tent. jpg Products/Tents/Shed. Tent. jpg <Blob>Tents/Palace. Tent. wmv</Blob> <Blob>Tents/Shed. Tent. wmv</Blob>
Large lists of Blobs can be paginated http: //. . . /products? comp=list&prefix=Canoes&max results=2 <Blob>Canoes/Whitewater. jpg</Blob> http: //. . . /products? comp=list&prefix=Canoes&max <Blob>Canoes/Flatwater. jpg</Blob> results=2 <Next. Marker>Marker. Value</Next. Marker> &marker=Marker. Value <Blob>Canoes/Hybrid. jpg</Blob>
THE BLOB Block Id N Block Id 3 Block Id 1 Block Id 2 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
Create My. Blob 0 1024 1536 2048 2560 10 GB Address Space 512 Specify Blob Size = 10 Gbytes Sparse storage - Only charged for pages with data stored in them Fixed Page Size = 512 bytes Random Access Operations Put. Page[512, 2048) Put. Page[0, 1024) Clear. Page[512, 1536) Put. Page[2048, 2560) Get. Page. Range[0, 4096) returns valid data ranges: [0, 512) , [1536, 2560) Get. Blob[1000, 2048) returns All 0 for first 536 bytes Next 512 bytes are data stored in [1536, 2048)
Fine grain access rights to blobs and containers Sign URL with storage key – permit elevated rights Revocation
High-bandwidth global blob content delivery Blob service URL vs. CDN URL: http: //images. blob. core. windows. net/ http: //<id>. vo. msecnd. net/ http: //cdn. contoso. com/
GET http: //guid 01. vo. msecnd. net/images/pic. 1 jpg To Enable CDN: 404 TTL Content Delivery Network pic 1. jpg http: //sally. blob. core. windows. net/images/pic 1. jpg Windows Azure Blob Service
Table Storage
Account Table customers contoso photos Entity Name =… Email = … Name =… EMail. Add= Photo ID =… Date =…
Table Details Not an RDBMS! Table Entities Create, Query, Delete Tables can have metadata Insert Update Merge – Partial update Replace – Update entire entity Delete Query Entity Group Transactions Multiple CUD Operations in a single atomic transaction
Entity can have up to 255 properties Mandatory Properties for every entity No fixed schema for other properties
FIRST LAST BIRTHDATE Wade Wegner 2/2/1981 Nathan Totten 3/15/1965 Nick Harris May 1, 1976 FAV SPORT Canoeing
? $filter=Last eq ‘Wegner’ FIRST LAST BIRTHDATE Wade Wegner 2/2/1981 Nathan Totten 3/15/1965 Nick Harris May 1, 1976
http: //msdn. microsoft. com/enus/library/windowsazure/dd 135725. aspx
Entity Locality Entity Group Transactions Table Scalability
PARTITIONKEY (CATEGORY) ROWKEY (TITLE) TIMESTAMP MODELYEAR Bikes Super Duper Cycle … 2009 Bikes Quick Cycle 200 Deluxe … 2007 … … Canoes Whitewater … 2009 Canoes Flatwater … 2006 Rafts PARTITIONKEY (CATEGORY) … 14 ft Super Tourer ROWKEY (TITLE) … … TIMESTAMP … 1999 MODELYEAR … Rafts Skis … … 1999 2009 … … Skis Tents 14 ft Super. Back Tourer Fabrikam Trackers … … Fabrikam Back Super Palace Trackers … … 2009 2008 … … Tents Super Palace … 2008 … …
SQL Azure
Architecture
Use Familiar Technologies SQL Server Comparison Unsupported SQL Server Features
Securing your data
Database Scalability
Q&A
- Slides: 35