SlideShare a Scribd company logo
1 of 24
Download to read offline
Domain Driven Design, 
Multi-Model Databases and 
ArangoDB 
Baksia Meetup, Oslo, 23 October 2014 
Max Neunhöffer 
www.arangodb.com
Max Neunhöffer 
I am a mathematician 
“Earlier life”: Research in Computer Algebra 
(Computational Group Theory) 
Always juggled with big data 
Now: working in database development, NoSQL, ArangoDB 
I like: 
research, 
hacking, 
teaching, 
tickling the highest performance out of computer systems. 
1
ArangoDB GmbH 
triAGENS GmbH offers consulting services since 2004: 
software architecture 
project management 
software development 
business analysis 
a lot of experience with specialised database systems. 
have done NoSQL, before the term was coined at all 
2011/2012, an idea emerged: 
to build the database one had wished to have all those years! 
development of ArangoDB as open source software since 2012 
ArangoDB GmbH: spin-off to take care of ArangoDB (2014) 
2
A typical Project: a Web Shop 
The Speci1cation Workshop 
(need recommendation engine, need statistics, etc.) 
The Developers get to work . . . 
(tables, relations, normalisation, schemas, queries, front-ends, etc.) 
HANDOVER 
(Why can I not . . . ? This is unusable!) 
3
Solution: Agile Approach and Domain Driven Design 
These days, many use (or try to use): 
agile methods (Scrum, sprints, rapid prototyping) 
with continuous feedback from product owners to developers 
promising less surprises in deployment and high 2exibility. 
Domain Driven Design (Eric Evans, 2004): 
identify a Domain (area in which software is applied) 
make a Model (abstract description of situation) 
use a Ubiquitous Language (that all team members speak) 
clearly de1ne the Context in which the model applies. 
Model your data as close to the domain as possible. 
Example: object oriented programming 
4
Fundamental Problem: need a ubiquitous Language 
Listening to team members, you hear completely different things: 
Product Managers talk about 
customers “browsing” through the shop, 
powerful search for products (with the “good ones” on top), 
“useful” recommendations. 
Developers talk about 
tables, normalisation, queries and joins 
secondary indexes, front-end pages 
object oriented, model view controller, responsive design 
=) both groups think the others are morons 
5
The problem is rooted very deeply 
functionality not gathered 
methodically 
+ 
“obvious” functions are missing 
no common language 
+ 
misunderstandings about details 
6
NoSQL: Richer Data Models are closer to the Domain 
Some terms used by Evans as part of the ubiquitous language: 
Entity: has an identity and mutable state (e.g. a person) 
Value object: is identi1ed by its attributes and immutable 
(e.g. an address) 
Aggregate: is a combination of entities and value objects into one 
transactional unit (e.g. a customer with its orders) 
Association: is a relation between entities and value objects, can 
have attributes, usually immutable 
Consequences 
These terms coming from the Domain must be present in 
the Design. The whole team must understand the same 
when talking about them. 
7
Polyglot Persistence 
Idea 
Use the right data model for each part of a system. 
For an application, persist 
an object or structured data as a JSON document, 
a hash table in a key/value store, 
relations between objects in a graph database, 
a homogeneous array in a relational DBMS. 
If the table has many empty cells or inhomogeneous rows, use 
a column-based database. 
Take scalability needs into account! 
8
Document and key/value stores 
Document store 
A document store stores a set of documents, which usually 
means JSON data, these sets are called collections. The 
database has access to the contents of the documents. 
each document in the collection has a unique key 
secondary indexes possible, leading to more powerful queries 
different documents in the same collection: structure can vary 
no schema is required for a collection 
database normalisation can be relaxed 
“Special case”: key/value store 
Opaque values, restrict to key lookup without secondary 
indexes: 
=) high performance and perfect scalability 
9
Graph databases 
Graph database 
A graph database stores a labelled graph. Vertices and 
edges can be documents. Graphs are good to model 
relations. 
graphs often describe data very naturally (e.g. the facebook 
friendship graph) 
graphs can be stored using tables, however, graph queries 
notoriously lead to expensive joins 
there are interesting and useful graph algorithms like “shortest 
path” or “neighbourhood” 
need a good query language to reap the bene1ts 
horizontal scalability is troublesome 
graph databases vary widely in scope and usage, no standard 
10
Massively parallel: map-reduce and friends 
The area of massively parallel 
A massively parallel database can use thousands of servers 
distributed all over the world and still appears as a single 
service. 
Humongous data capacity and very high read/write 
performance 
examples are Apache Cassandra, Apache Hadoop, Google’s 
Spanner, Riak and others 
these systems have important use cases, in particular in the 
analytic domain 
query capabilities are somewhat limited like for example only 
“map/reduce” 
) good horizontal scalability at the cost of reduced query 2exibility 
11
A typical Use Case — an Online Shop 
We need to hold 
customer data: usually homogeneous, but still variations 
=) use a document store: 
product data: even for a specialised business quite 
inhomogeneous 
=) use a document store: 
shopping carts: need very fast lookup by session key 
=) use a key/value store: 
order and sales data: relate customers and products 
=) use a document store: 
recommendation engine data: links between different entities 
=) use a graph database: 
12
Polyglot Persistence is nice, but . . . 
Consequence: One needs multiple database systems in the persis-tence 
layer of a single project! 
Polyglot persistence introduces some friction through 
data synchronisation, 
data conversion, 
increased installation and administration effort, 
more training needs. 
Wouldn’t it be nice, . . . 
. . . to enjoy the bene1ts without paying with the 
disadvantages? 
13
The Multi-Model Approach 
Multi-model database 
A multi-model database combines a document store with a 
graph database and is at the same time a key/value store. 
Vertices are documents in a vertex collection, 
edges are documents in an edge collection. 
a single, common query language for all three data models 
is able to compete with specialised products on their turf 
allows for polyglot persistence using a single database 
queries can mix the different data models 
can replace a RDMBS in many cases 
14
Why is this possible at all? 
Document stores and key/value stores 
Document stores: have primary key, are key/value stores. 
Without using secondary indexes, performance is nearly as 
good as with opaque data instead of JSON. 
Good horizontal scalability can be achieved for key lookups. 
Document stores and graph databases 
graph database: would like to associate arbitrary data with 
vertices and edges, so JSON documents are a good choice. 
A good edge index, giving fast access to neighbours. 
This can be a secondary index. 
Graph support in the query language. 
Implementations of graph algorithms in the database engine. 
15
A Map of the NoSQL Landscape 
Transaction Processing DBs 
Map/reduce 
Column Stores 
Analytic processing DBs 
Extensibility 
Complex queries 
Documents 
Massively distributed 
Graphs 
Structured 
Data 
Key/Value 
16
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), 
memory eZcient by shape detection, 
uses JavaScript throughout (Google’s V8 built into server), 
API extensible by JavaScript code in the Foxx framework, 
offers many drivers for a wide range of languages, 
is easy to use with web front end and good documentation, 
enjoys good professional as well as community support 
and has sharding since Version 2.0. 
17
A Map of the NoSQL Landscape 
Transaction Processing DBs 
Map/reduce 
Column Stores 
Analytic processing DBs 
Extensibility 
Complex queries 
Documents 
Massively distributed 
Graphs 
Structured 
Data 
Key/Value 
18
The ArangoDB Territory 
Transaction Processing DBs 
Map/reduce 
Column Stores 
Analytic processing DBs 
Extensibility 
Complex queries 
Documents 
Massively distributed 
Graphs 
Structured 
Data 
Key/Value 
19
Strong Consistency 
ArangoDB offers 
atomic and isolated CRUD operations for single documents, 
transactions spanning multiple documents and multiple 
collections, 
snapshot semantics for complex queries, 
very secure durable storage using append only and storing 
multiple revisions, 
all this for documents as well as for graphs. 
In the (not too distant) future, ArangoDB will 
offer the same ACID semantics even with sharding, 
implement complete MVCC semantics to allow for lock-free 
concurrent transactions. 
20
Replication and Sharding — horizontal scalability 
Right now, ArangoDB provides 
easy setup of (asynchronous) replication, 
which allows read access parallelisation (master/slaves setup), 
sharding with automatic data distribution to multiple servers. 
Very soon, ArangoDB will feature 
fault tolerance by automatic failover and synchronous 
replication in cluster mode, 
zero administration by a self-reparing and self-balancing 
cluster architecture. 
21
Powerful query language: AQL 
The built in Arango Query Language AQL allows 
complex, powerful and convenient queries, 
with transaction semantics, 
allowing to do joins, 
with user de1nable functions (in JavaScript). 
AQL is independent of the driver used and 
offers protection against injections by design. 
For Version 2.3, we are reengineering the AQL query engine: 
use a C++ implementation for high performance, 
optimise distributed queries in the cluster. 
22
Extensible through JavaScript and Foxx 
The HTTP API of ArangoDB 
can be extended by user-de1ned JavaScript code, 
that is executed in the DB server for high performance. 
This is formalised by the Foxx framework, 
which allows to implement complex, user-de1ned APIs with 
direct access to the DB engine. 
Very 2exible and secure authentication schemes can be 
implemented conveniently by the user in JavaScript. 
Because JavaScript runs everywhere (in the DB server as well 
as in the browser), one can use the same libraries in the 
back-end and in the front-end. 
=) implement your own micro services 
23

