35

Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret
Page 2: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Saranya SriramDeveloper EvangelistMicrosoft Corporation India

Page 3: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Azure™ Services Platform

Microsoft’s Cloud – ReCap

Page 4: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

AgendaData is King

Motivation ? Why data outside your premise?

Microsoft’s Data Storage offerings

Windows Azure

SQL Services

Programming & Coding for data on cloud OS

What we will not learn?Deep Dive into SQL Services

Any SQL Services 2008 specifics

Architectural considerations to model data in real life

Page 5: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Windows Azure Storage SQL Data Services

Today’s discussion – next 60 minutes

Page 6: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Windows Azure Storage Service

Fabric

Compute Storage

Application

Blobs Queues

HTTP

Tables

Page 7: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Windows Azure StorageStorage that is

Durable

Scalable (capacity and throughput)

Highly Available

Security

Performance Efficient

Pay for what you use

Rich Data AbstractionsService communication: queues, locks, …

Large user data items: blobs, blocks, …

Service state: tables, caches, …

Simple and Familiar Programming InterfacesREST Accessible and ADO.NET

Page 8: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Windows Azure Storage Account

Account

Blob Table Queue

User creates a globally unique storage accountReceived a 256 bit secret key when creating account

Geo-location & Co-location coming soon

Provides security for accessing the store Use secret key to create HMACSHA256 signature for each request

Use signature to authenticate request at server

Page 9: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Blobs Storage• Storage Account

• An account can have many Containers

• Container• A container is a set of blobs

• Sharing policies are set at the container level • Public READ or Private

• Associate Metadata with Container• Metadata is

<name, value> pairs

• Up to 8KB per container

• List the blobs in a container

BlobContainerAccount

sally

pictures

IMG001.JPG

IMG002.JPG

movies MOV1.AVI

Page 10: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Slide Share for Tech Ed India 2009 -Basic

Page 11: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Table StorageTable

A storage account can create many tables

Table name is scoped by account

Data is stored in tablesA table is a set of entities (rows)

An entity is a set of properties (columns)

EntityTwo “key” properties that together

are the unique ID of the entity in the

tablePartitionKey – enables scalability

RowKey – uniquely identifies the

entity within the partition

EntityTableAccount

sally

users

photo index

Page 12: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Table . . .Table Table

Windows Azure StorageA closer look at tables

Entity . . .Entity Entity

Property PropertyProperty

Name Type Value

Storage

Accounts

Page 13: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Tables - Capabilities

What tables don’t do

Not relational

No Referential Integrity

No Joins

Limited Queries

No Group by

No Aggregations

No Transactions

No Transactions

What tables can do

Cheap

Very Scalable

Flexible

Durable

If these are important to you, use:

What tables contain

Partition key & Row key

Timestamp

255 properties for your data & data of size 1MB

Page 14: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Query a Table

