multi-model databases and node.js

13
Multi-model databases and node.js Max Neunhöffer Node.js Club SF, 23 March 2015

Upload: max-neunhoeffer

Post on 18-Jul-2015

434 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Multi-model databases and Node.js

Multi-model databases andnode.js

Max Neunhöffer

Node.js Club SF, 23 March 2015

www.arangodb.com

Page 2: Multi-model databases and Node.js

triAGENS(mother company of ArangoDB GmbH)

15 years of experience in building specialized databases

We care about database technology!

In 2012, we wanted to create a databasesuch that YOU can build such services.

Page 3: Multi-model databases and Node.js

Document storeA document store stores a set of documents, which meansJSON data, these sets are called collections. The databasehas access to the contents of the documents.

schema-lessvery versatile

Page 4: Multi-model databases and Node.js

Key/value storeOpaque values, only key lookup without secondary indexes:

=⇒ high performance and perfect scalability

more restricted queries— better scalability

Page 5: Multi-model databases and Node.js

Graph databaseA graph database stores a labelled graph. Vertices andedges can be documents.Graphs are good to model relations.

“graphy queries” like traversals are crucial

Page 6: Multi-model databases and Node.js

Polyglot Persistence

IdeaUse the right data model for each part of a system.

Take scalability needs into account!

Page 7: Multi-model databases and Node.js

A typical Use Case— an Online Shop

We need to holdcustomer data: usually homogeneous, but still variationsMySQLproduct data: even for a specialised business quiteinhomogeneousshopping carts: need very fast lookup by session keyorder and sales data: relate customers and productsrecommendation engine data: links between different entities

Page 8: Multi-model databases and Node.js

Polyglot Persistence is nice, but . . .

DisadvantagesConsequence:One needs multiple database systems in the persis-tence layer of a single project!

Wouldn’t it be nice, . . .. . . to enjoy the benefits without the disadvantages?

Page 9: Multi-model databases and Node.js

The Multi-Model Approach

Multi-model databaseA multi-model database combines a document store with agraph database and is at the same time a key/value store,with a common query language for all three data models.

Important:is able to compete with specialised products on their turfallows for polyglot persistence using a single database

Page 10: Multi-model databases and Node.js

Use case: Aircraft fleet management

Page 11: Multi-model databases and Node.js

is a multi-model database (document store & graph database),is open source and free (Apache 2 license),offers convenient queries (via HTTP/REST and AQL),including joins between different collections,configurable consistency guarantees using transactionsmemory efficient by shape detection,uses JavaScript throughout (Google’s V8 built into server),API extensible by JS code in the Foxx Microservice Framework,offers many drivers for a wide range of languages,is easy to use with web front end and good documentation,and enjoys good community as well as professional support.

Page 12: Multi-model databases and Node.js

Extensible through JavaScript

The Foxx Microservice FrameworkAllows you to extend the HTTP/REST API by your ownroutes, which you implement in JavaScript running on thedatabase server, with direct access to the C++ DB engine.

Unprecedented possibilities for data centric services:custom-made complex queries or authorizationsschema-validationpush feeds, etc.

Page 13: Multi-model databases and Node.js

Links

https://www.arangodb.com

https://github.com/ArangoDB/guesser