More Related Content

What's hot

5 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/25 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/2Fabio Fumarola
 
NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduceJ Singh
 
Database awareness
Database awarenessDatabase awareness
Database awarenesskloia
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaperRajesh Kumar
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.Navdeep Charan
 
Nonrelational Databases
Nonrelational DatabasesNonrelational Databases
Nonrelational DatabasesUdi Bauman
 
guacamole: an Object Document Mapper for ArangoDB
guacamole: an Object Document Mapper for ArangoDBguacamole: an Object Document Mapper for ArangoDB
guacamole: an Object Document Mapper for ArangoDBMax Neunhöffer
 
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMING
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMINGEVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMING
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMINGijiert bestjournal
 
Big Challenges in Data Modeling: NoSQL and Data Modeling
Big Challenges in Data Modeling: NoSQL and Data ModelingBig Challenges in Data Modeling: NoSQL and Data Modeling
Big Challenges in Data Modeling: NoSQL and Data ModelingDATAVERSITY
 

What's hot (20)

Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
5 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/25 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/2
 
NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduce
 
the rising no sql technology
the rising no sql technologythe rising no sql technology
the rising no sql technology
 
Mongo db
Mongo dbMongo db
Mongo db
 
Nosql
NosqlNosql
Nosql
 
Nosql
NosqlNosql
Nosql
 