LINQDataServiceContext context = new DataServiceContext(‚http://myaccount.table.core.windows.net‛);

var customers = from o incontext.CreateQuery<Customer>(‚Customer‛)where o.PartitionKey == ‚Lee‛select o;

foreach (Customer customer in customers) { }

GET http://myaccount.table.core.windows.net/Customer?$filter= PartitionKey eq ‘Lee’

Page 15: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Slide Share for Tech Ed India 2009 -Revisited

Page 16: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Queue Storage

An account can create many queuesQueue Name is scoped by the account

A Queue contains messagesNo limit on number of messages stored in a queue

A message is stored for at most a week in a queue

http://<Account>.queue.core.windows.net/<QueueName>

MessagesMessage size <= 8 KB

To store larger data, store data in blob/entity storage, and the blob/entity name in the message

Page 17: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

2 1

C1

C2

Dequeue and Delete Messages

1234

Producers Consumers

P2

P1

3

2. Dequeue(Q, 30 sec) msg 2

1. Dequeue(Q, 30 sec) msg 1

12

Page 18: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

C1

C2

Dequeue and Delete Messages

34

Producers Consumers

P2

P1

1

2

2. Dequeue(Q, 30 sec) msg 23. C2 consumed msg 24. Delete(Q, msg 2)7. Dequeue(Q, 30 sec) msg 1

1. Dequeue(Q, 30 sec) msg 15. C1 crashed

12 1 6. msg1 visible 30 seconds after Dequeue3

Page 19: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Slide Share for Tech Ed India 2009 -Revisited

Page 20: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Account

Container Blobs

Table Entities

Queue 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>

Page 21: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Slide Share for Tech Ed India 2009 -Upload onto the Azure Storage & take REST

Page 22: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Enables developers to access storageMassively scalable, durable, and available

Anywhere at anytime access

Automatically scale to meet peek traffic demands

Only pay for what the service uses

Easy to use REST and .NET InterfacesBlobs, tables, and queues

Takeaways

Page 23: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

SQL ServicesSQL Services

.NET Services

Windows AzureLive Services

Applications

Applications

OthersWindows

MobileWindowsVista/XP

WindowsServer

SQL Data

Services

Others (Future)

Page 24: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Place

Type

Service

Data Platform: Device to Cloud

Analysis

Caching

Integration

Sync

Search

RelationalBLOB

QueryBackup

Load

MultiDim

InMemory FileXML

ReportingMiningProtection

RDBMS

Model & policy based development and management

Page 25: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Extending SQL Data Platform to Cloud

Initial services – core RDBMS capabilities as a service (SDS), Data Sync and Data Hub

Future Offerings

Additional data platform capabilities as a service: BI/DSS, DW

New services: Reference Data, Secure Data Hub

Reference DataReporting

Business Intelligence

Symmetric Programming Model Data Hub Aggregation

Enable new uses of data to deliver differentiated business value

Page 26: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

The New SQL Data Services

Familiar SQL Server relational model

Uses existing APIs & tools

Built for the Cloud with availability and scale

Accessible to all from PHP, Ruby, and Java

Focus on combining the best features of SQL Server running at scale with low friction

Page 27: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Accessing SDS

User DatabaseconnStringBuilder.InitialCatalog = "mydatabase";

// Specify your user database to connect

Master/Server DatabaseconnStringBuilder.DataSource = "myserver.data.dev.mscds.com“;

// Specify the DNS name of my SDS server master db)

connStringBuilder.UserID = "jeff@myserver";

// Specify my user id

Page 28: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

SQL Client (ADO.net) code snippetJust change the connection string values:static void Main(string[] args) {

SqlConnectionStringBuilder connStringBuilder = new SqlConnectionStringBuilder(); connStringBuilder.DataSource = "myserver.data.dev.mscds.comconnStringBuilder.InitialCatalog = "mydatabase"; connStringBuilder.Encrypt = true; connStringBuilder.TrustServerCertificate = true; connStringBuilder.UserID = "jeff@myserver"; connStringBuilder.Password = "****";

string createTableSql = @"CREATE TABLE [dbo].[tbl_Person] ( [FirstName] NVARCHAR(64) NOT NULL, [LastName] NVARCHAR(64) NOT NULL CONSTRAINT [personName_PK] PRIMARY KEY CLUSTERED ( [FirstName] ASC, [LastName] ASC ) )";using (SqlConnection conn = new SqlConnection(connStringBuilder.ToString())) {

conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) {

cmd.CommandText = createTableSql; cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); conn.Close();

}}}

Page 29: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Example of SQL Compatibility

In Scope for v1 (likely)

Tables, indexes and views

Stored Procedures

Triggers

Constraints

Table variables, session temp tables (#t)

Out of Scope for v1 (likely)

Distributed Transactions

Distributed Query

CLR

Service Broker

Spatial

Physical server or catalog DDL and views

Page 30: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Foundation of the SDS relational platformBuilt using core SQL Server product codebase

Delivery of rich relational database service –PDC ’09

Key capability of the Azure platform

Supports broad spectrum of scenarios

Takeaways

Page 31: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

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 Availability

Windows Azure.NET ServicesSQL Services

Summer 2009

Pricing and SLA confirmationSDS Public CTP

Page 32: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Getting Started & Resources

1. Download the SDKs and tools from http://www.microsoft.com/azure

2. Get invitation for Windows Azure and start coding

3. Review the hands-on labs and videos available on the site

3. SSDS blog: http://blogs.msdn.com/ssds

4. Azure Services Training KitDownloadable hands-on labs, demos, and presentationshttp://www.azure.com

5. Check Mix09 and PDC 08 sessions

Page 34: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

Related Content

Breakout Sessions (session codes and titles)

1. Cloud Track – Introduction to cloud computing and Windows Azure

2. Cloud Track – .NET services

3. Cloud Track - Code Camp

Page 35: Indiadownload.microsoft.com/.../Saranya_Data_In_Cloud.pdfWindows Azure Storage Account Account Blob Table Queue User creates a globally unique storage account Received a 256 bit secret

© 2009 Microsoft Corporation. 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.