Storage in the Windows Azure Platform - ericnel
-
Upload
ukdpe -
Category
Technology
-
view
1.980 -
download
2
description
Transcript of Storage in the Windows Azure Platform - ericnel
![Page 1: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/1.jpg)
Windows Azure PlatformWindows Azure Platform
Storing data in the cloud
Eric NelsonMicrosoft UK
Email: [email protected] Blog: http://geekswithblogs.net/iupdateableTwitter: http://twitter.com/ericnel and http://twitter.com/ukmsdnPodcast: http://bit.ly/msdnpodcast Newsletter: http://msdn.microsoft.com/en-gb/flash
![Page 2: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/2.jpg)
Windows Azure Platform
2
Windows Azure Platform
• Storage in the Cloud• Queues
• Blobs
• Tables• Relational
Agenda
![Page 3: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/3.jpg)
Windows Azure Platform
![Page 4: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/4.jpg)
Windows Azure Platform
STORAGE IN THE CLOUD…
Windows Azure Storage and SQL Azure
![Page 5: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/5.jpg)
Windows Azure PlatformSolve using the Cloud aka Windows Azure Platform
Web Role
AzureStorag
e
Browser
Browser
Browser
Browser
Browser
Web Role
Web Role
N L B
Worker Role
Worker RoleN
L B
p1 p2 p3
You don’t see this bit
You don’t see this bit
You don’t see this bit
Worker Role
or…Maybe you do
![Page 6: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/6.jpg)
Windows Azure PlatformSolve using the Cloud aka Windows Azure Platform
Web Role
AzureStorag
e
Browser
Browser
Browser
Browser
Browser
Web Role
Web Role
N L B
Worker Role
Worker RoleN
L B
p1 p2 p3
You don’t see this bit
You don’t see this bit
You don’t see this bit
Worker Role
Ok, you
definitely do
SQLAzure
![Page 7: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/7.jpg)
Windows Azure Platform
3 Important Services• Windows Azure– Compute and
Storage• SQL Azure– Storage
• .NET Services– Connecting
3 Critical Concepts• Computation– Web and Worker
• Storage– Table, Blob,
Relational• Messaging– Queues, Service Bus
![Page 8: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/8.jpg)
Windows Azure Platform
BLOBS, TABLES, RELATIONAL
![Page 9: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/9.jpg)
Windows Azure Platform
QUEUES
![Page 10: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/10.jpg)
Windows Azure Platform
BLOBS, TABLES, RELATIONAL
![Page 11: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/11.jpg)
Windows Azure Platform
BLOBS, TABLES, RELATIONAL
![Page 12: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/12.jpg)
Windows Azure Platform
12
Windows Azure Platform
Provides structured storage• Massively scalable tables (TBs of data)• Self scaling• Highly available• Durable
Familiar and easy-to-use API, layered• .NET classes and LINQ• ADO.NET Data Services – .NET 3.5 SP1• REST – with any platform or language
Introduction to Tables
![Page 13: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/13.jpg)
Windows Azure Platform
13
Windows Azure Platform
No join No group by No order by “No Schema”
Not a Relational Database
![Page 14: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/14.jpg)
Windows Azure Platform
14
Windows Azure Platform
Table• A Table is a set of Entities (rows)• An Entity is a set of Properties (columns)
Entity• Two “key” properties form unique ID• PartitionKey – enables scale• RowKey – uniquely ID within a partition
Data Model
![Page 15: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/15.jpg)
Windows Azure Platform
15
Windows Azure Platform
Getting all of dunnry’s blog posts is fast• Single partition
Getting all posts after 2008-03-27 is slow• Traverse all partitions
Key Example – Blog PostsPartition Key
AuthorRow Key
PermalinkProperty 3ChangedOn
Property 4Title
smarx i-love-tables 2009-07-04 I Love Tables!
smarx tables-are-awesome 2009-07-12 Tables are
Awesome!
dunnry cheetos 2008-03-27 I Love Cheetos
dunnry blogging-again 2009-07-15 Finally Blogging
Again
dunnry phluffyfotos 2008-04-09 PhluffyFotos!
Partition 1
Partition 2
![Page 16: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/16.jpg)
Windows Azure PlatformQuery a Table
Worker Role
AzureTable
Storage
http://account.table.core.windows.net
REST: GET http://account.table.core.windows.net/Customer?$filter=%20PartitionKey%20eq%20value LINQ:var customers = from o in context.CreateQuery<customer>(“Customer”) where o.PartitionKey == value select o;
![Page 17: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/17.jpg)
Windows Azure Platform
DEMO: WINDOWS AZURE STORAGE
![Page 18: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/18.jpg)
Windows Azure Platform
18
Windows Azure Platform
Different Entity types in the same table E.g. PK = CustomerId
• Customer, Order and OrderDetails in the same table
Lessons LearnedAzure Storage – Entity Group Transactions
PK RK
Cust1 Cust1 Name=“MSFT” Desc=“...”
Cust1 Order1 Date=“25/12/09”
Cust1 OrdeDetail1 Product=12 Quantity=6
Cust1 OrderDetail2 Product=13 Quantity=1
Cust2 Cust2 Name=“IBM” Desc=“...”
![Page 19: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/19.jpg)
Windows Azure Platform
BLOBS, TABLES, RELATIONAL
![Page 20: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/20.jpg)
Windows Azure Platform
SQL Azure (July 2009)aka SQL Data Services
aka SQL Server Data Services
![Page 21: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/21.jpg)
Windows Azure PlatformOn Premise Programming Model
SQL Server
Client RDBMS
TDSData
This is what we do on-premise...
![Page 22: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/22.jpg)
Windows Azure PlatformSame for the cloud?
SQL Server
Client RDBMS
TDSData
So, is this is what we would like to do in the cloud...
![Page 23: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/23.jpg)
Windows Azure PlatformSQL Azure can do this
SQL Azure
Client RDBMS
TDSData
![Page 24: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/24.jpg)
Windows Azure PlatformSQL Azure can also do this
SQL Azure
Browser RDBMS
TDSWeb Role
HTTP
![Page 25: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/25.jpg)
Windows Azure PlatformAnd this!
SQL Azure
Browser RDBMS
TDS
Web RoleHTTP
Worker Role
Queue
![Page 26: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/26.jpg)
Windows Azure PlatformWhich means you can easily migrate from this
Browser RDBMS
Web TierHTTP
Bus. Logic
“The Data Center”
SQL Server
TDS
![Page 27: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/27.jpg)
Windows Azure PlatformTo this… Windows Azure and SQL Azure
SQL Azure
Browser RDBMS
TDS
Web RoleHTTP
Worker Role
Queue
“The Cloud”
![Page 28: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/28.jpg)
Windows Azure Platform
DEMO: SQL AZURE
![Page 29: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/29.jpg)
Windows Azure Platform
29
Windows Azure Platform
From the database “down” it’s just SQL Server• Well, almost …• Many tools don’t work today
• System catalog is different
Above the database is taken care of for you• You can’t really change anything
Lessons LearnedSQL Azure
![Page 30: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/30.jpg)
Windows Azure Platform
30
Windows Azure Platform
Tooling• SSMS partially works – “good enough”• Can not create connection using Visual Studio designer• Other tools may work better• No BCP (currently)
DDL• Must be a clustered index on every table• No physical file placement• No indexed views• No “not for replication” constraint allowed• No Extended properties• Some index options missing (e.g. allow_row_locks, sort_in_tempdb ..)• No set ansi_nulls on
Lessons LearnedSQL Azure
![Page 31: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/31.jpg)
Windows Azure Platform
31
Windows Azure Platform
Types• No spatial or hierarchy id• No Text/images support.
• Use nvarchar(max)• XML datatype and schema allowed but no XML index or schema
collection.
Security• No integrated security
Lessons LearnedSQL Azure
![Page 32: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/32.jpg)
Windows Azure Platform
32
Windows Azure Platform
Development• No CLR• Local temp tables are allowed • Global temp tables are not allowed• Cannot alter database inside a connection• No UDDT’s• No ROWGUIDCOL column property
Lessons LearnedSQL Azure
![Page 33: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/33.jpg)
Windows Azure Platform
33
Windows Azure Platform
SQL Server is very familiar• SQL Azure *is* SQL Server in the cloud
Windows Azure Storage is…very different Make the right choice
• Understand Azure storage• Understand SQL Azure• Understand they are totally different
You can use both
Lessons LearnedSQL Azure vs Windows Azure Tables
![Page 34: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/34.jpg)
Windows Azure Platform
34
Windows Azure Platform
SQL Azure is not always the best storage option SQL Azure costs more
• Delivers a *lot* more functionality
SQL Azure is more limited on scale
Lessons Learned SQL Azure vs Windows Azure Tables
![Page 35: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/35.jpg)
Windows Azure Platform
35
Windows Azure Platform
Can be done• Many 10GB databases
Not fun
Lessons Learned SQL Azure and Sharding
![Page 36: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/36.jpg)
Windows Azure Platform
IN SUMMARY
![Page 37: Storage in the Windows Azure Platform - ericnel](https://reader035.fdocuments.net/reader035/viewer/2022062405/554f3cd3b4c905cd048b5193/html5/thumbnails/37.jpg)
Windows Azure Platform
Resources
• Slides, links and more– http://geekswithblogs.net/iupdateable– Azure Training Kit (August update)
• www.azure.com– Sign up, links to resources etc
• http://www.cerebrata.com