DBPedia-past-present-future
DBPedia-past-present-futureDBPedia-past-present-future
DBPedia-past-present-future
 
Database awareness
Database awarenessDatabase awareness
Database awareness
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
Dwh faqs
Dwh faqsDwh faqs
Dwh faqs
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.
 
Nonrelational Databases
Nonrelational DatabasesNonrelational Databases
Nonrelational Databases
 
guacamole: an Object Document Mapper for ArangoDB
guacamole: an Object Document Mapper for ArangoDBguacamole: an Object Document Mapper for ArangoDB
guacamole: an Object Document Mapper for ArangoDB
 
Database
DatabaseDatabase
Database
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMING
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMINGEVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMING
EVALUATING CASSANDRA, MONGO DB LIKE NOSQL DATASETS USING HADOOP STREAMING
 
Big Challenges in Data Modeling: NoSQL and Data Modeling
Big Challenges in Data Modeling: NoSQL and Data ModelingBig Challenges in Data Modeling: NoSQL and Data Modeling
Big Challenges in Data Modeling: NoSQL and Data Modeling
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 

Similar to Oslo baksia2014

Multi-model databases and node.js
Multi-model databases and node.jsMulti-model databases and node.js
Multi-model databases and node.jsMax Neunhöffer
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptxRushikeshChikane2
 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptxRushikeshChikane2
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfajajkhan16
 
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AG
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AGOLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AG
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AGLucidworks
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesJon Meredith
 
