12
Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect [email protected] om

Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect [email protected]

Embed Size (px)

Citation preview

Page 1: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

Azure’s new NoSQL PaaS Offering

A Lap AroundAzure DocumentDB

Louis BermanNational Architect

[email protected]

Page 2: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 2

Who? Me!!

• Louis Berman• National Architect, Applications Platform, SDG• Cell: 215-316-8538 • [email protected]• Blog: http://squideyes.com

• Downloads• Blog Item: http

://squideyes.com/2014/11/06/nosql-with-documentdb-that-aint-quite-true/

• Source: https://github.com/squideyes/DpgDocDbDemo.git

Page 3: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 3

What? (1 of 2)

• A managed, highly-scalable NoSQL (JSON) document database service• Schema-free storage of arbitrary JSON docs.• Automatic indexing supports complex queries.• Transaction support with ACID semantics.• Service-side programmability with JavaScript.• Write-optimized, SSD-backed and tunable via

indexing & consistency.• Built to be delivered as a service; pay as you go.• A complement to SQL Server, Table Storage,

Blobs, etc.; not a replacement.

Page 4: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 4

What? (2 of 2)

• Open-source Client SDKs (with more to come!)• https://github.com/Azure/azure-documentdb-net• https://github.com/Azure/azure-documentdb-node• https://github.com/Azure/azure-documentdb-js• https://github.com/Azure/azure-documentdb-python

• For the highly motivated, there’s a REST API• http://bit.ly/1zyqwUy

• NuGet Packages• Microsoft.Azure.Documents.Client –Pre• Newtonsoft.Json

• Tunable consistency • Levels: Strong, Bounded, Session, and Eventual.• Still trying to figure out what this means in the real world.

Page 5: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 5

DocumentDB Resources

Page 6: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 6

Capacity Units (CUs)

• See http://bit.ly/1tF1Vs9 for (Preview!) pricing details

• I have no real-world experience with this one, but my chief fear is that the entire CU scheme put developers in the economic hot-seat.

Page 7: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 7

Consistency?

• Eventual Consistency• All changes will be propagated at some time in the future

• Quorum Consistency• Response after data is written on ((Factor / 2) + 1) nodes

• Consistency level can be weakened per read / query

Level Writes Reads

Strong Sync Quorum Writes Quorum Reads

Bounded Async Replication Quorum Reads

Session Async Replication Session Bound Replica

Eventual Async Replication Any Replica

Page 8: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 8

What’s Important (for Developers)?

• JavaScript UDFs, Triggers, Stored Procedures• Language Integrated Transactions

• The entire procedure is wrapped in an ACID transaction• JavaScript exception results into aborting the transaction

• “Document-oriented” SQL• HTTP/REST APIs and Client SDKs,

• .NET, Node.js, JavaScript, Python; C++ & Java soon• Async support for all operations

• POCOs, inherited document types and dynamics• LINQ, LINQ and MORE LINQ; did I say LINQ?• A bit to get your head around but easy to get going

• It’ll take a bunch of experimentation to get exactly right.

Page 9: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 9

Limits (Preview ONLY!)

Entity Quota

Max database accounts per subscription 5

Number of databases per account 100

Maximum number of capacity units (CU) per database account 5

Number of collections per capacity unit 5

Attachment storage per database account 2GB

Maximum request units (RU) / sec per collection 2000

# of stored procedures, triggers and UDFs per collection 25

Maximum request size of document and attachment 256kb

Maximum request size of stored procedure, trigger and UDF 256kb

Provisioned document storage / capacity unit 10GB

http://azure.microsoft.com/en-us/documentation/articles/documentdb-limits

Page 10: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 10

When You Should Use DocumentDB

• In General• You don’t want to do replication / scale-out by yourself• You want to have tunable consistency• You want to do rapid development• You want to safeguard against significant change• You want to support massive (gargantuan!) scale

• Compared to relational database• You don’t want predefined columns or relationships• You sick and tired of database versioning issues

• Compared to other document stores• You want to use an SQL-like query grammar• MongoDB vs. DocumentDB: http://bit.ly/1yalIk2

Page 11: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 11

I Hate Slides!!

• Let’s go to the portal, then create a new account

• I have too many demos (let’s see how far we get!)

Page 12: Azure’s new NoSQL PaaS Offering A Lap Around Azure DocumentDB Louis Berman National Architect louis.berman@neudesic.com

© Copyright 2014, Neudesic. All rights reserved. 12

Resources

• Azure Friday - DocDB w/Ryan CrawCour (101, 102)• Azure Documentation – Tutorials & Guides

• Introduction to Azure DocumentDB• Get started with DocumentDB• DocumentDB resource model and concepts• Develop an ASP.NET application with DocumentDB• DocumentDB .NET code samples• .NET SDK reference• REST API Reference• DocumentDB SQL reference

• Scott Gu – New DocumentDB NoSQL Service• AzureConf – Azure Document Database Deep Dive