SlideShare a Scribd company logo
1
Lucas Dohmen
@moonbeamlabs
!
the multi-purpose NoSQL Database
!
www.arangodb.org
Lucas Dohmen
‣ ArangoDB Core Team
‣ ArangoDB Foxx & Ruby Adapter
‣ Student on the master branch
‣ Open Source Developer & Podcaster
2
/
(~(
) ) /_/
( _-----_(@ @)
(  /
/|/--| V
" " " "
Why did we start ArangoDB?
How should an ideal multi-purpose database look like?
Is it already out there?
!
‣ Second Generation NoSQL DB
‣ Unique feature set
‣ Solves some problems of other NoSQL DBs
‣ Greenfield project
‣ Experienced team building NoSQL DBs for more than 10
years
3
Main Features
4
‣ Open source and free
‣ Multi model database
‣ Convenient querying
‣ Extendable through JS
‣ High performance & space efficiency
‣ Easy to use
‣ Started in Sep 2011
‣ Current Version: 2.0
Free and Open Source
‣ Apache 2 License
‣ On Github
‣ Do what you want with it
‣ ... and don‘t pay a dime!
5
Multi model database
6
Key/Value Store Document Store Graph Database
Source: Andrew Carol
Polyglot Persistence
Key-Value Store
‣ Map value data to unique string keys (identifiers)
‣ Treat data as opaque (data has no structure)
‣ 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
‣ It‘s currently supported as a key-value document.
‣ In the near future it supports special key-value collection.
‣ One of the optimization will be the elimination of JSON in
this case, so the value need not be parsed.
‣ Sharding capabilities of Key-Value Collections will differ
from Document Collections
7
Document Store
‣ Normally based on key-value stores (each document still has a
unique key)
‣ Allow to save documents with logical similarity in „collections“
‣ Treat data records as attribute-structured documents (data is
no longer opaque)
‣ Often allows querying and indexing document attributes
!
ArangoDB
‣ It supports both. A database can contain collections from
different types.
‣ For efficient memory handling we have an automatic schema
recognition.
‣ It has different ways to retrieve data. CRUD via RESTful
Interface, QueryByExample, JS for graph traversals and
AQL.
8
‣ Example: Computer Science Bibliography
!
!
!
!
!
ArangoDB
‣ Supports Property Graphs
‣ Vertices and edges are documents
‣ Query them using geo-index, full-text, SQL-like queries
‣ Edges are directed relations between vertices
‣ Custom traversals and built-in graph algorithms
Graph Store
9
Type: inproceeding
Title: Finite Size Effects
Type: proceeding
Title: Neural Modeling
Type: person
Name:AnthonyC.C.
Coolen
Label: written
Label: published
Pages: 99-120
Type: person
Name: Snchez-Andrs
Label: edited
Analytic Processing DBsTransaction Processing DBs
Managing the evolving state of an IT system
Complex Queries Map/Reduce
Graphs
Extensibility
Key/Value
Column-

Stores
Documents
Massively
Distributed
Structured
Data
NoSQL Map
10
11
Transaction Processing DBs
Managing the evolving state of an IT system
Analytic Processing DBs
Map/Reduce
Graphs
Extensibility
Key/Value
Column-

Stores
Complex Queries
Documents
Massively
Distributed
Structured
Data
Another NoSQL Map
Convenient querying
Different scenarios require different access methods:
‣ Query 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 und JS for your own traversals
‣ JS Actions for “intelligent” DB request
12
Why another query language?
13
‣ Initially, we implemented a subset 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
Other Document Stores
‣ MongoDB uses JSON/BSON as its “query language”
‣ Limited
‣ Hard to read & write for more complex queries
‣ Complex queries, joins and transactions not possible
‣ CouchDB uses Map/Reduces
‣ It‘s not a relational algebra, and therefore hard to generate
‣ Not easy to learn
‣ Complex queries, joins and transactions not possible
14
Why you may want
a more expressive query language
15
Source: http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/
users
friends
commenter
liker
many
many
many
many
one
one
posts
comments
likes
users
friends
commenter
liker
many
many
many
many
one
one
posts
comments
likes
Why you may want
a more expressive query language
16
‣ Model it as you would in a SQL database
‣ comments gets a commenter_id – then do a join
users
friends
commenter
liker
many
many
many
many
one
one
posts
comments
likes
Why you may want
a more expressive query language
17
‣ Model it as you would in a document store
‣ posts embed comments as an array
users
friends
commenter
liker
many
many
many
many
one
one
posts
comments
likes
Why you may want
a more expressive query language
18
‣ Model it as you would in a graph database
‣ users as nodes, friendships as edges
ArangoDB Query Language (AQL)
19
‣ We came up with AQL 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
Example for Aggregation
‣ Retrieve cities with the number of users:
FOR u IN users
COLLECT city = u.city INTO g
RETURN {
"city" : city,
"numUsersInCity": LENGTH(g)
}
20
Example for Graph Query
‣ Paths:
FOR u IN users
LET userRelations = (
FOR p IN PATHS(
users,
relations,
"OUTBOUND"
)
FILTER p._from == u._id
RETURN p
)
RETURN {
"user" : u,
"relations" : userRelations
}
21
Extendable through JS
‣ JavaScript enriches ArangoDB
‣ Multi Collection Transactions
‣ Building small and efficient Apps - Foxx App Framework
‣ Individually Graph Traversals
‣ Cascading deletes/updates
‣ Assign permissions to actions
‣ Aggregate data from multiple queries into a single response
‣ Carry out data-intensive operations
‣ Help to create efficient Push Services - in the near Future
22
ActionServer-alittleApplicationServer
‣ ArangoDB can answer arbitrary 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/app
server
23
‣ Single Page Web Applications
‣ Native Mobile Applications
‣ ext. Developer APIs
APIs-willbecomemore&moreimportant
24
ArangoDB Foxx
‣ What if you could talk to the 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, which
you already know (without running into callback hell)
25
/
(~(
) ) /_/
( _-----_(@ @)
(  /
/|/--| V
" " " "
Foxx - Simple Example
26
Foxx = require("org/arangodb/foxx");
!
controller = new Foxx.Controller(appContext);
!
controller.get("/users ", function(req, res) {
res.json({
hello:
});
});
req.params("name");
/:name
Foxx - More features
‣ Full access to ArangoDB‘s internal APIs:
‣ Simple Queries
‣ AQL
‣ Traversals
‣ Automatic generation of interactive documentation
‣ Models and Repositories
‣ Central repository of Foxx apps for re-use and inspiration
‣ Authentication Module
27
High performance & space efficiency
RAM is cheap, but it's still not free and data volume is growing
fast. Requests volumes are also growing. So performance and
space efficiency are key features of a multi-purpose database.
!
‣ ArangoDB supports automatic schema recognition, so it is one
of the most space efficient document stores.
‣ It offers a performance oriented architecture with a C database
core, a C++ communication layer, JS and C++ for additional
functionalities.
‣ Performance critical points can be transformed to C oder C++.
‣ Although ArangoDB has a wide range of functions, such as MVCC
real ACID, schema recognition, etc., it can compete with popular
stores documents.
28
Space Efficiency
‣ Measure the space on disk of different data sets
‣ First in the standard config, then with some optimization
‣ We measured a bunch of different tasks
29
Store 50,000 Wiki Articles
30
0 MB
500 MB
1000 MB
1500 MB
2000 MB
ArangoDB CouchDB MongoDB
Normal
Optimized
http://www.arangodb.org/2012/07/08/collection-disk-usage-arangodb
3,459,421 AOL Search Queries
31
0 MB
550 MB
1100 MB
1650 MB
2200 MB
ArangoDB CouchDB MongoDB
Normal
Optimized
http://www.arangodb.org/2012/07/08/collection-disk-usage-arangodb
Performance: Disclaimer
‣ Always take performance tests with a grain 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
32
Execution Time:
Bulk Insert of 10,000,000 documents
33
ArangoDB CouchDB MongoDB
http://www.arangodb.org/2012/09/04/bulk-inserts-mongodb-couchdb-arangodb
Conclusion from Tests
‣ ArangoDB is really space efficient
‣ ArangoDB is “fast enough”
‣ Please test it for your own use case
34
Easy to use
‣ Easy to use admin interface
‣ 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
35
Admin Frontend
Dashboard
36
Admin Frontend
Collections & Documents
37
Admin Frontend
Graph Explorer
38
Admin Frontend
AQL development
39
Admin Frontend
complete V8 access
40
ArangoShell
41
Join the growing community
42
They are working on geo index, full text
search and many APIs: Ruby, Python,
PHP, Java, Clojure, ...
ArangoDB.explain()
{
"type": "2nd generation NoSQL database",
"model": [ "document", "graph", "key-value" ],
"openSource": true,
"license“: "apache 2",
"version": [ "1.3 stable", "1.4 alpha" ],
"builtWith": [ "C", "C++", "JS" ],
"uses": [ "Google V8" ],
"mainFeatures": [
"Multi-Collection-Transaction",
"Foxx API Framework",
"ArangoDB Query Language",
"Various Indexes",
"API Server",
"Automatic Schema Recognition"
]
}
43

More Related Content

What's hot (20)

PDF
Apache Spark Introduction
sudhakara st
 
PDF
Oracle APEX for Beginners
Dimitri Gielis
 
PDF
Oracle SQL Basics
Dhananjay Goel
 
PPTX
Mongo Nosql CRUD Operations
anujaggarwal49
 
PDF
Spatial Indexing
torp42
 
PPTX
Mongodb basics and architecture
Bishal Khanal
 
PPTX
Introduction to Data Engineering
Vivek Aanand Ganesan
 
PPTX
Basics of MongoDB
HabileLabs
 
PPTX
Introduction to oracle database (basic concepts)
Bilal Arshad
 
PDF
[Pgday.Seoul 2020] SQL Tuning
PgDay.Seoul
 
PPTX
An Introduction To NoSQL & MongoDB
Lee Theobald
 
PDF
MongoDB Fundamentals
MongoDB
 
PPT
9. Document Oriented Databases
Fabio Fumarola
 
PPTX
PostgreSQL- An Introduction
Smita Prasad
 
PPTX
Intro to React
Justin Reock
 
PPT
data modeling and models
sabah N
 
PDF
Hadoop Overview kdd2011
Milind Bhandarkar
 
PPTX
Entity Relationship Modelling
Bhandari Nawaraj
 
PPTX
Spark architecture
GauravBiswas9
 
PDF
Introduction to Apache Spark
Samy Dindane
 
Apache Spark Introduction
sudhakara st
 
Oracle APEX for Beginners
Dimitri Gielis
 
Oracle SQL Basics
Dhananjay Goel
 
Mongo Nosql CRUD Operations
anujaggarwal49
 
Spatial Indexing
torp42
 
Mongodb basics and architecture
Bishal Khanal
 
Introduction to Data Engineering
Vivek Aanand Ganesan
 
Basics of MongoDB
HabileLabs
 
Introduction to oracle database (basic concepts)
Bilal Arshad
 
[Pgday.Seoul 2020] SQL Tuning
PgDay.Seoul
 
An Introduction To NoSQL & MongoDB
Lee Theobald
 
MongoDB Fundamentals
MongoDB
 
9. Document Oriented Databases
Fabio Fumarola
 
PostgreSQL- An Introduction
Smita Prasad
 
Intro to React
Justin Reock
 
data modeling and models
sabah N
 
Hadoop Overview kdd2011
Milind Bhandarkar
 
Entity Relationship Modelling
Bhandari Nawaraj
 
Spark architecture
GauravBiswas9
 
Introduction to Apache Spark
Samy Dindane
 

Similar to ArangoDB (20)

PDF
Multi model-databases
Michael Hackstein
 
PDF
Multi model-databases
ArangoDB Database
 
PPTX
Introduction to NoSql
Omid Vahdaty
 
PDF
Post-relational databases: What's wrong with web development? v3
Dobrica Pavlinušić
 
PDF
GraphQL vs. (the) REST
coliquio GmbH
 
PDF
Headless approach for offloading heavy tasks in Magento
Sander Mangel
 
PDF
Spark Job Server and Spark as a Query Engine (Spark Meetup 5/14)
Evan Chan
 
PDF
EDB Postgres with Containers
EDB
 
PDF
Intro Couchdb
selvamanisampath
 
KEY
Hybrid MongoDB and RDBMS Applications
Steven Francia
 
PPTX
Comparison with storing data using NoSQL(CouchDB) and a relational database.
eross77
 
PDF
Beyond Relational
Lynn Langit
 
PDF
Node Js, AngularJs and Express Js Tutorial
PHP Support
 
PDF
Server Side Javascript
rajivmordani
 
PDF
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
IndicThreads
 
PPT
NoSql Databases
Nimat Khattak
 
PPT
Rapid, Scalable Web Development with MongoDB, Ming, and Python
Rick Copeland
 
PDF
Ruby on Rails (RoR) as a back-end processor for Apex
Espen Brækken
 
PPTX
3 scenarios when to use MongoDB!
Edureka!
 
PDF
Crystal internals (part 1)
Crystal Language
 
Multi model-databases
Michael Hackstein
 
Multi model-databases
ArangoDB Database
 
Introduction to NoSql
Omid Vahdaty
 
Post-relational databases: What's wrong with web development? v3
Dobrica Pavlinušić
 
GraphQL vs. (the) REST
coliquio GmbH
 
Headless approach for offloading heavy tasks in Magento
Sander Mangel
 
Spark Job Server and Spark as a Query Engine (Spark Meetup 5/14)
Evan Chan
 
EDB Postgres with Containers
EDB
 
Intro Couchdb
selvamanisampath
 
Hybrid MongoDB and RDBMS Applications
Steven Francia
 
Comparison with storing data using NoSQL(CouchDB) and a relational database.
eross77
 
Beyond Relational
Lynn Langit
 
Node Js, AngularJs and Express Js Tutorial
PHP Support
 
Server Side Javascript
rajivmordani
 
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
IndicThreads
 
NoSql Databases
Nimat Khattak
 
Rapid, Scalable Web Development with MongoDB, Ming, and Python
Rick Copeland
 
Ruby on Rails (RoR) as a back-end processor for Apex
Espen Brækken
 
3 scenarios when to use MongoDB!
Edureka!
 
Crystal internals (part 1)
Crystal Language
 
Ad

More from ArangoDB Database (20)

PPTX
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ArangoDB Database
 
PPTX
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
ArangoDB Database
 
PPTX
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB Database
 
PPTX
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB Database
 
PDF
GraphSage vs Pinsage #InsideArangoDB
ArangoDB Database
 
PDF
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
ArangoDB Database
 
PDF
Graph Analytics with ArangoDB
ArangoDB Database
 
PDF
Getting Started with ArangoDB Oasis
ArangoDB Database
 
PDF
Custom Pregel Algorithms in ArangoDB
ArangoDB Database
 
PPTX
Hacktoberfest 2020 - Intro to Knowledge Graphs
ArangoDB Database
 
PDF
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
ArangoDB Database
 
PDF
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
PDF
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoDB Database
 
PDF
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB Database
 
PDF
Webinar: What to expect from ArangoDB Oasis
ArangoDB Database
 
PDF
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB Database
 
PDF
3.5 webinar
ArangoDB Database
 
PDF
Webinar: How native multi model works in ArangoDB
ArangoDB Database
 
PDF
An introduction to multi-model databases
ArangoDB Database
 
PDF
Running complex data queries in a distributed system
ArangoDB Database
 
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB Database
 
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB Database
 
GraphSage vs Pinsage #InsideArangoDB
ArangoDB Database
 
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
ArangoDB Database
 
Graph Analytics with ArangoDB
ArangoDB Database
 
Getting Started with ArangoDB Oasis
ArangoDB Database
 
Custom Pregel Algorithms in ArangoDB
ArangoDB Database
 
Hacktoberfest 2020 - Intro to Knowledge Graphs
ArangoDB Database
 
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
ArangoDB Database
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoDB Database
 
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB Database
 
Webinar: What to expect from ArangoDB Oasis
ArangoDB Database
 
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB Database
 
3.5 webinar
ArangoDB Database
 
Webinar: How native multi model works in ArangoDB
ArangoDB Database
 
An introduction to multi-model databases
ArangoDB Database
 
Running complex data queries in a distributed system
ArangoDB Database
 
Ad

Recently uploaded (20)

PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Digital Circuits, important subject in CS
contactparinay1
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 

ArangoDB

  • 1. 1 Lucas Dohmen @moonbeamlabs ! the multi-purpose NoSQL Database ! www.arangodb.org
  • 2. Lucas Dohmen ‣ ArangoDB Core Team ‣ ArangoDB Foxx & Ruby Adapter ‣ Student on the master branch ‣ Open Source Developer & Podcaster 2 / (~( ) ) /_/ ( _-----_(@ @) ( / /|/--| V " " " "
  • 3. Why did we start ArangoDB? How should an ideal multi-purpose database look like? Is it already out there? ! ‣ Second Generation NoSQL DB ‣ Unique feature set ‣ Solves some problems of other NoSQL DBs ‣ Greenfield project ‣ Experienced team building NoSQL DBs for more than 10 years 3
  • 4. Main Features 4 ‣ Open source and free ‣ Multi model database ‣ Convenient querying ‣ Extendable through JS ‣ High performance & space efficiency ‣ Easy to use ‣ Started in Sep 2011 ‣ Current Version: 2.0
  • 5. Free and Open Source ‣ Apache 2 License ‣ On Github ‣ Do what you want with it ‣ ... and don‘t pay a dime! 5
  • 6. Multi model database 6 Key/Value Store Document Store Graph Database Source: Andrew Carol Polyglot Persistence
  • 7. Key-Value Store ‣ Map value data to unique string keys (identifiers) ‣ Treat data as opaque (data has no structure) ‣ 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 ‣ It‘s currently supported as a key-value document. ‣ In the near future it supports special key-value collection. ‣ One of the optimization will be the elimination of JSON in this case, so the value need not be parsed. ‣ Sharding capabilities of Key-Value Collections will differ from Document Collections 7
  • 8. Document Store ‣ Normally based on key-value stores (each document still has a unique key) ‣ Allow to save documents with logical similarity in „collections“ ‣ Treat data records as attribute-structured documents (data is no longer opaque) ‣ Often allows querying and indexing document attributes ! ArangoDB ‣ It supports both. A database can contain collections from different types. ‣ For efficient memory handling we have an automatic schema recognition. ‣ It has different ways to retrieve data. CRUD via RESTful Interface, QueryByExample, JS for graph traversals and AQL. 8
  • 9. ‣ Example: Computer Science Bibliography ! ! ! ! ! ArangoDB ‣ Supports Property Graphs ‣ Vertices and edges are documents ‣ Query them using geo-index, full-text, SQL-like queries ‣ Edges are directed relations between vertices ‣ Custom traversals and built-in graph algorithms Graph Store 9 Type: inproceeding Title: Finite Size Effects Type: proceeding Title: Neural Modeling Type: person Name:AnthonyC.C. Coolen Label: written Label: published Pages: 99-120 Type: person Name: Snchez-Andrs Label: edited
  • 10. Analytic Processing DBsTransaction Processing DBs Managing the evolving state of an IT system Complex Queries Map/Reduce Graphs Extensibility Key/Value Column-
 Stores Documents Massively Distributed Structured Data NoSQL Map 10
  • 11. 11 Transaction Processing DBs Managing the evolving state of an IT system Analytic Processing DBs Map/Reduce Graphs Extensibility Key/Value Column-
 Stores Complex Queries Documents Massively Distributed Structured Data Another NoSQL Map
  • 12. Convenient querying Different scenarios require different access methods: ‣ Query 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 und JS for your own traversals ‣ JS Actions for “intelligent” DB request 12
  • 13. Why another query language? 13 ‣ Initially, we implemented a subset 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
  • 14. Other Document Stores ‣ MongoDB uses JSON/BSON as its “query language” ‣ Limited ‣ Hard to read & write for more complex queries ‣ Complex queries, joins and transactions not possible ‣ CouchDB uses Map/Reduces ‣ It‘s not a relational algebra, and therefore hard to generate ‣ Not easy to learn ‣ Complex queries, joins and transactions not possible 14
  • 15. Why you may want a more expressive query language 15 Source: http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/ users friends commenter liker many many many many one one posts comments likes
  • 16. users friends commenter liker many many many many one one posts comments likes Why you may want a more expressive query language 16 ‣ Model it as you would in a SQL database ‣ comments gets a commenter_id – then do a join
  • 17. users friends commenter liker many many many many one one posts comments likes Why you may want a more expressive query language 17 ‣ Model it as you would in a document store ‣ posts embed comments as an array
  • 18. users friends commenter liker many many many many one one posts comments likes Why you may want a more expressive query language 18 ‣ Model it as you would in a graph database ‣ users as nodes, friendships as edges
  • 19. ArangoDB Query Language (AQL) 19 ‣ We came up with AQL 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
  • 20. Example for Aggregation ‣ Retrieve cities with the number of users: FOR u IN users COLLECT city = u.city INTO g RETURN { "city" : city, "numUsersInCity": LENGTH(g) } 20
  • 21. Example for Graph Query ‣ Paths: FOR u IN users LET userRelations = ( FOR p IN PATHS( users, relations, "OUTBOUND" ) FILTER p._from == u._id RETURN p ) RETURN { "user" : u, "relations" : userRelations } 21
  • 22. Extendable through JS ‣ JavaScript enriches ArangoDB ‣ Multi Collection Transactions ‣ Building small and efficient Apps - Foxx App Framework ‣ Individually Graph Traversals ‣ Cascading deletes/updates ‣ Assign permissions to actions ‣ Aggregate data from multiple queries into a single response ‣ Carry out data-intensive operations ‣ Help to create efficient Push Services - in the near Future 22
  • 23. ActionServer-alittleApplicationServer ‣ ArangoDB can answer arbitrary 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/app server 23
  • 24. ‣ Single Page Web Applications ‣ Native Mobile Applications ‣ ext. Developer APIs APIs-willbecomemore&moreimportant 24
  • 25. ArangoDB Foxx ‣ What if you could talk to the 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, which you already know (without running into callback hell) 25 / (~( ) ) /_/ ( _-----_(@ @) ( / /|/--| V " " " "
  • 26. Foxx - Simple Example 26 Foxx = require("org/arangodb/foxx"); ! controller = new Foxx.Controller(appContext); ! controller.get("/users ", function(req, res) { res.json({ hello: }); }); req.params("name"); /:name
  • 27. Foxx - More features ‣ Full access to ArangoDB‘s internal APIs: ‣ Simple Queries ‣ AQL ‣ Traversals ‣ Automatic generation of interactive documentation ‣ Models and Repositories ‣ Central repository of Foxx apps for re-use and inspiration ‣ Authentication Module 27
  • 28. High performance & space efficiency RAM is cheap, but it's still not free and data volume is growing fast. Requests volumes are also growing. So performance and space efficiency are key features of a multi-purpose database. ! ‣ ArangoDB supports automatic schema recognition, so it is one of the most space efficient document stores. ‣ It offers a performance oriented architecture with a C database core, a C++ communication layer, JS and C++ for additional functionalities. ‣ Performance critical points can be transformed to C oder C++. ‣ Although ArangoDB has a wide range of functions, such as MVCC real ACID, schema recognition, etc., it can compete with popular stores documents. 28
  • 29. Space Efficiency ‣ Measure the space on disk of different data sets ‣ First in the standard config, then with some optimization ‣ We measured a bunch of different tasks 29
  • 30. Store 50,000 Wiki Articles 30 0 MB 500 MB 1000 MB 1500 MB 2000 MB ArangoDB CouchDB MongoDB Normal Optimized http://www.arangodb.org/2012/07/08/collection-disk-usage-arangodb
  • 31. 3,459,421 AOL Search Queries 31 0 MB 550 MB 1100 MB 1650 MB 2200 MB ArangoDB CouchDB MongoDB Normal Optimized http://www.arangodb.org/2012/07/08/collection-disk-usage-arangodb
  • 32. Performance: Disclaimer ‣ Always take performance tests with a grain 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 32
  • 33. Execution Time: Bulk Insert of 10,000,000 documents 33 ArangoDB CouchDB MongoDB http://www.arangodb.org/2012/09/04/bulk-inserts-mongodb-couchdb-arangodb
  • 34. Conclusion from Tests ‣ ArangoDB is really space efficient ‣ ArangoDB is “fast enough” ‣ Please test it for your own use case 34
  • 35. Easy to use ‣ Easy to use admin interface ‣ 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 35
  • 42. Join the growing community 42 They are working on geo index, full text search and many APIs: Ruby, Python, PHP, Java, Clojure, ...
  • 43. ArangoDB.explain() { "type": "2nd generation NoSQL database", "model": [ "document", "graph", "key-value" ], "openSource": true, "license“: "apache 2", "version": [ "1.3 stable", "1.4 alpha" ], "builtWith": [ "C", "C++", "JS" ], "uses": [ "Google V8" ], "mainFeatures": [ "Multi-Collection-Transaction", "Foxx API Framework", "ArangoDB Query Language", "Various Indexes", "API Server", "Automatic Schema Recognition" ] } 43