NOSQL Databases types and Uses
NOSQL Databases types and UsesNOSQL Databases types and Uses
NOSQL Databases types and UsesSuvradeep Rudra
 
Document Based Data Modeling Technique
Document Based Data Modeling TechniqueDocument Based Data Modeling Technique
Document Based Data Modeling TechniqueCarmen Sanborn
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB Database
 
Assignment_4
Assignment_4Assignment_4
Assignment_4Kirti J
 

Similar to Oslo baksia2014 (20)

Multi-model databases and node.js
Multi-model databases and node.jsMulti-model databases and node.js
Multi-model databases and node.js
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx
 
Nosql
NosqlNosql
Nosql
 
Artigo no sql x relational
Artigo no sql x relationalArtigo no sql x relational
Artigo no sql x relational
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdf
 
Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AG
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AGOLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AG
OLAP Battle - SolrCloud vs. HBase: Presented by Dragan Milosevic, Zanox AG
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
NOSQL Databases types and Uses
NOSQL Databases types and UsesNOSQL Databases types and Uses
NOSQL Databases types and Uses
 
Document Based Data Modeling Technique
Document Based Data Modeling TechniqueDocument Based Data Modeling Technique
Document Based Data Modeling Technique
 
unit2-ppt1.pptx
unit2-ppt1.pptxunit2-ppt1.pptx
unit2-ppt1.pptx
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQL
 
The ABC of Big Data
The ABC of Big DataThe ABC of Big Data
The ABC of Big Data
 
Unit-10.pptx
Unit-10.pptxUnit-10.pptx
Unit-10.pptx
 
The future of Big Data tooling
The future of Big Data toolingThe future of Big Data tooling
The future of Big Data tooling
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Assignment_4
Assignment_4Assignment_4
Assignment_4
 

More from Max Neunhöffer

Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSMax Neunhöffer
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSMax Neunhöffer
 
Processing large-scale graphs with Google Pregel
Processing large-scale graphs with Google PregelProcessing large-scale graphs with Google Pregel
Processing large-scale graphs with Google PregelMax Neunhöffer
 
Backbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTPBackbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTPMax Neunhöffer
 
Complex queries in a distributed multi-model database
Complex queries in a distributed multi-model databaseComplex queries in a distributed multi-model database
Complex queries in a distributed multi-model databaseMax Neunhöffer
 
Overhauling a database engine in 2 months
Overhauling a database engine in 2 monthsOverhauling a database engine in 2 months
Overhauling a database engine in 2 monthsMax Neunhöffer
 
Experience with C++11 in ArangoDB
Experience with C++11 in ArangoDBExperience with C++11 in ArangoDB
Experience with C++11 in ArangoDBMax Neunhöffer
 
Extensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software ArchitectureExtensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software ArchitectureMax Neunhöffer
 

More from Max Neunhöffer (9)

Deep Dive on ArangoDB
Deep Dive on ArangoDBDeep Dive on ArangoDB
Deep Dive on ArangoDB
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOS
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOS
 
Processing large-scale graphs with Google Pregel
Processing large-scale graphs with Google PregelProcessing large-scale graphs with Google Pregel
Processing large-scale graphs with Google Pregel
 
Backbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTPBackbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTP
 
Complex queries in a distributed multi-model database
Complex queries in a distributed multi-model databaseComplex queries in a distributed multi-model database
Complex queries in a distributed multi-model database
 
Overhauling a database engine in 2 months
Overhauling a database engine in 2 monthsOverhauling a database engine in 2 months
Overhauling a database engine in 2 months
 
Experience with C++11 in ArangoDB
Experience with C++11 in ArangoDBExperience with C++11 in ArangoDB
Experience with C++11 in ArangoDB
 
Extensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software ArchitectureExtensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software Architecture
 

Recently uploaded

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 

