database look like? Is it already out there? ArangoDB ‣ Unique feature set ‣ Solves some problems of other NoSQL DBs ‣ Greenfield project ‣ Experienced team building NoSQL DBs for more than 10 years ‣ Second Generation NoSQL DB 3
model database ‣ Convenient querying ‣ Extendable through JS & MRuby ‣ High performance & space efficiency ‣ Easy to use ‣ Started in Sep 2011 ‣ Version 1.0 in Sep 2012 ‣ Version 1.4 in Aug 2013 ‣ Multi Database Support ‣ Foxx API Framework ‣ Master/Slave Replication
(identifiers) ‣ Treat data as opaque (data has no schema) ‣ Can implement scaling and partitioning easily due to simplistic data model ‣ Key-value can be seen as a special case of documents ‣ For many applications this is sufficient, but not for all cases ArangoDB ‣ Supports key-value documents ‣ In the near future we will be support special key-value collection 9
still has a unique key) ‣ Allow to save documents with logical similarity in “databases” or “collections” ‣ Treat data records as attribute-structured documents (data is no more opaque) ‣ Often allow querying and indexing document attributes ArangoDB ‣ Supports documents ‣ For efficient memory handling we have an automatic schema recognition 10
‣ Vertices and edges are documents ‣ Custom traversals and built-in graph algorithms Graph Store 11 Type: inproceeding Title: Finite Size Effects Type: proceeding Title: Neural Modeling Type: person Name: Anthony C. C. Coolen Label: written Label: published Pages: 99-120 Type: person Name: Snchez-Andrs Label: edited
a document by its unique id / key: GET /_api/document/users/12345 ‣ Query by providing an example document: PUT /_api/simple/by-example { "name": "Jan", "age": 38 } ‣ Query via AQL: FOR user IN users FILTER user.active == true RETURN { name: user.name } ‣ Graph Traversals ‣ JS Actions 12
of SQL's SELECT ‣ It didn't fit well ‣ UNQL addressed some of the problems ‣ Looked dead ‣ No working implementations ‣ XQuery seemed quite powerful ‣ A bit too complex for simple queries ‣ JSONiq wasn't there when we started 13
language” ‣ Limited ‣ Hard to read & write for more complex queries ‣ CouchDB uses Map/Reduces ‣ It‘s not a relational algebra, and therefore hard to generate ‣ Not easy to learn ‣ More about Queries in different NoSQL Databases: ‣ Query mechanisms for NoSQL databases ‣ Jan Steemann ‣ 14:00, HS5 14
mid-2012 ‣ Declarative language, loosely based on the syntax of XQuery ‣ Other keywords than SQL so it's clear that the languages are different ‣ Implemented in C and JavaScript 15
LET userRelations = ( FOR p IN PATHS( users, relations, "OUTBOUND" ) FILTER p._from == u._id RETURN p ) RETURN { "user" : u, "relations" : userRelations } 17
‣ Multi Collection Transactions ‣ Graph Traversals ‣ Cascading deletes/updates ‣ Aggregate data from multiple queries into a single response ‣ Data-intensive operations ‣ Actions, Foxx, Application Server ‣ Currently supported ‣ JavaScript (V8) ‣ MRuby (experimental, not fully integrated yet) 18
HTTP requests directly ‣ You can write your own JavaScript functions (“actions”) that will be executed server-side ‣ Includes a permission system ➡ You can use it as a database or as a combined database/ application server 19
database directly? ‣ It would only need an API! ‣ What if we could define this API in JavaScript? ‣ ArangoDB Foxx is streamlined for API creation – not a Jack of all trades ‣ It is designed for front end developers: Use JavaScript, you already know that 21 /\ (~( ) ) /\_/\ ( _-----_(@ @) ( \ / /|/--\|\ V " " " "
C database core, a C++ communication layer, JS and C++ for additional functionalities ‣ Performance critical points can be transformed to C oder C++ ‣ Even though it has a richer feature set, it can compete performance wise with existing solutions and partly even achieve better results 24
of salt ‣ Performance is very dependent on a lot of factors including the specific task at hand ‣ This is just to give you a glimpse at the performance ‣ Always do your own performance tests (and if you do, report back to us :) ) ‣ But now: Let‘s see some numbers 28
Simple Queries for simple queries, AQL for complex queries ‣ Simplify your setup: ArangoDB only – no Application Server etc. – on a single server is sufficient for some use cases ‣ You need graph queries or key value storage? You don't need to add another component to the mix. ‣ No external dependencies like the JVM – just install ArangoDB ‣ HTTP interface – use your load balancer 31