benjamin guinebertière - microsoft azure: document db and other nosql databases - nosql matters...

61
Microsoft Azure: Document DB and other noSQL databases Benjamin Guinebertiere Technical Evangelist, Microsoft France @benjguin

Upload: nosqlmatters

Post on 15-Jul-2015

582 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Microsoft Azure: Document DBand othernoSQL databases

Benjamin Guinebertiere

Technical Evangelist, Microsoft France

@benjguin

Page 2: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

noSQL matters on Azure

Page 3: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Other related managed services (PaaS)

Azure Search

Redis Cache

HDInsight : Hive + ORC Hadoop with Column

storage + SQL

SQL Database Elastic Scale Relational + Sharding

Managed databases (PaaS)

Azure Storage Tables Clef/valeur

HDInsight HBase Column

DocumentDB Document JSON

IaaS

MongoDB Document

In IaaS, or managed by MongoLabs,

or MongoDB

Cassandra Column

In IaaS, may be initiated thru the

Marketplace

Titan Graph

… Any database that installs on

Windows or Linux

Page 4: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

DocumentDB

Page 5: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

DocumentDB at Microsoft

user data store

Page 6: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

{"id": "AzureDocumentDB","servicetype": "Data Platform","servicename": "Azure DocumentDB","releasetype": "Preview","public": true,"regions": [

{"name": "North Europe","visible": true,"capacity": 230034

},{

"name": "West US","visible": true,"capacity": 800034

},{

"name": "East US","visible": false,"capacity": 1000034

}]

}

{"id": "MS_125734","name": "John Macintyre","jobrole": "Program Manager","companyname": "Microsoft","photo": null,"bio": "John builds stuff at Microsoft.","topicids": [

"MS_Azure_12","MS_Azure_23","MS_Azure_44"

],"sessonids": [

"MS_TEE_DBIB318","MS_TEE_DBI212"

]}

designed, built and optimized for JSON

{ }JSON

Page 7: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

schema-free and queryable

SQL

Page 8: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

multi-document transactions

JS

Page 9: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

tunable and fast

Page 10: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

scalable and fully managed

Page 11: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

{ }{ }

JS

JS

JS

The Basics

Page 12: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

The Basics

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

{ }{ }

JS

JS

JS

Page 13: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 14: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

JSON + SQL

Page 15: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Query arbitrary paths,

properties and values

No secondary index

definitions required

Consistent Query Results in

the face of heavy writes

Query through SQL (or LINQ

in .NET)

JavaScript UDFs Extensibility

-- Nested lookup against index

SELECT B.Author

FROM Books B

WHERE B.Author.Name = "Leo Tolstoy"

-- Transformation, Filters, Array access

SELECT { Name: B.Title, Author: B.Author.Name }

FROM Books B

WHERE B.Price > 10 AND B.Language[0] = "English"

-- Joins, User Defined Functions (UDF)

SELECT CalculateRegionalTax(B.Price, "USA", "WA")

FROM Books B

JOIN L IN B.Languages

WHERE L.Language = "Russian"

Page 16: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

The choice of consistency level has performance implications

for both write and read operations

• Write operations

• Consistency level changes impact request latency

• Stronger consistency levels result in higher write

latencies

• Read operations

• Consistency level changes impact throughput

• Weaker consistency levels result in higher read

throughput

Tip: You can lower the consistency level of a specific read or query request by specifying [x-ms-consistency-level] request header or by using RequestOptions in the SDKs

Document myDoc = await

client.ReadDocumentAsync(documentLink,

new RequestOptions

{ ConsistencyLevel = ConsistencyLevel.Eventual });

Lower consistency level on read operation

Page 17: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

How it works

Automatic indexing of documents

JSON documents are represented as

trees

Structural information and instance

values are normalized into a JSON-Path

Example{"headquarters": "Belgium"} /"headquarters"/"Belgium"

{"exports": [{"city": “Moscow"}, {"city": Athens"}]} /"exports"/0/"city"/"Moscow"

and /"exports"/1/"city"/"Athens".

Page 18: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Configuration Level Options

Automatic Per collection True (default) or False

Override with each document write

Indexing Mode Per collection Consistent or Lazy

Lazy for eventual updates/bulk ingestion

Included and excluded

paths

Per path Individual path or recursive includes (? And *)

Indexing Type Per path Support Hash (Default) and Range

Hash for equality, range for range queries

Indexing Precision Per path Supports 3 – 7 per path

Tradeoff storage, query RUs and write RUs

Page 19: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Path Description/use case

/ Default path for collection. Recursive and applies to whole document tree.

/"prop"/? Serve queries like the following (with Hash or Range types respectively):

SELECT * FROM collection c WHERE c.prop = "value" SELECT * FROM collection c WHERE c.prop > 5

/"prop"/* All paths under the specified label.

/"prop"/"subprop"/ Used during query execution to prune documents that do not have the

specified path.

/"prop"/"subprop"/? Serve queries (with Hash or Range types respectively):

SELECT * FROM collection c WHERE c.prop.subprop = "value" SELECT * FROM collection c WHERE c.prop.subprop > 5

Page 20: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Transactionally

process multiple

documents with

application defined

stored procedures

and triggers

JavaScript as the procedural language

Language integrated

Execution wrapped in an implicit transaction

Preregistered and scoped to a collection

Performed with ACID guarantees

Triggers invoked as pre or post operations

Page 21: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 22: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 23: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Get started with Azure DocumentDBhttp://aka.ms/documentdb

DocumentDB Documentation, Videos & Tutorialshttp://aka.ms/documentdbdocs

Submit DocumentDB Feedback & Vote for Featureshttp://aka.ms/documentdbfeedback

Sample Codehttp://aka.ms/documentdbsamples

Team Bloghttp://aka.ms/documentdbblog

DocumentDB Resources

Page 24: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Other noSQL databases on Azure

Page 25: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 26: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 27: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 28: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 29: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 30: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 31: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 32: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 33: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 34: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 35: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 36: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 37: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 38: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 39: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 40: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 41: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 42: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 43: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 44: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 45: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 46: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 47: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 48: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 49: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

tech.days 2015#mstechdays

Activez vos bénéfices Azure jusqu’à

115€ de ressources mensuelles

offertes

115€ /mois

x5 membres

x3 ans

= 4 175€ de ressources offertes

http://azure.com http://aka.ms/azurepourmsdn

150€ de ressources offertes

Sans engagement

Pour tousUn mois d’essai offert

http://www.microsoft.com/bizspark/

Pour les startupsBizspark

= 49 000€ de ressources offertes

pendant un an

Pour les abonnés MSDN

Page 50: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

tech.days 2015#mstechdays

Inscrivez-vous : http://aka.ms/pepiniereazure

Coaching technique et business

Ressources

Une équipe à Microsoft pour vous accompagner dans votre projet cloud et mettre à

votre disposition de l’aide personnalisée.

Visibilité

Page 51: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Benjamin Guinebertière

Technical Evangelist, Microsoft FranceAzure, data insights, machine learning @benjguin | http://3-4.fr

Page 52: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 53: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015

Démo screen shots

Page 54: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 55: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 56: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 57: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 58: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 59: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 60: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015
Page 61: Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databases - NoSQL matters Paris 2015