Recently uploaded (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 

Oslo baksia2014

  • 1. Domain Driven Design, Multi-Model Databases and ArangoDB Baksia Meetup, Oslo, 23 October 2014 Max Neunhöffer www.arangodb.com
  • 2. Max Neunhöffer I am a mathematician “Earlier life”: Research in Computer Algebra (Computational Group Theory) Always juggled with big data Now: working in database development, NoSQL, ArangoDB I like: research, hacking, teaching, tickling the highest performance out of computer systems. 1
  • 3. ArangoDB GmbH triAGENS GmbH offers consulting services since 2004: software architecture project management software development business analysis a lot of experience with specialised database systems. have done NoSQL, before the term was coined at all 2011/2012, an idea emerged: to build the database one had wished to have all those years! development of ArangoDB as open source software since 2012 ArangoDB GmbH: spin-off to take care of ArangoDB (2014) 2
  • 4. A typical Project: a Web Shop The Speci1cation Workshop (need recommendation engine, need statistics, etc.) The Developers get to work . . . (tables, relations, normalisation, schemas, queries, front-ends, etc.) HANDOVER (Why can I not . . . ? This is unusable!) 3
  • 5. Solution: Agile Approach and Domain Driven Design These days, many use (or try to use): agile methods (Scrum, sprints, rapid prototyping) with continuous feedback from product owners to developers promising less surprises in deployment and high 2exibility. Domain Driven Design (Eric Evans, 2004): identify a Domain (area in which software is applied) make a Model (abstract description of situation) use a Ubiquitous Language (that all team members speak) clearly de1ne the Context in which the model applies. Model your data as close to the domain as possible. Example: object oriented programming 4
  • 6. Fundamental Problem: need a ubiquitous Language Listening to team members, you hear completely different things: Product Managers talk about customers “browsing” through the shop, powerful search for products (with the “good ones” on top), “useful” recommendations. Developers talk about tables, normalisation, queries and joins secondary indexes, front-end pages object oriented, model view controller, responsive design =) both groups think the others are morons 5
  • 7. The problem is rooted very deeply functionality not gathered methodically + “obvious” functions are missing no common language + misunderstandings about details 6
  • 8. NoSQL: Richer Data Models are closer to the Domain Some terms used by Evans as part of the ubiquitous language: Entity: has an identity and mutable state (e.g. a person) Value object: is identi1ed by its attributes and immutable (e.g. an address) Aggregate: is a combination of entities and value objects into one transactional unit (e.g. a customer with its orders) Association: is a relation between entities and value objects, can have attributes, usually immutable Consequences These terms coming from the Domain must be present in the Design. The whole team must understand the same when talking about them. 7
  • 9. Polyglot Persistence Idea Use the right data model for each part of a system. For an application, persist an object or structured data as a JSON document, a hash table in a key/value store, relations between objects in a graph database, a homogeneous array in a relational DBMS. If the table has many empty cells or inhomogeneous rows, use a column-based database. Take scalability needs into account! 8
  • 10. Document and key/value stores Document store A document store stores a set of documents, which usually means JSON data, these sets are called collections. The database has access to the contents of the documents. each document in the collection has a unique key secondary indexes possible, leading to more powerful queries different documents in the same collection: structure can vary no schema is required for a collection database normalisation can be relaxed “Special case”: key/value store Opaque values, restrict to key lookup without secondary indexes: =) high performance and perfect scalability 9
  • 11. Graph databases Graph database A graph database stores a labelled graph. Vertices and edges can be documents. Graphs are good to model relations. graphs often describe data very naturally (e.g. the facebook friendship graph) graphs can be stored using tables, however, graph queries notoriously lead to expensive joins there are interesting and useful graph algorithms like “shortest path” or “neighbourhood” need a good query language to reap the bene1ts horizontal scalability is troublesome graph databases vary widely in scope and usage, no standard 10
  • 12. Massively parallel: map-reduce and friends The area of massively parallel A massively parallel database can use thousands of servers distributed all over the world and still appears as a single service. Humongous data capacity and very high read/write performance examples are Apache Cassandra, Apache Hadoop, Google’s Spanner, Riak and others these systems have important use cases, in particular in the analytic domain query capabilities are somewhat limited like for example only “map/reduce” ) good horizontal scalability at the cost of reduced query 2exibility 11
  • 13. A typical Use Case — an Online Shop We need to hold customer data: usually homogeneous, but still variations =) use a document store: product data: even for a specialised business quite inhomogeneous =) use a document store: shopping carts: need very fast lookup by session key =) use a key/value store: order and sales data: relate customers and products =) use a document store: recommendation engine data: links between different entities =) use a graph database: 12
  • 14. Polyglot Persistence is nice, but . . . Consequence: One needs multiple database systems in the persis-tence layer of a single project! Polyglot persistence introduces some friction through data synchronisation, data conversion, increased installation and administration effort, more training needs. Wouldn’t it be nice, . . . . . . to enjoy the bene1ts without paying with the disadvantages? 13
  • 15. The Multi-Model Approach Multi-model database A multi-model database combines a document store with a graph database and is at the same time a key/value store. Vertices are documents in a vertex collection, edges are documents in an edge collection. a single, common query language for all three data models is able to compete with specialised products on their turf allows for polyglot persistence using a single database queries can mix the different data models can replace a RDMBS in many cases 14
  • 16. Why is this possible at all? Document stores and key/value stores Document stores: have primary key, are key/value stores. Without using secondary indexes, performance is nearly as good as with opaque data instead of JSON. Good horizontal scalability can be achieved for key lookups. Document stores and graph databases graph database: would like to associate arbitrary data with vertices and edges, so JSON documents are a good choice. A good edge index, giving fast access to neighbours. This can be a secondary index. Graph support in the query language. Implementations of graph algorithms in the database engine. 15
  • 17. A Map of the NoSQL Landscape Transaction Processing DBs Map/reduce Column Stores Analytic processing DBs Extensibility Complex queries Documents Massively distributed Graphs Structured Data Key/Value 16
  • 18. 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), memory eZcient by shape detection, uses JavaScript throughout (Google’s V8 built into server), API extensible by JavaScript code in the Foxx framework, offers many drivers for a wide range of languages, is easy to use with web front end and good documentation, enjoys good professional as well as community support and has sharding since Version 2.0. 17
  • 19. A Map of the NoSQL Landscape Transaction Processing DBs Map/reduce Column Stores Analytic processing DBs Extensibility Complex queries Documents Massively distributed Graphs Structured Data Key/Value 18
  • 20. The ArangoDB Territory Transaction Processing DBs Map/reduce Column Stores Analytic processing DBs Extensibility Complex queries Documents Massively distributed Graphs Structured Data Key/Value 19
  • 21. Strong Consistency ArangoDB offers atomic and isolated CRUD operations for single documents, transactions spanning multiple documents and multiple collections, snapshot semantics for complex queries, very secure durable storage using append only and storing multiple revisions, all this for documents as well as for graphs. In the (not too distant) future, ArangoDB will offer the same ACID semantics even with sharding, implement complete MVCC semantics to allow for lock-free concurrent transactions. 20
  • 22. Replication and Sharding — horizontal scalability Right now, ArangoDB provides easy setup of (asynchronous) replication, which allows read access parallelisation (master/slaves setup), sharding with automatic data distribution to multiple servers. Very soon, ArangoDB will feature fault tolerance by automatic failover and synchronous replication in cluster mode, zero administration by a self-reparing and self-balancing cluster architecture. 21
  • 23. Powerful query language: AQL The built in Arango Query Language AQL allows complex, powerful and convenient queries, with transaction semantics, allowing to do joins, with user de1nable functions (in JavaScript). AQL is independent of the driver used and offers protection against injections by design. For Version 2.3, we are reengineering the AQL query engine: use a C++ implementation for high performance, optimise distributed queries in the cluster. 22
  • 24. Extensible through JavaScript and Foxx The HTTP API of ArangoDB can be extended by user-de1ned JavaScript code, that is executed in the DB server for high performance. This is formalised by the Foxx framework, which allows to implement complex, user-de1ned APIs with direct access to the DB engine. Very 2exible and secure authentication schemes can be implemented conveniently by the user in JavaScript. Because JavaScript runs everywhere (in the DB server as well as in the browser), one can use the same libraries in the back-end and in the front-end. =) implement your own micro services 23