Using Azure Tables In this module- Learn how to store data in tables

Slides:



Advertisements
Similar presentations
What Is Microsoft Marketplace DataMarket What Is Microsoft Marketplace DataMarket? Michael Stiefel
Advertisements

Case Study: Photo.net March 20, What is photo.net? An online learning community for amateur and professional photographers 90,000 registered users.
My first computer: The Apple ][ It wanted to be programmed.
© Copyright 2012 STI INNSBRUCK Apache Lucene Ioan Toma based on slides from Aaron Bannert
Big Data Working with Terabytes in SQL Server Andrew Novick
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
Google AppEngine. Google App Engine enables you to build and host web apps on the same systems that power Google applications. App Engine offers fast.
WINDOWS AZURE STORAGE 11 de Mayo, 2011 Gisela Torres – Windows Azure MVP Aventia-Renacimiento Twitter:
Cross Platform Mobile Backend with Mobile Services James
Windows Azure SQL Database and Storage Name Title Organization.
Systems analysis and design, 6th edition Dennis, wixom, and roth
MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay.
Larisa kocsis priya ragupathy
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
Jimmy Narang 1. A service in the cloud has to: Be able to handle arbitrary node failures Be available all the time Be able to scale up or down on demand.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Module 11: Programming Across Multiple Servers. Overview Introducing Distributed Queries Setting Up a Linked Server Environment Working with Linked Servers.
T.N.C.Venkata Rangan CEO, Vishwak Solutions Your Data on Cloud.
G063 - Distributed Databases. Learning Objectives: By the end of this topic you should be able to: explain how databases may be stored in more than one.
Azure in a Day Azure Tables Module 1: Azure Tables Overview Module 2: REST API – DEMO: Azure Table REST API Module 3: Querying Azure Tables – DEMO: Querying.
North America Europe Asia Pacific Data centers.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
1 Neil Kidd MTC Architect - DPE NeilKidd Neil Kidd MTC Architect - DPE NeilKidd.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
(re)-Architecting cloud applications on the windows Azure platform CLAEYS Kurt Technology Solution Professional Microsoft EMEA.
The best of WF 4.0 and AppFabric Damir Dobric MVP-Connected System Developer Microsoft Connected System Division Advisor Visual Studio Inner Circle member.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Aaron Stanley King. What is SQL Azure? “SQL Azure is a scalable and cost-effective on- demand data storage and query processing service. SQL Azure is.
Presented by: Aaron Stanley King.  Benefits of SQL Azure  Features of SQL Azure  Demos, Demos, Demos!  How to query in SQL Azure  More Demos!  Recent.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
Nivo 300 Windows Azure Storage Bojan Vrhovnik Microsoft
Top 10 Entity Framework Features Every Developer Should Know
Platform as a Service (PaaS)
Plan for Cloud Data Models
Don't Know Jack About Object-Relational Mapping?
Platform as a Service (PaaS)
Business Continuity & Disaster Recovery
Windows Azure SQL Federation
Design considerations for storing data in the Cloud
Databases Chapter 16.
Triple Stores.
SQL Server 2017 Graph Database Inside-Out
Physical Database Design and Performance
Windows Azure Storage Basics
Using a Gateway to Leverage On-Premises Data in Power BI
Business Continuity & Disaster Recovery
…and web frameworks in general
03 | Data Storage Bruno Terkaly | Technical Evangelist
Google App Engine Danail Alexiev
Tutorial 1 – Introduction To Microsoft Access 2003
G063 - Distributed Databases
Physical Database Design
Outline Virtualization Cloud Computing Microsoft Azure Platform
Tutorial 1 – Introduction To Microsoft Access 2003
Entity Framework Core.
Triple Stores.
Primary key Introduction Introduction: A primary key, also called a primary keyword, is a key in a relational database that is unique for each record.
Azure Table Storage Ivan.
Saranya Sriram Developer Evangelist | Microsoft
Adding Multiple Logical Table Sources
…and web frameworks in general
Building Scalable and Reliable Applications with Windows Azure
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Triple Stores.
Database System Architecture
Running PHP on the Windows Azure Platform
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
Microsoft Azure Data Catalog
Server & Tools Business
Cosmic DBA Cosmos DB for SQL Server Admins and Developers
Presentation transcript:

Using Azure Tables In this module- Learn how to store data in tables Create and destroy data How tables scale

What is the Table Service? Simple Highly scalable Cost effective Non-relational Hierarchical

Storage Account: MovieData Table Structure Account Table Storage Account: MovieData Star Wars Matrix Fan Boys Table Name: Movies Mike Collier Mr. Anderson Bill Gates Table Name: Customers Entity Tables store entities. Entity schema can vary in the same table.

Is not relational Can Not- Create foreign key relationships between tables. Perform server side joins between tables. Create custom indexes on the tables. No server side Count(), for example.

Required Properties All entities must have the following properties: Timestamp PartitionKey RowKey

Sample Table Kirk NC1701 6855 Kobayashi Maru Drive $35,490.00 NC1701A Partition Key Row Key DeliveryAddress OrderAmount Kirk NC1701 6855 Kobayashi Maru Drive $35,490.00 NC1701A 409 Tiberious Road $98.99 NC1701B 1024 Priceline Ave $4,523,765,102.99 Archer 31415 999 Sliders Blvd $5,780.99 1 1405 Suliban Road $55.39 234 DS9, Level 29, Suite 782 $1.58 Bender 900 South Futurama Drive $87,399.99 VIN 12345 KJUDH Quantum Leap != Sliders

WCF Data Services Creates and consumes data via OData (REST-based API's) The Table Service REST API implements the WCF Data Services API. Some features are extended. What WCF Data Service features are not support? Extended?

Creating a Table Tables can be created and destroyed in code. Wire up your storage in the on_start method. Use a CloudTableClient to access the table.

An Entity in C# This is how we represent an entity in normal .NET code. It is a very common practice.

Inherit or add the Required Fields By inheriting from TableServiceEntity we can easily store our entity in an Azure Table.

Create a Context Class WCF Data Services needs a context class. CloudTableClient.CreateTablesFromModel() – Uses property with IQueryable<T> in class derived from TableServiceContext. “movies” – entity set which DataServiceContext is tracking.% WCF Data Services needs a context class. This represents your connection to the table.

Adding an Entity Other operations are just like normal WCF Data Services, such as delete, update, etc.

Deleting an Entity Keep the entity, or use a lightweight copy for better performance.

Batching Use batching to increase performance Unit of Work pattern

Queries Queries less than 5 seconds return the results. Queries between 5 and 30 seconds return a continuation token so you can fetch pages of results. Queries over 30 seconds are cancelled. When more than 1,000 entities are found, a continuation token is returned.

Entity Group Transactions Transactions are supported for entities in the same table and partition using a batch. Limited to up to 100 entities per batch. There may be only one operation per entity in the batch. Can use BeginSaveChanges and EndSaveChanges for async operations.

Partition Key and Row Keys matter! Performance Super Fast Unique Partition Key Very Fast Partition Key + Row Key Slower Only Partition Key No Row Key Slowest No Partition Key Partition Key and Row Keys matter!

Guidance Treat entity schema as a data contract. Manage schema version as an entity property. Consider self configuration and setup during startup. Use tables as a cache of relational data.

Guidance Partitions are Auto-Balanced Hot partitions may be scaled up No need to partition into equal bins Hot partitions may be scaled up Windows Azure fabric may dedicate more resources to partitions with high Tx load Partition Key AND Row Key = Unique ID Must include PartitionKey for Create,Update,Delete Select queries across partitions run sequentially Don’t use sequential partition keys Slide Objective Discusses horizontal partitioning in Windows Azure Table storage Speaking notes Table storage supports partitioning out of the box. It is a key to scalability of table storage The storage fabric can then load balance your partitions and potentially move ‘hot’ partitions to a dedicated node There is no need to partition data into equal sized partitions Rather just partition as aggressively as your application will permit- remembering that your scope of a transaction (and ideally of any query) is a single partition Create Read and Update operations always act within the scope of a partition and need the partition key. This means if you want to delete entities from a table without the partition key you’ll have to iterate over all the partitions yourself Select queries across partitions run sequentially- you’ll receive the data off each partition in sequence; Notes Queue storage is partitioned by Queue name Blob storage is partitioned by Bob name (i.e. partition size of 1)

Guidance Continuation Tokens May Be Returned from Cross Partition Queries Any query not including the Rowkey and PartitionKey (only those as well) needs to handle Continuation tokens http://tinyurl.com/ContToken Key Columns Up to 1KB in size Should aim to keep to 260 char URI limit Be aggressive e.g. Only ever query by an ID? Use Unique partition key and RowKey = ‘ ‘ for a partition of 1 Slide Objective More detail that Discusses horizontal partitioning in Windows Azure Table storage Speaking notes Understanding the sequential nature of cross partition queries is important Continuation tokens may be returned at any time (i.e. data comes back in multiple pages) You will always get a continuation token if you cross a hardware boundary- i.e. you move between partitions that sit on different nodes The Storage API handles continuation tokens elegantly, but, it may mask a poor architecture- YOU DO NOT WANT TO RUN A QUERY THAT CROSSES HUNDRED OF SERVERS! Be aggressive with partitioning- if you’ll only ever query something by a single key use an empty Row key and a unique partition key for a partition of 1. Can also just use blob storage which is already partitioned by Blob name Notes Queue storage is partitioned by Queue name Blob storage is partitioned by Bob name (i.e. partition size of 1) http://www.syringe.net.nz/2009/08/08/SimplePartitioningWithWindowsAzureTableStorage.aspx http://nmackenzie.spaces.live.com/Blog/cns!B863FF075995D18A!417.entry Good article from Julie Lerman. Worth reading when discussing table storage http://msdn.microsoft.com/en-us/magazine/ff796231.aspx

Costs Storage = $0.15 / GB stored / month Storage transactions = $0.01 / 10K Data transfers = $0.10 in / $0.15 out / GB - ($0.30 in / $0.45 out / GB in Asia)*

Windows Azure Guest Book Using Tables C:\WindowsAzurePlatformKit\Demos\WindowsAzureGuestBookUsingTables demo

Q & A ponderances?

Exploring Windows Azure Storage C:\WAPTK\Labs\ExploringWindowsAzureStorageVS2010 Do Exercise 1. C:\WindowsAzurePlatformKit\Labs\ExploringWindowsAzureStorage hands on lab time