Introduction to Microsoft Azure
DocumentDB
Radenko Zec - Lanaco
Agenda
• NoSQL
• Introduction to Azure DocumentDB
• Storing data
• Querying data
• Transactions over data
No SQL in Database what ???
Is DocumentDB NoSQL database?
• database management system that is non relational
• schema less, avoids joins & easy to scale
• NoSQL =
DocumentDB at MSN.com
• over 425 million unique users
• store 20TB of JSON document data
• available globally to serve all markets
• under 15ms writes and single digit ms reads
Resource Model
• Entities addressable by logical URI
• Partitioned for scale out
• Replicated for HA
• Entities represented as JSON
• Accounts scale out through addition of
capacity units
Interaction Model
• RESTful interaction over
HTTP
• HTTP and TCP
connectivity
Attachments
• Store large blobs/media outside core storage
• Document DB managed
– Submit raw content in POST
– Document DB stores into Azure Blob storage (2GB
today)
– Document DB manages lifecycle
DEMO - Getting Started
Indexing in DocumentDB
• By default everything is indexed
• Indexing is not a B-Tree (based on BWTree used in
Hackaton) and works really well under write pressure and
at scale
DocumentDB
Consistency options
DocumentDB
Consistency options
Tunning indexes
• synchronous (Consistent)
• asynchronous (Lazy)
Sharding
Multi Document JavaScript Transactions
• Execution wrapped in an implicit transaction
• Preregistered and scoped to a collection
• Performed with ACID guarantees
• If exceptions are thrown through the server side
execution of JavaScript application code, the entire
transaction is rolled back.
DEMO – Queries, CRUD, Stored
Procedures
Known limits
• Stored procedure 5 second execution timeout
• Index policies can be specified only at collection creation time
• no aggregate functions for now, no datetime type
• no joins between documents and collections
• Maximum request size of document and attachment
512KB
• Maximum response size - 1MB
• Maximum Request Units / sec per collection 2000
etc…
The End
• Radenko Zec – Lanaco
• http://blog.developers.ba
• @radenkozec
Ne zaboravite ispuniti upitnike.
Čekaju vas vrijedne nagrade!

Introduction to Azure DocumentDB

  • 3.
    Introduction to MicrosoftAzure DocumentDB Radenko Zec - Lanaco
  • 5.
    Agenda • NoSQL • Introductionto Azure DocumentDB • Storing data • Querying data • Transactions over data
  • 6.
    No SQL inDatabase what ???
  • 7.
    Is DocumentDB NoSQLdatabase? • database management system that is non relational • schema less, avoids joins & easy to scale • NoSQL =
  • 8.
    DocumentDB at MSN.com •over 425 million unique users • store 20TB of JSON document data • available globally to serve all markets • under 15ms writes and single digit ms reads
  • 10.
    Resource Model • Entitiesaddressable by logical URI • Partitioned for scale out • Replicated for HA • Entities represented as JSON • Accounts scale out through addition of capacity units Interaction Model • RESTful interaction over HTTP • HTTP and TCP connectivity
  • 11.
    Attachments • Store largeblobs/media outside core storage • Document DB managed – Submit raw content in POST – Document DB stores into Azure Blob storage (2GB today) – Document DB manages lifecycle
  • 12.
  • 13.
    Indexing in DocumentDB •By default everything is indexed • Indexing is not a B-Tree (based on BWTree used in Hackaton) and works really well under write pressure and at scale
  • 14.
  • 15.
  • 16.
    Tunning indexes • synchronous(Consistent) • asynchronous (Lazy)
  • 17.
  • 18.
    Multi Document JavaScriptTransactions • Execution wrapped in an implicit transaction • Preregistered and scoped to a collection • Performed with ACID guarantees • If exceptions are thrown through the server side execution of JavaScript application code, the entire transaction is rolled back.
  • 19.
    DEMO – Queries,CRUD, Stored Procedures
  • 20.
    Known limits • Storedprocedure 5 second execution timeout • Index policies can be specified only at collection creation time • no aggregate functions for now, no datetime type • no joins between documents and collections • Maximum request size of document and attachment 512KB • Maximum response size - 1MB • Maximum Request Units / sec per collection 2000 etc…
  • 21.
    The End • RadenkoZec – Lanaco • http://blog.developers.ba • @radenkozec
  • 23.
    Ne zaboravite ispunitiupitnike. Čekaju vas vrijedne nagrade!