340 likes | 570 Views
03 | Data Storage. Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist. Module Overview. Windows Azure Storage Overview Windows Azure Blob Storage Windows Azure Table Storage Windows Azure Queue Storage Windows Azure SQL Database. Windows Azure Storage Overview.
E N D
03 | Data Storage Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist
Module Overview • Windows Azure Storage Overview • Windows Azure Blob Storage • Windows Azure Table Storage • Windows Azure Queue Storage • Windows Azure SQL Database
Agenda Windows Azure Storage Blob Storage Drives Tables Queues
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
Windows Azure Storage AccountUser specified globally unique account name Can choose geo-location to host storage account: US Europe Asia South Central US North Central US Northern Europe Western Europe East Asia South East Asia West US East US
Windows Azure Storage Account Can CDN Enable Account Blobs delivered via 24 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 100 TBs per account
Features Geo-Replication Storage Analytics Logs: Provide trace of executed requests for your storage accounts Metrics: Provide summary of key capacity and request statistics for Blobs, Tables, and Queues
Storage in the Development Fabric There are some differences between Cloud and Dev Storage: http://msdn.microsoft.com/en-us/gg433135 A good approach for developers: To test pre-deployment, push storage to the cloud first Use Dev Fabric for compute connect to cloud hosted storageFinally, move compute to the cloud Provides a local “Mock” storage Emulates storage in cloud Allows offline development Requires SQL Express 2005/2008 or above
The Storage Client API RESTful API Can call these from any HTTP cliente.g. Flash, Silverlight, etc… Client API from SDK Microsoft.WindowsAzure.StorageClient Provides a strongly typed wrapper around REST services
Storage Libraries in Many Languages C#/.NET Python Ruby Perl JavaScript (Node) Java PHP Erlang Common LISP Objective-C C#/VB on Windows Phone 7
Windows Azure Storage Abstractions Tables Structured storage. A table is a set of entities; an entity is a set of properties. Blobs Simple named files along with metadata for the file. Queues Reliable storage and delivery of messages for an application.
Blob Storage Concepts http://<account>.blob.core.windows.net/<container>/<blobname> Blob Account Container Pages/ Blocks PIC01.JPG images Block/Page PIC02.JPG contoso Block/Page videos VID1.AVI
Blob Details PutBlob GetBlob DeleteBlob CopyBlob SnapshotBlob LeaseBlob Main Web Service Operations
Blob Details Standard HTTP metadata/headers (Cache-Control, Content-Encoding, Content-Type, etc) Metadata is <name, value> pairs, up to 8KB per blob Either as part of PutBlob or independently Associate Metadata with Blob
Blob Details Can include ‘/‘ or other delimeter in name e.g. /<container>/myblobs/blob.jpg Blob always accessed by name
Blob Containers Multiple Containers per Account Special $root container Blob Container A container holds a set of blobs Set access policies at the container level Associate Metadata with Container List the blobs in a container Including Blob Metadata and MD5 NO search/query. i.e. no WHERE MetadataValue = ? Blobs Throughput Effectively in Partition of 1 Target of 60MB/s per Blob
Two Types of Blobs Under the Hood Block Blob Page Blob
Shared Access Signatures Fine grain access rights to blobs and containers Sign URL with storage key – permit elevated rights Revocation Use short time periods and re-issue Use container level policy that can be deleted
Table Storage Concepts Account Table Entity Name =… Email = … customers Name =… EMailAdd= contoso Photo ID =… Date =… photos Photo ID =… Date =…
Entity Properties Entity can have up to 255 properties Up to 1MB per entity Mandatory Properties for every entity PartitionKey & RowKey (only indexed properties) Uniquely identifies an entity Defines the sort order Timestamp Optimistic Concurrency Exposed as an HTTP Etag No fixed schema for other properties Each property is stored as a <name, typed value> pair No schema stored for a table Properties can be the standard .NET types String, binary, bool, DateTime, GUID, int, int64, and double
No Fixed Schema FAV SPORT Canoeing
Querying ?$filter=Last eq ‘Wegner’
Purpose of the PartitionKey Entity Locality Entities in the same partition will be stored together Entity Group Transactions Atomic multiple Insert/Update/Delete in same partition in a single transaction Table Scalability Target throughput – 500 tps/partition, several thousand tps/account Automatically load balance partitions
Messaging S R Queue Asynchronous communication Offline processing Load-balancing Topic & Subscription Asynchronous communication Publish/Subscription pattern Message routing Queue R S R Queue R
System Center Storage Relational Data Private Cloud On Premises Since Day 1, Full control, lots of work, not easily scalable Raw Hardware Killer offering, Can migrate on premises easily, clusters, VPNs Semi-manual SQL VMs (IaaS) Public Cloud Fully abstracted, triple replication, 150 GB limit Challenging performance SQL Database (PaaS) Now you can now get reserved capacity