Windows Azure Platform Storage
Upcoming SlideShare
Loading in...5
×
 

Windows Azure Platform Storage

on

  • 3,679 views

Durable data storage is a key component of any cloud computing offering. The Windows Azure Platform offers many options, which can be used alone or in combination. Windows Azure itself offers ...

Durable data storage is a key component of any cloud computing offering. The Windows Azure Platform offers many options, which can be used alone or in combination. Windows Azure itself offers ready-to-use and lightweight storage in the form of tables, blobs, and queues. Another choice for storage is SQL Azure, a true relational database in the cloud. In this session, we’ll explore the highlights of these implementations and how to both create and use storage in each form. We’ll give you guidance on choosing the right forms of storage for your application scenarios.



Highlights include:

· Programming against table & blob storage

· Working with queue storage

· Scaling and configuration

· Understanding SQL Azure databases versus local SQL Server databases

· Database creation, deployments and migrations

· Programming against SQL Azure databases

Statistics

Views

Total Views
3,679
Views on SlideShare
3,634
Embed Views
45

Actions

Likes
2
Downloads
82
Comments
0

3 Embeds 45

http://blogs.msdn.com 31
http://www.slideshare.net 8
http://weblog.chrisricard.net 6

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Welcome back to session 2 of our 3 part presentation! In case you are just joining us, my name is and we’re going to be talking about data storage options on the Windows Azure platform.
  • We’ll take a tour of SQL Azure as a data storage option and then we’ll look at the various types of data storage offered with Windows Azure… in particular, Blobs, Tables, and Queues. I will also make reference to additional materials regarding a new type of data storage that was recently added called Drives.We’ll also learn how to inspect the contents of Windows Azure Data Storage.
  • It’s my intention that when we have completed this session, you’ll have a good understanding of the various data storage options, and you’ll be able to make informed decisions about which types are best for a given storage requirement.
  • We’ll start with SQL Azure... This will give most of developers a common frame of reference as most developers are comfortable with relational databases.In a short while, I will introduce Blobs, Tables, Queues, and DrivesSQL Azure can be thought of as your SQL Server in the cloud. It is based on a subset of SQL Server 2008.Blobs are a means of storing unstructured data, such as pictures, movies, PDF’s, Word documents, and the like.Tables are a means of storing semi-structured or tabular data. Tables are similar to an Excel spreadsheet in the sense that data is tabular and there is no strict type cohesion as there would be in a SQL Server table column. Data stored in tables is partitioned and keyed for retrievalQueues are a means of buffered message delivery. There are very useful for communicating data between our Windows Azure service instances. As our service instances do not have to wait around for the I/O of delivering the message or the result of the message processing, they can dramatically improve the scalability of our software system.Drives are a recently added feature announced at the Los Angeles PDC in November 2009. Drives provide durable storage that appears to our application as an NTFS volume. The drive itself is an abstraction over the same Windows Azure Data Storage used for Blobs. You can get more information on Drives by visiting the PDC site on my slide.Applications may use multiple types of data storage at the same time. In fact, this is quite common. When we do our first Windows Azure Data Storage demo together, I will be showing you an application that uses Blobs, Tables, and Queues in concert.
  • As I stated earlier, SQL Azure is based on SQL Server 2008. At this time it is only a subset of the features of the server product.My intention here is to convey the high level features that are supported and the ones that are not.SQL Azure will support most of the things we need… Tables, Index, Views, Stored Procedures, Triggers, and Constraints… in my book… that’s all the functionality that I need for most of my applications.There are some other adjunct technologies that ship as part of SQL Server 2008 such as SQL Reporting Services and Analysis Services which are not supported. The Service Broker is also not supported.
  • The current offering of SQL Azure provides just core relational database services.In the future, Microsoft will be offering Data synchronization based on the Sync framework so that on premise and mobile databases can be synchronized with databases in the cloud.Business Intelligence and SQL Reporting will be available as an SaaS (Software as a Service)And some new services will be unveiled such as Reference Data and Secure Data Hub. These our outside the scope of this presentation though, so feel free to point your favorite search engine at these terms for more information.
  • So let’s assume that we have designed our relational database with local developer and data modeling tools.We can begin our story then by assuming that we want to get our database deployed to the cloud.There are some tools that will expedite this process which I will show you later, but for now lets assume that we have scripted our database schema. We apply this script to SQL Azure which speaks native TDS.If you created your database through the SQL Azure Portal, then SQL Azure will have created one master database and three replicas of that database. If you create your database with the script the same will be true.These replicas are stored in different database centers from the master to provide redundancy and protection against geographical catastrophe.
  • Configuring our application to use SQL Azure storage instead of SQL Server is simply a matter of modifying the connection string in our application’s configuration file.When our application requests data, ADO.NET speaks to the TDS which directs our queries to the master database server. The master database server performs our query and returns the results to our application.
  • From our application’s point of view, there is only one SQL Azure database.As we make updates to our database, those updates are replicated to other copies stored in other data centers so that in the event that our database fails for any reason, the other databases will be standing by ready to take its place.
  • But what if that master database server fails for some reason?TDS is receives notification of the database failure and automatically redirects the call to the replica!The Azure Cloud Fabric is self-healing… and the details are outside the scope of this presentation; however, the fabric will get busy repairing itself like drones on a Borg mother ship… essentially with the objective of keeping three replicas online at a time.
  • I will demonstrate creating a SQL Azure account in session 3 where I will walk you through the entire process.For now I simply want to give you some background information to prepare you for our first demonstration.When we create our SQL Azure database server, we’ll be prompted for an Administrator’s name and a password.This username and password will be the granted a system administrator role that is similar to the “sa” account on a local SQL Server 2008 box. The account has permission to create and drop databases and database ownership authority in any databases that you create with this account.
  • After creating your SQL Azure database server, you will want to grant appropriate access through the SQL Azure firewall.SQL Azure provides a very simple and easy to maintain firewall. The firewall is so easy to use that it’s only going to get one slide in my deck!The firewall allows us to expose our database to Windows Azure services via a checkbox and to add ranges of IP addresses such as your home office and your business… or possibly the address of a 3rd party server hosting some application that needs data access.I’ll do a thorough demo of this feature in session 3…
  • When you created your SQL Azure database server, you supplied an administrator’s user name and password. I have named my user accordingly… to remind me of its power.The SQL Portal will offer you the ability to copy these credentials in connection string format to your clip board… tempting you into believing that you should just paste this into your configuration file.This is terrific for demos like mine… BUT you should NEVER, EVER do this…A database server system administrator password placed in a configuration file in clear text format… there has got to be something naive in the extreme going on here… and worse… no way to create non-sa-like users through the UI… you must script your database users and then apply the script to the database. And to anticipate your question… no… you can’t use SQL Server Management Studio to do this either.I will demo this as well in session 3… so hang tight…
  • There are a number of techniques for getting data migrated from an existing database into a SQL Azure database.One very effective technique is to script the database schema and any stored procedures or views and then apply these scripts to the SQL Azure database. Once the schema has been deployed to the cloud, BCP can be used to copy the data in.Another effective technique is to utilize SQL Server Integration Service which will transfer the Schema and the Data.
  • I think that I saved the best for last here… The SQL Server Migration Wizard is available for download from the CodePlex website at the URL on this slide.To quote the website, “The SQL Azure Migration Wizard helps you migrate your local SQL Server 2005 / 2008 databases into SQL Azure. The wizard walks you through the selection of your SQL objects, creates SQL scripts suitable for SQL Azure, and allows you to migrate your data.”I will demonstrate this tool in session 3 when I use it to migrate an application and associated database from the local desktop to the cloud.
  • Although some things can be done with SQL Server 2008 Management Studio, I highly recommend that you use the 2008 R2 Nov CTP as it is SQL Azure aware.After you have created your system administrator account for SQL Azure, you can use SQL Server Management Studio R2 CTP to make connections to the database and execute scripts such as the one that I am showing in this slide.
  • Okay… That’s all about SQL Azure for now… we’ll come back to this topic in Session 3…Keep in mind that SQL Azure is a separate product from Windows Azure…. And that Windows Azure includes Windows Azure Data Storage, which we are going to talk about now. We will be using the Windows Azure Data Storage directly in demos, so these slides will provide more of a brief and high level overview.To get Windows Azure Data Storage setup, we simply create a new Storage Account from the Windows Azure Portal.
  • Our Windows Azure Data Storage will be accessible via RESTful queries at the endpoints you see on this slide, or via the API in the Windows Azure SDK library.We’ll be using the Windows Azure library in our demo.
  • Also provided on our data storage setup screen is the Account Name and a Primary and Secondary Access Key.Our Account name uniquely identifies our Data Storage locationThe Access Keys are a small chunk of encrypted data that prove our identity to Windows Azure Data Storage. We’ll use the Primary Access Key to access and update data stored in Data Storage.
  • It’s time now to introduce Windows Azure Data Storage Blobs.Blobs are for storage of unstructured data.We partition our data by creating Blob containers which we give names to.We can create an unlimited number of Blob Containers.We then simply place our blob data into the blob containers, supplying a unique identifier.When we want to retrieve our data, we simply provide the container and the unique identifier.
  • Windows Azure Data Storage Tables are how we get massively scalable and highly available databases.Although there are some similarities, these tables are very different from relational database tables.Data in Windows Azure Data Storage Tables is semi-structured; The concept of a Windows Azure Data Storage Table is similar to how a spreadsheet is used to provide tabularized organization to data without strongly enforcing data cohesion.… Data is indexed in Tables for high performance retrieval, but there are no relationships between Tables.The tables support ACID transactions over single entities and rich queries over the entire table.
  • The PartitionKey combined with the RowKey uniquely identifies an entity in a table.
  • We have included this feature comparison table in anticipation of your likely questions about differences between using a relational database table as you may be currently doing with your SQL Server databases and the new Windows Azure Tables included in Windows Azure.
  • Queues are a means of buffered message delivery. There are very useful for communicating data between our Windows Azure service instances.
  • Questions?
  • Here is a list of resources that will allow you to follow up with us on any of the features you’ve seen today as well as become part of our development community!
  • Windows Azure DiagnosticsLogging and Monitoring in the Cloud

