A Lap Around Azure Document DB Azures new
A Lap Around Azure Document. DB Azure’s new No. SQL Paa. S Offering Louis Berman National Architect louis. berman@neudesic. com
Who? Me!! • Louis Berman • • National Architect, Applications Platform, SDG Cell: 215 -316 -8538 louis. berman@neudesic. com Blog: http: //squideyes. com • Downloads • Blog Item: http: //squideyes. com/2014/11/06/nosql-withdocumentdb-that-aint-quite-true/ • Source: https: //github. com/squideyes/Dpg. Doc. Db. Demo. git © Copyright 2014, Neudesic. All rights reserved. 2
What? (1 of 2) • A managed, highly-scalable No. SQL (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 Java. Script. 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. © Copyright 2014, Neudesic. All rights reserved. 3
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/1 zyqw. Uy • Nu. Get 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. © Copyright 2014, Neudesic. All rights reserved. 4
Document. DB Resources © Copyright 2014, Neudesic. All rights reserved. 5
Capacity Units (CUs) • See http: //bit. ly/1 t. F 1 Vs 9 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. © Copyright 2014, Neudesic. All rights reserved. 6
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 © Copyright 2014, Neudesic. All rights reserved. 7
What’s Important (for Developers)? • Java. Script UDFs, Triggers, Stored Procedures • Language Integrated Transactions • The entire procedure is wrapped in an ACID transaction • Java. Script exception results into aborting the transaction • “Document-oriented” SQL • HTTP/REST APIs and Client SDKs, • . NET, Node. js, Java. Script, 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. © Copyright 2014, Neudesic. All rights reserved. 8
Limits (Preview ONLY!) Entity Max database accounts per subscription Number of databases per account Quota 5 100 Maximum number of capacity units (CU) per database account 5 Number of collections per capacity unit 5 Attachment storage per database account 2 GB Maximum request units (RU) / sec per collection 2000 # of stored procedures, triggers and UDFs per collection 25 Maximum request size of document and attachment 256 kb Maximum request size of stored procedure, trigger and UDF 256 kb Provisioned document storage / capacity unit 10 GB http: //azure. microsoft. com/en-us/documentation/articles/documentdb-limits © Copyright 2014, Neudesic. All rights reserved. 9
When You Should Use Document. DB • 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 • Mongo. DB vs. Document. DB: http: //bit. ly/1 yal. Ik 2 © Copyright 2014, Neudesic. All rights reserved. 10
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!) © Copyright 2014, Neudesic. All rights reserved. 11
Resources • Azure Friday - Doc. DB w/Ryan Craw. Cour (101, 102) • Azure Documentation – Tutorials & Guides • • Introduction to Azure Document. DB Get started with Document. DB resource model and concepts Develop an ASP. NET application with Document. DB. NET code samples. NET SDK reference REST API Reference Document. DB SQL reference • Scott Gu – New Document. DB No. SQL Service • Azure. Conf – Azure Document Database Deep Dive © Copyright 2014, Neudesic. All rights reserved. 12
- Slides: 12