UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
Windows Azure - Ericnel
1. Eric Nelson
Developer & Platform Group
Microsoft Ltd
eric.nelson@microsoft.com
http://geekswithblogs.net/IUpdateable
http://twitter.com/ericnel
2. Cloud
101
Microsoft and Cloud
Introduce Azure Services Platform
Windows Azure
Web Role
Worker Role
Storage in the Cloud
SQL Data Services
Windows Azure Storage
Table, Blob
4. Cloud Computing
Run/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
5. 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 services
RESTful – enabling “any client” access
9. It is an operating system for the cloud
It is designed for utility computing
Many is better than one
Loose coupling
Simple stores scale
It provides facilities to:
Write your apps (developer experience)
Host your apps (compute)
Manage your apps (service management)
Store your data (storage)
22. Web Site
Web Site
Web Role
(ASPX, ASMX,
(ASPX, ASMX,
WCF)
(ASPX, WCF)
WCF)
2
SQL Data Services
L
B
Worker
Worker
Service
Role
Internet
Your Service
Queue
L
B
Blobs
1
Tables
Storage
Windows Azure Datacenter
23. Web Site
Web Site
Web Role
(ASPX, ASMX, WCF)
(ASPX, ASMX, WCF)
Queue SQL Data
Worker
Worker Service Services
Role Blobs Database ONE
Tables
Application ONE ONE Storage
Web Site
Web Site
Web Role
(ASPX, ASMX, WCF)
(ASPX, ASMX, WCF)
Queue
Worker
Worker Service
Role Blobs
Internet Application TWO Tables
TWO Storage
Web Site
Web Site
Web Role
(ASPX, ASMX, WCF)
(ASPX, ASMX, WCF) SQL Data
Worker
Worker Service
Services
Role Database THREE
Application THREE
Queue
Tables Blobs
FOUR Storage Windows Azure Datacenter
25. 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? No
(tomorrow)
Analogy
26. Azure Storage SQL Data Services
Vision Massively scalable, Highly scalable,
highly available highly available
store in the Cloud relational store in
the Cloud
Access REST SqlClient + TSQL
(Use Azure Web Role + ADO.NET
(Uses ADO.NET Data Services if REST is required)
Data Services)
Relational? (today) No Yes – but with some
limitations
Relational? No Yes – with less and
(tomorrow) less limitations
Analogy
27. Azure Storage SQL Data Services
Vision Massively scalable, Highly scalable,
highly available highly available
store in the Cloud relational store in
the Cloud
Access REST SqlClient + TSQL
(Use Azure Web Role + ADO.NET
(Uses ADO.NET Data Services if REST is required)
Data Services)
Relational? (today) No Yes – but with some
limitations
Relational? No Yes – with less and
(tomorrow) less limitations
Analogy File System RDBMS – as it is!
28. Web Site
Web Site
Web Role
(ASPX, ASMX,
(ASPX, ASMX,
WCF)
(ASPX, WCF)
WCF)
SQL Data Services
L
B Easy
Worker
Worker
Service
Role
Internet
Your Service
Queue
L
Trickier
B
Blobs
Tables
Storage
Windows Azure Datacenter
29. Cloud
On Premise
Application
C#, VB, Ruby, PHP etc
Relational
Data
TSQL
30. Storage that is
Durable, Scalable, Highly Available, Secure,
Performant
Rich Data Abstractions
Service communication: queues, locks, …
Large user data items: blobs, blocks, …
Service state: tables, caches, …
Simple and Familiar Programming
Interfaces
REST Accessible and ADO.NET
33. Massively Scalable Tables
Billions of entities (rows) and TBs of data
Automatically scales to thousands of servers
as traffic grows
Highly Available
Can always access your data
Durable
Data is replicated at least 3 times
34. What tables don’t do What tables can do
Not relational Cheap
No Referential Integrity Very Scalable
If theseNo Joins
are Flexible
importantData
Limitedto you,
use SQL
Queries Durable
ServicesGroup by
No Store LOTS of stuff
No Aggregations
No Transactions
No Transactions
35. Data stored in Tables
A Table is a set of Entities (rows)
An Entity is a set of Properties (columns)
Entity has:
PartitionKey – enables scalability
RowKey – unique id within the partition
the only indexed property
Timestamp – for optimistic concurrency
255 properties total
Max size of 1MB
36. Partition Key Row Key Property 3 ….. Property N
Document Version Modification Description
Name Time
Examples Doc V1.0 8/2/2007 ….. Committed version
Partition
Examples Doc V2.0.1 9/28/2007 Alice’s working version 1
FAQ Doc V1.0 5/2/2007 Committed version
FAQ Doc V1.0.1 7/6/2007 Alice’s working version Partition
2
FAQ Doc V1.0.2 8/1/2007 Sally’s working version
37. Vessel Position Reporting System – SQL Server
VesselId 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 10:15 14 Nov 01.23 51.23 10
To find last pos report for vessel in SQL:
select TOP(1) * from PosRpts
order by [Time] DESC
where VesselId = ???
38. Solving this the Azure way
PartitionKey
VesselId 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 10:15 14 Nov 01.23 51.23 10
PartitionKey
39. Stored in-order:
RowKey needs to
Just need to do a
be a string
top on the
partition PartitionKey xxx-xx1
RowKey Latitude Longitude Speed
10:15 14 Nov
2521756430999999999 01.23 53.24 0
10:05 14 Nov
2521756436999999999 04.45 54.32 5
Makes it 14 Nov
09:55
2521756442999999999 02.32 52.34 4
descending
(DateTime.MaxValue – time).Ticks.ToString ()
time.Ticks.ToString ()
40. Developer CTP for Enable Full trust & Fast CGI
Services SDKs, and Geo-location support SDS Public CTP Windows Azure
Tools .NET Services Open CTP .NET Services
Live Framework Open CTP SQL Services
SDS Invitation-only CTP
41. Many is better than one
Let Microsoft worry about this
Loose coupling
Web Role and Worker Role
Storage choice
Azure Storage: Simple stores scale
Table, Blob, Queue
SQL Data Services: Full RDBMS
Stored Procedures, Schema, Transactions,
Views etc
42. • Play with Windows Azure – http://www.azure.com
Learn • Understand REST – good and bad practices
• Watch the MIX 09 recordings http://live.visitmix.com
• Slides at http://geekswithblogs.net/IUpdateable
Need • Students can get Visual Studio through Microsoft DreamSpark
• Startups get tools and more via BizSpark
• Developers can also use the free Visual Studio Express
tools? • Or just use none Microsoft tools and languages e.g. PHP
http://phpazure.codeplex.com/
• http://www.newcloudapp.com/
Win
S3S3 stores arbitrary objects up to 5 gigabytes in size, each accompanied by up to 2 kilobytes of metadata. Objects are organized into buckets (each owned by an AWS account), and identified within each bucket by a unique, user-assigned key.Buckets and objects can be created, listed, and retrieved using either a REST-style HTTP interface or a SOAP interface. Additionally, objects can be downloaded using the HTTP GET interface and the BitTorrent protocol.Requests are authorized using an access control list associated with each bucket and object.Bucket names and keys are chosen so that objects are addressable using HTTP URLs:http://s3.amazonaws.com/bucket/key http://bucket.s3.amazonaws.com/key EC2When it launched in August 2006, the EC2 service offered Linux and later Sun Microsystems' OpenSolaris and Solaris Express Community Edition. In October 2008, EC2 added the Windows Server 2003 operating system to the list of available operating systems
http://en.wikipedia.org/wiki/Operating_system An operating system (commonly abbreviated to either OS or O/S) is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer. The operating system acts as a host for applications that are run on the machine. As a host, one of the purposes of an operating system is to handle the details of the operation of the hardware. This relieves application programs from having to manage these details and makes it easier to write applications.
An application execution environment that abstracts away the hardwareA shared file system with access controlResource allocation from a shared poolSupport for powerful programming modelsInter-operability with other systems
The “opportunities to get sacked” slide
http://eric.blob.core.windows.net/music/rock/rush/xanadu.mp3Blobs – Provide a simple interface for storing named files along with metadata for the fileTables – Provide structured storage. A Table is a set of entities, which contain a set of propertiesQueues – Provide reliable storage and delivery of messages for an applicationTab
Easy to use REST Put/Get/Delete interfaceCan read from any Offset, Length of BlobConditional Put and Get BlobMax Blob size50 GB using PutBlock and PutBlockList64 MB using PutBlobBlocks provide continuation for blob upload Put Blob/BlockList == Replace Blob for CTPCan replace an existing blob with new blob/blocksEach Blob is a list of blocksA Block can be up to 4MB each Each block can be variable sizeEach block has a 64 byte ID, scoped by blob nameBlock operationPutBlockPuts an uncommitted block defined by the block ID for the blob Block list operationsPutBlockListProvide the list of blocks to comprise the readable version of the blobCan use uncommitted blocks onlyGetBlockListReturns the list of committed blocks (not the block data)Block ID and size of block are returned for each block