Windows Azure - Ericnel
-
Upload
ukdpe -
Category
Technology
-
view
1.641 -
download
6
description
Transcript of Windows Azure - Ericnel
![Page 1: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/1.jpg)
Windows AzureDeveloping and deploying your first Cloud Service
Eric NelsonDeveloper & Platform GroupMicrosoft [email protected] http://geekswithblogs.net/IUpdateable http://twitter.com/ericnel
![Page 2: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/2.jpg)
The plan...
Cloud101Microsoft and CloudIntroduce Azure Services Platform
Windows AzureWeb RoleWorker Role
Storage in the CloudSQL Data ServicesWindows Azure Storage
Table, Blob
![Page 3: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/3.jpg)
Cloud?
![Page 4: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/4.jpg)
Cloud Computing 101
Cloud ComputingRun/Store stuff in the cloud -
Somebody else has the data center/headaches
Infrastructure as a Service (IaaS)Example: Amazon Elastic Compute Cloud (EC2)
Platform as a Service (PaaS)Example: Force.com,Google App Engine
Windows Azure is a PaaS
![Page 5: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/5.jpg)
2008 and 2009 – exciting for Cloud Computing with Microsoft
SQL Server Data Services (SSDS) – announced at MIX 08 (March 2008)
“SQL Server in the cloud”
Azure Services Platform – announced at PDC 08 (October 2008)
Windows Azure “O.S. for the Cloud”+ additional servicesRESTful – enabling “any client” access
![Page 6: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/6.jpg)
Azure Services Platform
ServiceBus
AccessControl
Workflow
…
Database
Reporting
Analytics
…
Compute Storage Manage
Identity
Devices
Contacts
…
…
…
Your Applications
An internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set
of developer services that can be used individually or together.
![Page 7: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/7.jpg)
Azure Services Platform
ServiceBus
AccessControl
Workflow
…
Database
Reporting
Analytics
…
Compute Storage Manage
Identity
Devices
Contacts
…
…
…
Your Applications
An internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set
of developer services that can be used individually or together.
In 50 minute
s
![Page 8: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/8.jpg)
Windows Azure
![Page 9: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/9.jpg)
It is an operating system for the cloudIt is designed for utility computing
Many is better than oneLoose couplingSimple stores scale
It provides facilities to:Write your apps (developer experience)Host your apps (compute)Manage your apps (service management)Store your data (storage)
What Is Windows Azure?
![Page 10: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/10.jpg)
{ Simple Walkthough }
It is not that hard
demo
![Page 11: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/11.jpg)
A B
C
Sidebar: What are these?
D
![Page 12: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/12.jpg)
![Page 13: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/13.jpg)
Default.aspx(Take Order + Process
Order)
LB
![Page 14: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/14.jpg)
Tight coupling : Default.aspx.cs
public partial class _Default : System.Web.UI.Page { protected void Button1_Click(object sender,EventArgs e) { var order = txtOrder.Text; ProcessOrder(order); }
protected void ProcessOrder(string order) { //Make some coffee!
... }
}
![Page 15: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/15.jpg)
Default.aspx(Take Order)
Windows Azure Queues
LB
Worker.cs(Process Order)
![Page 16: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/16.jpg)
Loose coupling : Default.aspx.cs
public partial class _Default : System.Web.UI.Page { protected void Button1_Click(object sender,EventArgs e) { var order = txtOrder.Text;
QueueStorage qStore = QueueStorage.Create(_account);
MessageQueue orderQ = qStore.GetQueue("OrderQueue");
orderQ.PutMessage(new Message(order)); }
}
![Page 17: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/17.jpg)
Loose coupling : WorkerRole.cs
public class WorkerRole : RoleEntryPoint { public override void Start() {
QueueStorage qStore = QueueStorage.Create(_account); MessageQueue orderQ = qStore.GetQueue("OrderQueue"); while (true) { Message msg = orderQ.GetMessage();
if( msg != null) ProcessOrder(msg.ContentAsString()); } } protected void ProcessOrder(string order) {
//Make some coffee! ...
}
![Page 18: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/18.jpg)
{Revisit, Instances and Workers}
demo
![Page 19: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/19.jpg)
![Page 20: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/20.jpg)
![Page 21: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/21.jpg)
Storage in the Cloud
![Page 22: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/22.jpg)
Windows Azure Datacenter
Your Service
Typical Azure Application = WebRole + Worker Role + Storage
LB
Internet
Web Site(ASPX, ASMX,
WCF)
Web Site(ASPX, ASMX,
WCF)Web Role
(ASPX, WCF)
Worker Service
Worker Role
LB
StorageTables Blobs
Queue
SQ
L D
ata
Serv
ices2
1
![Page 23: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/23.jpg)
Windows Azure Datacenter
Azure Application = many options
Internet
Application ONE
Web Site(ASPX, ASMX, WCF)
Web Site(ASPX, ASMX, WCF)Web Role
Worker ServiceWorker Role
ONE StorageTables Blobs
Queue SQL Data ServicesDatabase ONE
Application TWO
Web Site(ASPX, ASMX, WCF)
Web Site(ASPX, ASMX, WCF)Web Role
Worker ServiceWorker Role
TWO StorageTables Blobs
Queue
Application THREE
Web Site(ASPX, ASMX, WCF)
Web Site(ASPX, ASMX, WCF)Web Role
Worker ServiceWorker Role
SQL Data Services
Database THREE
FOUR StorageTables Blobs
Queue
![Page 24: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/24.jpg)
Windows Azure and SDS
Azure Storage SQL Data Services
Vision
Access
Relational? (today)
Relational? (tomorrow)
Analogy
![Page 25: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/25.jpg)
Windows Azure and SDS
Azure Storage SQL Data Services
Vision Massively scalable, highly available store in the Cloud
Access REST(Uses ADO.NET Data Services)
Relational? (today)
No
Relational? (tomorrow)
No
Analogy
![Page 26: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/26.jpg)
Windows Azure and SDS
Azure Storage SQL Data Services
Vision Massively scalable, highly available store in the Cloud
Highly scalable, highly available relational store in the Cloud
Access REST(Uses ADO.NET Data Services)
SqlClient + TSQL(Use Azure Web Role + ADO.NET Data Services if REST is required)
Relational? (today)
No Yes – but with some limitations
Relational? (tomorrow)
No Yes – with less and less limitations
Analogy
![Page 27: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/27.jpg)
Windows Azure and SDS
Azure Storage SQL Data Services
Vision Massively scalable, highly available store in the Cloud
Highly scalable, highly available relational store in the Cloud
Access REST(Uses ADO.NET Data Services)
SqlClient + TSQL(Use Azure Web Role + ADO.NET Data Services if REST is required)
Relational? (today)
No Yes – but with some limitations
Relational? (tomorrow)
No Yes – with less and less limitations
Analogy File System RDBMS – as it is!
![Page 28: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/28.jpg)
Windows Azure Datacenter
Your Service
Azure Application = WebRole + Worker Role + Storage
LB
Internet
Web Site(ASPX, ASMX,
WCF)
Web Site(ASPX, ASMX,
WCF)Web Role
(ASPX, WCF)
Worker Service
Worker Role
LB
StorageTables Blobs
Queue
SQ
L D
ata
Serv
ices
Easy
Trickier
![Page 29: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/29.jpg)
Symmetrical APIs – nearly
CloudOn Premise
Application C#, VB, Ruby, PHP
etc
Relational Data
TSQL
![Page 30: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/30.jpg)
Windows Azure Storage
Storage that isDurable, Scalable, Highly Available, Secure, Performant
Rich Data AbstractionsService communication: queues, locks, …Large user data items: blobs, blocks, …Service state: tables, caches, …
Simple and Familiar Programming Interfaces
REST Accessible and ADO.NET
![Page 31: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/31.jpg)
Blob
Entities
Messages
Windows Azure Data Storage Concepts
http://<account>.blob.core.windows.net/<container>
http://<account>.table.core.windows.net/<table>
http://<account>.queue.core.windows.net/<queue>
Account
Container
Table
Queue
![Page 32: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/32.jpg)
Blob Storage
BlockBlobContainerAccount
Account
pictures
IMG001.JPG
IMG002.JPG
movies MOV1.AVI
Block 1
Block 2
Block 3
![Page 33: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/33.jpg)
Table Storage
Massively Scalable TablesBillions of entities (rows) and TBs of dataAutomatically scales to thousands of servers as traffic grows
Highly AvailableCan always access your data
DurableData is replicated at least 3 times
![Page 34: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/34.jpg)
Tables - CapabilitiesWhat tables don’t do
Not relationalNo Referential Integrity
No JoinsLimited Queries
No Group byNo AggregationsNo TransactionsNo Transactions
What tables can do
CheapVery Scalable
FlexibleDurable
If these are important to you, use SQL Data Services Store LOTS of stuff
![Page 35: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/35.jpg)
Table Data Model
Data stored in TablesA Table is a set of Entities (rows)An Entity is a set of Properties (columns)
Entity has:PartitionKey – enables scalabilityRowKey – unique id within the partition
the only indexed property Timestamp – for optimistic concurrency255 properties totalMax size of 1MB
![Page 36: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/36.jpg)
Partition KeyDocument Name
Row KeyVersion
Property 3Modification Time
…..
Property NDescription
Examples Doc V1.0 8/2/2007 ….. Committed version
Examples Doc V2.0.1 9/28/2007 Alice’s working version
FAQ Doc V1.0 5/2/2007 Committed version
FAQ Doc V1.0.1 7/6/2007 Alice’s working version
FAQ Doc V1.0.2 8/1/2007 Sally’s working version
Partition Example
Partition 1
Partition 2
Table Partition - all entities in table with same partition key value
Application controls granularity of partition
![Page 37: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/37.jpg)
Working with Tables
Vessel Position Reporting System – SQL Server
VesselId
xxx-xx1
Time
10:15 14 Nov
Latitude
01.23
Longitude
53.24
Speed
0
xxx-xx1 10:05 14 Nov 04.45 54.32 5
xxx-xx1 09:55 14 Nov 02.32 52.34 4
xxx-xx2 10:15 14 Nov 01.23 51.23 10
To find last pos report for vessel in SQL:
select TOP(1) * from PosRptsorder by [Time] DESCwhere VesselId = ???
![Page 38: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/38.jpg)
Working with Tables
Solving this the Azure wayPartitionKey
Time Latitude Longitude Speed
xxx-xx1 10:15 14 Nov 01.23 53.24 0
xxx-xx1 10:05 14 Nov 04.45 54.32 5
xxx-xx1 09:55 14 Nov 02.32 52.34 4
xxx-xx2 01.23 51.23 1010:15 14 Nov
PartitionKey
VesselId
![Page 39: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/39.jpg)
Working with Tables
PartitionKey
RowKey Latitude Longitude Speed
xxx-xx1
10:15 14 Nov 01.23 53.24 0
10:05 14 Nov 04.45 54.32 5
09:55 14 Nov 02.32 52.34 4
RowKey needs to be a string
2521756430999999999
2521756436999999999
2521756442999999999
(DateTime.MaxValue – time).Ticks.ToString ()
Stored in-order:Just need to do a
top on the partition
time.Ticks.ToString ()
Makes it descending
![Page 40: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/40.jpg)
Azure Services Platform Roadmap
First CTPDeveloper CTP for Services SDKs, and
Tools
Fall 2008 Spring 2009
Updated CTPsEnable Full trust & Fast CGI
Geo-location support.NET Services Open CTP
Live Framework Open CTPSDS Invitation-only CTP
Fall 2009
Commercial AvailabilityWindows Azure.NET ServicesSQL Services
Summer 2009
Pricing and SLA confirmationSDS Public CTP
![Page 41: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/41.jpg)
Windows Azure Summary
Many is better than oneLet Microsoft worry about this
Loose couplingWeb Role and Worker Role
Storage choiceAzure Storage: Simple stores scale
Table, Blob, Queue
SQL Data Services: Full RDBMSStored Procedures, Schema, Transactions, Views etc
![Page 42: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/42.jpg)
What next?•Play with Windows Azure – http://www.azure.com•Understand REST – good and bad practices•Watch the MIX 09 recordings http://live.visitmix.com•Slides at http://geekswithblogs.net/IUpdateableLearn•Students can get Visual Studio through Microsoft DreamSpark•Startups get tools and more via BizSpark•Developers can also use the free Visual Studio Express•Or just use none Microsoft tools and languages e.g. PHP http://phpazure.codeplex.com/
Need tools?
• http://www.newcloudapp.com/ Win
![Page 43: Windows Azure - Ericnel](https://reader035.fdocuments.us/reader035/viewer/2022062418/554f3cdcb4c905cd048b5199/html5/thumbnails/43.jpg)
© 2008 Microsoft Ltd. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the
date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.