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.

Slides:



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

Reinventing using REST. Anything addressable by a URI is called a resource GET, PUT, POST, DELETE WebDAV (MOVE, LOCK)
Dhananjay Kumar
Accessing data Transactions. Agenda Questions from last class? Transactions concurrency Locking rollback.
Building a Database on S3 Matthias Brantner, Daniela Florescu, David Graf, Donald Kossmann, Tim Kraska Xiang Zhang
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
1 Introduction to Web Application Introduction to Data Base.
SQL Forms Engine Koifman Eran Egri Ozi Supervisor: Ilana David.
Virtual techdays INDIA │ november 2010 Windows Azure Storage – Deep Dive Gaurav Mantri │ Founder, Cerebrata Software.
Service Broker Lesson 11. Skills Matrix Service Broker Service Broker, provides a solution to common problems with message delivery and consistency that.
Building Web Applications with SQL Azure David Robinson Senior Program Manager SQL Azure
Platform as a Service (PaaS)
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.
Cross Platform Mobile Backend with Mobile Services James
Managing Transaction and Lock Vu Tuyet Trinh Hanoi University of Technology 1.
Windows Azure SQL Database and Storage Name Title Organization.
Software Engineer, #MongoDBDays.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
50466 Windows® Azure™ Solutions with Microsoft® Visual Studio® 2010 Slide 1 © Table Storage Windows® Azure™ Solutions with Microsoft®
Building Data Driven Applications Using WinRT and XAML Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant Level: Intermediate.
LINQ Boot Camp ADO.Net Entity Framework Presenter : Date : Mahesh Moily Nov 26, 2009.
Azure in a Day Training Azure Blobs Module 1: Azure Blobs Overview Module 2: Blob Accounts – DEMO: Setting up a Blob Account – DEMO: Mapping a custom.
MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay.
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.
What’s New? – BCS 2013 Brett Lonsdale.  Co-founder of Lightning Tools  One of the hosts on the SharePoint Pod Show  Co-organizer of SharePoint Saturday.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
ADO.NET DATA SERVICES Mike Taulty Developer & Platform Group Microsoft UK
Open Data Protocol * Han Wang 11/30/2012 *
WINDOWS AZURE STORAGE SERVICES A brief comparison and overview of storage services offered by Microsoft.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
T.N.C.Venkata Rangan CEO, Vishwak Solutions Your Data on Cloud.
DATABASE TRANSACTION. Transaction It is a logical unit of work that must succeed or fail in its entirety. A transaction is an atomic operation which may.
1 IRU Concurrency, Reliability and Integrity issues Geoff Leese October 2007 updated August 2008, October 2009.
Introduction to the SharePoint 2013 REST API. 2 About Me SharePoint Solutions Architect at Sparkhound in Baton Rouge
Transactions and Locks A Quick Reference and Summary BIT 275.
1 Seminar on Service Oriented Architecture Principles of REST.
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
1 ADO.NET Data Services Mike Taulty Developer & Platform Group Microsoft Ltd
1 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 2: REST Details and Patterns Some.
WINDOWS AZURE MOBILE SERVICES AN INTRODUCTION Bret Stateham Technical Evangelist
06 | HTTP Services with Web API Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
RESTful Web Services What is RESTful?
Module 11: Managing Transactions and Locks
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
JSON C# Libraries Parsing JSON Files “Deserialize” OR Generating JSON Files “Serialize” JavaScriptSerializer.NET Class JSON.NET.
1 Database Fundamentals Introduction to SQL. 2 SQL Overview Structured Query Language The standard for relational database management systems (RDBMS)
Windows Azure Custom Software Development Mobile Middleware Windows Azure Storage Dipl.-Ing. Damir Dobric Lead Architect daenet
Views / Session 3/ 1 of 40 Session 3 Module 5: Implementing Views Module 6: Managing Views.
Locks, Blocks & Isolation Oh My!. About Me Keith Tate Data Professional for over 14 Years MCITP in both DBA and Dev tracks
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Platform as a Service (PaaS)
Platform as a Service (PaaS)
Platform as a Service (PaaS)
z/Ware 2.0 Technical Overview
Temporal Databases Microsoft SQL Server 2016
An introduction to REST for SharePoint 2013
IBM Data Server Gateway for OData
Using Azure Tables In this module- Learn how to store data in tables
Microsoft Build /9/2018 5:08 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
03 | Data Storage Bruno Terkaly | Technical Evangelist
Web Application Architectures
Transactions, Locking and Query Optimisation
Pablo Castro Software Architect Microsoft Corporation
Web Application Architectures
Transactions and Concurrency
Web Application Architectures
WCF Data Services and Silverlight
.NET Framework V3.5+ & RESTful web services
Server & Tools Business
Presentation transcript:

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 Azure Tables – DEMO: Paging with Azure Tables Module 4: Insert, Updating, Deleting – DEMO: Inserting – DEMO: Updating – DEMO: Deleting Module 5: Concurrency and Entity Group Transactions – DEMO: Concurrency – DEMO: Entity Group Transactions

DEMO What we will be building

Agenda I.Overview II.API Overview – REST API III.StorageClient API A.Querying B.Inserting C.Updating D.Deleting IV.Concurrency V.Entity Group Transactions

Azure Table Storage “I don’t think that means what you think it means” - Fezzik – The Princess Bride