Windows Azure Platform Storage Windows Azure Platform Storage Presentation Transcript

  • Windows Azure Platform Data Storage
    David Robinson
    Senior Program Manager
    Microsoft
    david.robinson@microsoft.com
  • Agenda
    Windows Azure Platform Data Storage Options
    Getting Started with SQL Azure Data Storage
    Getting Started with Windows Azure Data Storage
    Blobs
    Tables
    Queues
    Drives
    Inspecting the contents of Windows Azure Data Storage
  • Objectives
    Learn the data storage options offered by the Windows Azure Platform and become familiar with choosing and using the appropriate one for your application
  • Azure Platform Data Storage Options
    • SQL Azure
    • Relational data storage
    • Windows Azure Data Storage
    • Blobs
    • Unstructured data storage
    • Tables
    • Semi-structured or tabular data storage
    • Queues
    • Buffered delivery data storage
    • Drives
    • Durable NTFS volumes that Windows Azure applications can use. See: http://microsoftpdc.com/Sessions/SVC14
  • SQL Azure Features
    Supported
    Tables, Indexes, Views
    Stored Procedures
    Triggers
    Constraints
    Table Variables
    Temp Tables (#Name)
    Not Supported
    Physical Server Access
    Catalog DDL
    Common Language Runtime
    Service Broker
    Distributed Transactions and Queries
  • SQL Azure
    Initial Services
    Database – Core SQL Server database capabilities
    Future Services
    Data Sync – Enables the sync framework
    Additional SQL Server capabilities available as a service: Business Intelligence and Reporting
    New services: Reference Data and Secure Data Hub
  • SQL AzureDeployment
    Web Portal
    (API)
    DB Script
    SQL Azure
    TDS
  • SQL AzureAccessing databases
    Web Portal
    (API)
    Your App
    SQL Azure
    TDS
    Change Connection String
  • Database Replicas
    Single Database
    Multiple Replicas
    Replica 1
    Single Primary
    Replica 2
    DB
    Replica 3
  • SQL AzureDatabase Monitoring & Recovery
    Web Portal
    (API)
    !
    Your App
    SQL Azure
    TDS
  • SQL Azure Server Creation
  • SQL Azure Firewall Maintenance
    • Simple rules
    • Easy one-screen portal maintenance
  • SQL Azure Database Connection String
    An administrative user is created with the server
    User has system administrator permissions likesa
    Server=tcp:itte80vcfq.database.windows.net; Database=FabrikamAzureDB;User ID=davidrob;Password=myPassword;Trusted_Connection=False;Encrypt=True;
  • Database Migrations
    Scripts
    Transfer Schema
    BCP
    Transfer Data
    SSIS (SQL Server Integration Service)
    Transfer Schema and Data
  • Database Migrations (Cont.)
    The SQL Azure Migration Wizard helps you migrate your local SQL Server 2005 / 2008 databases into SQL Azure. The wizard walks you through the selection of your SQL objects, creates SQL scripts suitable for SQL Azure, and allows you to migrate your data.”
    http://sqlazuremw.codeplex.com/
  • Database Management using SQL Management Studio
  • Getting Started with Windows Azure Data Storage
  • Windows Azure Data Storage
  • Account Name / Key
    AccountName
    A unique name identifying the Azure Data Storage
    AccountKey
    A blob of encrypted data used for authentication
  • Windows Azure Data Storage - Blobs
    Unstructured data storage
    Partitioned by container
    Unlimited containers
  • Windows Azure Data Storage - Tables
    Windows Azure Table provides scalable, available, and durable structured (or semi-structured) storage in the form of tables.
    The tables contain entities, and the entities contain properties.
    The tables are scalable to billions of entities and terabytes of data, and may be partitioned across thousands of servers.
    The tables support ACID transactions over single entities and rich queries over the entire table.
    Simple and familiar .NET and REST programming interfaces are provided via ADO.NET Data Services.
    http://go.microsoft.com/fwlink/?LinkId=153401
  • Windows Azure Data Storage – Tables (Terms Part 1)
    Table – contains a set of entities.
    Entity (Row) – Entities are the basic data items stored in a table.
    Property (Column) – This represents a single value in an entity.
    PartitionKey– The first key property of every table. The system uses this key to automatically distribute the table’s entities over many storage nodes.
  • Windows Azure Data Storage – Tables (Terms Part 2)
    RowKey– A second key property for the table. This is the unique ID of the entity within the partition it belongs to.
    Timestamp – Every entity has a version maintained by the system.
    Partition – A set of entities in a table with the same partition key value.
    Sort Order – There is a single index provided for the CTP, where all entities in a table are sorted by PartitionKey and then RowKey
  • SQL Azure and Windows AzureTable Comparison
    Windows Azure Tables
    SQL Azure Tables
    Semi-structured
    Loosely typed
    Non-Relational (Not RDMS)
    Massively scalable
    Fully structured
    Strongly typed
    Relational (RDMS)
    Highly scalable
  • Windows Azure Data Storage - Queues
    Buffered delivery data storage
    Read at least once
    Delete to remove message, otherwise is returned to queue
    Partitioned by Queue Name
  • Q & A
  • Resources
    Azure Portal
    http://windows.azure.com
    Tools
    SQL Azure Migration Wizard
    http://sqlazuremw.codeplex.com/
    Azure Storage Explorer
    http://azurestorageexplorer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35189
    Windows Azure Management Tool (MMC)
    http://cloudfex.com/cs/blogs/cloud/archive/2009/05/17/windows-azure-management-tool-mmc.aspx
    Windows Azure Forums
    http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/threads
  • ResourcesWindows Azure Data Storage
    • Haridas, Jai. “Windows Azure Tables and Queues Deep Dive”. Microsoft PDC. 2009. http://microsoftpdc.com/Sessions/SVC09
    • Calder, Brad. “Windows Azure Blob Deep Dive”. Microsoft PDC. 2009. http://microsoftpdc.com/Sessions/SVC14
  • Resources – White Papers
    Windows Azure Table – Programming Table Storage
    http://go.microsoft.com/fwlink/?LinkId=153401
    Windows Azure Blob – Programming Blob Storage
    http://go.microsoft.com/fwlink/?LinkId=153400
    Windows Azure Queue – Programming Queue Storage
    http://go.microsoft.com/fwlink/?LinkId=153402