What Azure Tables Are Not Relational – No concept of Foreign Keys – Able to join to other tables Protected by a schema Database tables – No ORDER BY – No GROUP BY Related in any way to SQL Server

What Azure Tables Are Schemaless Entity Bags – Name-value pairs Massively scalable Highly available Durable Cloud Service

Table Storage Structure Table Entity … Storage Acct Table … Property … EntityProperty Name Type Value TimeStamp RowKey PartitionKey

Required Properties PartitionKey – Enables scalability – Defines the unit of partition RowKey – Unique identifier by partition – With PartitionKey, forms the composite key Timestamp (server managed) – for concurrency

Illustrating Partitions PKText T1Going to bed T1I’m super smart, really T2Love me, please… T2Playing XBox T2Just ate meatloaf Vomeets Table Node XNode Y PKText T2Love me, please… T2Playing XBox T2Just ate meatloaf Vomeets Table PKText T1Going to bed T1I’m super smart, really PKText Vomitter Vomeets

Partitioning Considerations PartitionKey should be in “WHERE clause” – If it is not, reconsider your architecture – Otherwise scan every partition on n nodes Tradeoff between Entity locality and scalability – Partitions need to be small enough to allow for Scalability Availability – Partitions need to be large enough to allow for Common queries Entity Group Transactions

RowKey Considerations RowKey is unique – by partition Together with the PartitionKey, forms the composite key RowKey defines the sort order

Agenda I.Overview II.API Overview – REST API III.StorageClient API A.Querying B.Inserting C.Updating D.Deleting IV.Concurrency V.Entity Group Transactions

Azure Table Storage APIs REST – Standards – Interoperable - anyone who has HTTP Stack Familiar and easy-to-use API – oData – WCF Data Services –.NET classes and LINQ – Other wrappers – Java, PHP, etc.

oData Web Standards compliant protocol Protocol enables querying and updating data Based on ATOM Publishing Protocol HTTP JSON URI

WCF Data Services Provides oData clients Enables rapid development of oData services StorageClient API wraps WCF Data Services clients

Why wrap REST API Hide complexity of Shared Key Signatures Hide – Creating HTTP Request – Adding appropriate HTTP Headers – Calculating URI – Serializing Request Body – Deserializing Response Body

Why use REST API On a platform without a wrapper Unimplemented feature in wrapper

DEMO REST API

Agenda I.Overview II.API Overview – REST API III.StorageClient API A.Querying B.Inserting C.Updating D.Deleting IV.Concurrency V.Entity Group Transactions

Common classes you will work with CloudStorageAccount CloudTableClient TableServiceContext : DataServiceContext DataServiceQuery CloudTableQuery

DEMO StorageClient API

Agenda I.Overview II.API Overview – REST API III.StorageClient API A.Querying B.Inserting C.Updating D.Deleting IV.Concurrency V.Entity Group Transactions

Concurrency When multiple users access data at the same time (concurrently), data integrity can be violated.

Optimistic Concurrency Control Assume low contention No locks are taken when data is read No persistent connection required Highly scalable During update: – Check to see if data has changed since read – If yes, rollback – If no, commit

Concurrency Client1Azure Customer PartitionKeyCustomerRegion RowKeyCustomerName Address11 Azure Way …… Timestamp T18:11 : Z Client2 Customer PartitionKeyCustomerRegion RowKeyCustomerName Address11 Azure Way …… Timestamp T18:11 : Z Customer PartitionKeyCustomerRegion RowKeyCustomerName Address11 Azure Way …… Timestamp T18:11 : Z Customer PartitionKeyCustomerRegion RowKeyCustomerName Address11 Azure Way …… Timestamp T18 :13: Z Customer PartitionKeyCustomerRegion RowKeyCustomerName Address11 Azure Way …… Timestamp T18 :13: Z 1. Client1 Issues GET HTTP GET 2. Azure returns the requested entity with a timestamp. (required property for all entities) HTTP Response HTTP GET HTTP Response 3. Client2 requests the same entity HTTP MERGE 4. Client1 issues an HTTP MERGE (PUT/DELETE), passing the timestamp as an HTTP Header 5. Azure checks to see if the passed Timestamp matches the server. If does, so Azure returns 204. Response includes new Timestamp HTTP MERGE 6. Client2 now issues an HTTP MERGE, passing the original Timestamp. 7. Azure checks to see if the Timestamp matches the server. It doesn’t, so server returns 412.

Concurrency Process On INSERT / UPDATE, the server maintains a Timestamp When you fetch an entity, the timestamp is returned with the entity When you perform an operation, you send the timestamp as an if-match header (or in the message body in an Entity Group Transaction) If the sent Timestamp != server Timestamp – HTTP Error: 412 – Precondition Failed Sent Timestamp == server Timestamp – Operation succeeds – New Timestamp is returned

DEMO Concurrency

Entity Group Transactions Batch Insert/Update/Delete – The entire batch is treated as a transaction Call overload of SaveChanges context.SaveChanges(SaveChangesOptions.Batch); SaveChangeOptions – None – ContinueOnError – Batch – ReplaceOnUpdate

Entity Group Transactions Constraints – Maximum 100 operations – Maximum payload size: 4 MB – All entities have to have the same partition key – Can perform only 1 operation per entity Snapshot Isolation – No locking required – Snapshot taken at beginning of transaction – Commits only if no concurrency violations Can use context.RetryPolicy

DEMO Concurrency