SlideShare a Scribd company logo
1 of 21
Download to read offline
www.arangodb.com
Polyglot Persistence
&
Multi-Model Databases
Ingo Friepoertner
The Single Model era is over
2
Relational World
NoSQL DBs & Characteristics
‣ non-relational
‣ open-source
‣ cluster friendly
‣ high traffic
‣ schema-less
3
‣ key/value store
‣ document store
‣ column store
‣ graph databases
The Multi Model era begins
4
NoSQL World
Documents - JSON
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
K => V
Graphs
Key Value
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
‣ Map value data to unique string keys (identifiers)
‣ Treat data as opaque (data has no schema)
‣ Can implement scaling and partitioning easily
‣ Focussed on m-to-n relations between entities
‣ Stores property graphs: entities and edges can have
attributes
‣ Easily query paths of variable length
‣ 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 more opaque)
‣ Often allow querying and indexing document attributes
An e-commerce system in Relational World
5
Sales-History
Shopping-Cart
Recommendations Customer
Product-Catalog
Polyglot Persistence
6
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf
Reporting
RDBMS
Product Catalog
MongoDB
Shopping Cart
Riak
User activity log
Cassandra
Analytics
Cassandra
Recommendations
Neo4J
Financial Data
RDBMS
User Sessions
Redis
Shopping Cart
KeyValue
Reporting
RDBMS
Product Catalog
Document
User activity log
Column
Analytics
Column
Recommendations
Graph
Financial Data
RDBMS
User Sessions
KeyValue
Single Model Databases
7
Recommendations
Product-CatalogShopping-Cart
Sales-History Customer
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“Name": "Smith",
“lastLogin”: “2012-11-01",
“Visits": 121,
“shipping address”: “abc”,
“shipping address”: “def”
}
{
“Name": "Meyer",
“lastLogin”: “2012-11-21",
“Visits": 20,
“shipping address”: “xyz”,
}
423453453
4328, “shirt”, “L”, 1, 12.99
6378, “sweater”, “M”, 2, 37.95
3245, “sweater”, “blue”, 1, 99.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
874365563
5463, “shirt”, “S”, 1, 9.99
6378, “sweater”, “M”, 2, 37.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
DocumentStore GraphStore DocumentStore
DocumentStoreKeyValueStore
Benefits & Overhead (Polyglot Persistence)
‣ Natural mapping of data into
DB
‣ DB optimized for the data
format
‣ Queries are tailored for your
data format
‣ Focus on writing business
logic
8
‣Data has to be stored
redundantly and has to be
kept in sync
‣Several technologies
involved
‣Administration effort is
huge
“The Real World of the Database Administrator”
Study by DELL (March 2015)
‣ The key challenge for DBAs is learning new technologies.
9
Top Challenges for DBAs
10
Solution: Multi Model Database
‣ Can natively store several kinds of data models:
‣ Key-value pairs
‣ Documents
‣ Graphs
‣ Delivers query mechanisms for all data models
11
Polyglot Persistence Revisited
12
Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf
Shopping Cart
KeyValue
Reporting
RDBMS
Product Catalog
Document
User activity log
Column
Analytics
Column
Recommendations
Graph
Financial Data
RDBMS
User Sessions
KeyValue
Reporting
RDBMS
Product Catalog
ArangoDB
Shopping Cart
ArangoDB
User activity log
Cassandra
Analytics
Cassandra
Recommendations
ArangoDB
Financial Data
ArangoDB
User Sessions
ArangoDB
Use Case: Multi-Model-Databases
13
Recommendations
Product-CatalogShopping-Cart
Sales-History Customer
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“userID": 239178239,
“productID”: 128623883,
“number": 5,
“price”: 12.20,
}
{
“Name": "Smith",
“lastLogin”: “2012-11-01",
“Visits": 121,
“shipping address”: “abc”,
“shipping address”: “def”
}
{
“Name": "Meyer",
“lastLogin”: “2012-11-21",
“Visits": 20,
“shipping address”: “xyz”,
}
423453453
4328, “shirt”, “L”, 1, 12.99
6378, “sweater”, “M”, 2, 37.95
3245, “sweater”, “blue”, 1, 99.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
874365563
5463, “shirt”, “S”, 1, 9.99
6378, “sweater”, “M”, 2, 37.95
3245, “pants”, “32/34”, “black”, 1, 99.95
=>
{
“type“: "pants",
“waist": 32,
“length”: 34,
“color": "blue",
“material”: “cotton"
}
{
“type“: "television",
“diagonal screen size": 46,
“hdmi inputs": 3,
“wall mountable": true,
“built-in digital tuner": true,
“dynamic contrast ratio”: “50,000:1”,
Resolution”: “1920x1080”
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
{
“type": "sweater",
“color": "blue",
“size": “M”,
“material”: “wool”,
“form”: “turtleneck"
}
DocumentStore GraphStore DocumentStore
DocumentStoreKeyValueStore
My four favourite features of
‣ MULTI-MODEL stores graphs and documents
‣ AQL offering joins & traversals
‣ ACID including Multi Collection Transactions
14
‣ FOXX extend the API and adapt it to your needs
AQL
15
FOR p IN product
FILTER p.color == "yellow"
FOR d IN GRAPH_DISTANCE_TO("suggestions", p._id,
"customer/alice", {direction: "inbound"})
FILTER d.distance > 1
RETURN p
LIMIT 10
RETURN r
SORT d.distance
Lena
(Customer)
knows
bought
likes
on: 03/2015
Shirt
(Product)
Alice
(Customer)
color: yellow
VERTEX
EDGE
VERTEX
Foxx Example
16
FILTER p.color == @color
FOR d IN GRAPH_DISTANCE_TO("suggestion", p._id,
"customer/alice", {direction: "inbound"})
LET r = {distance: d.distance, product: p}
FILTER r.distance > 1
SORT r.distance
LIMIT 10
RETURN r',
controller.get("/recommend/:color", function(req, res) {
res.json(db._query('FOR p IN products
});
{color: req.params("color")}).toArray());
‣ Native mapping of data into
DB
‣ DB optimized
‣ Queries are tailored for
your data format
‣ Focus on writing business
logic
17
‣Data has to be stored
redundantly and has to be
kept in sync
‣Several technologies involved
‣Administration effort is huge
‣One technology involved
Benefits & Overhead (Multi-Model)
‣ open source and free (Apache 2 license)
‣ sharding & replication
‣ JavaScript throughout (V8 built into server)
‣ drivers for a wide range of languages
‣ web frontend
‣ good & complete documentation
‣ professional as well as community support
18
An overview of other features
DCOS integration
19
‣Run distributed databases and
other distributed applications
sharing a single DCOS, like
Mesosphere or Docker Swarm.
‣A DCOS offers services that
simplify the design and
implementation of a distributed
database.
‣ArangoDB's distributed design
lends itself particularly well for
Apache Mesos integration.
‣At the same time we can benefit
from the Mesos infrastructure for
our own failover and convenient
cluster administration.
Join our growing community
20
.. working on the geo index, the full text search and
many APIs: Ruby, Python, PHP, Java, D, Javascript, ...
Thank you
‣ Further questions?
‣ Write me a mail: ingo@arangodb.com
‣ Join our google group: https://groups.google.com/forum/#!forum/arangodb
21

More Related Content

Similar to OSDC 2015: Ingo Friepoertner | Polyglot Persistence & Multi-Model NoSQL Databases

Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, ClouderaParallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, ClouderaLucidworks
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation FrameworkMongoDB
 
Elixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsElixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsJeroen Visser
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSONKeshav Murthy
 
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...HostedbyConfluent
 
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Keshav Murthy
 
Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Matthew Groves
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009Jason Davies
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API daysyann_s
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
 
Utilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and IndexingUtilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and IndexingKeshav Murthy
 
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it too
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it tooQuerying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it too
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it tooAll Things Open
 
SDKs, the good the bad the ugly - Japan
SDKs, the good the bad the ugly - JapanSDKs, the good the bad the ugly - Japan
SDKs, the good the bad the ugly - Japantristansokol
 
Accepting payments using Stripe and Elixir
Accepting payments using Stripe and ElixirAccepting payments using Stripe and Elixir
Accepting payments using Stripe and ElixirAndrew Forward
 
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5Keshav Murthy
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalogMongoDB
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaGuido Schmutz
 

Similar to OSDC 2015: Ingo Friepoertner | Polyglot Persistence & Multi-Model NoSQL Databases (20)

Multi model-databases
Multi model-databasesMulti model-databases
Multi model-databases
 
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, ClouderaParallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
 
MongoDB Meetup
MongoDB MeetupMongoDB Meetup
MongoDB Meetup
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
 
Elixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.jsElixir, GraphQL and Vue.js
Elixir, GraphQL and Vue.js
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSON
 
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
 
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
 
Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009
 
CouchDB Day NYC 2017: Full Text Search
CouchDB Day NYC 2017: Full Text SearchCouchDB Day NYC 2017: Full Text Search
CouchDB Day NYC 2017: Full Text Search
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API days
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
Utilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and IndexingUtilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and Indexing
 
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it too
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it tooQuerying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it too
Querying NoSQL with SQL: HAVING Your JSON Cake and SELECTing it too
 
SDKs, the good the bad the ugly - Japan
SDKs, the good the bad the ugly - JapanSDKs, the good the bad the ugly - Japan
SDKs, the good the bad the ugly - Japan
 
Accepting payments using Stripe and Elixir
Accepting payments using Stripe and ElixirAccepting payments using Stripe and Elixir
Accepting payments using Stripe and Elixir
 
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalog
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

OSDC 2015: Ingo Friepoertner | Polyglot Persistence & Multi-Model NoSQL Databases

  • 2. The Single Model era is over 2 Relational World
  • 3. NoSQL DBs & Characteristics ‣ non-relational ‣ open-source ‣ cluster friendly ‣ high traffic ‣ schema-less 3 ‣ key/value store ‣ document store ‣ column store ‣ graph databases
  • 4. The Multi Model era begins 4 NoSQL World Documents - JSON K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V K => V Graphs Key Value { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } ‣ Map value data to unique string keys (identifiers) ‣ Treat data as opaque (data has no schema) ‣ Can implement scaling and partitioning easily ‣ Focussed on m-to-n relations between entities ‣ Stores property graphs: entities and edges can have attributes ‣ Easily query paths of variable length ‣ 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 more opaque) ‣ Often allow querying and indexing document attributes
  • 5. An e-commerce system in Relational World 5 Sales-History Shopping-Cart Recommendations Customer Product-Catalog
  • 6. Polyglot Persistence 6 Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Reporting RDBMS Product Catalog MongoDB Shopping Cart Riak User activity log Cassandra Analytics Cassandra Recommendations Neo4J Financial Data RDBMS User Sessions Redis Shopping Cart KeyValue Reporting RDBMS Product Catalog Document User activity log Column Analytics Column Recommendations Graph Financial Data RDBMS User Sessions KeyValue
  • 7. Single Model Databases 7 Recommendations Product-CatalogShopping-Cart Sales-History Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “Name": "Smith", “lastLogin”: “2012-11-01", “Visits": 121, “shipping address”: “abc”, “shipping address”: “def” } { “Name": "Meyer", “lastLogin”: “2012-11-21", “Visits": 20, “shipping address”: “xyz”, } 423453453 4328, “shirt”, “L”, 1, 12.99 6378, “sweater”, “M”, 2, 37.95 3245, “sweater”, “blue”, 1, 99.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => 874365563 5463, “shirt”, “S”, 1, 9.99 6378, “sweater”, “M”, 2, 37.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } DocumentStore GraphStore DocumentStore DocumentStoreKeyValueStore
  • 8. Benefits & Overhead (Polyglot Persistence) ‣ Natural mapping of data into DB ‣ DB optimized for the data format ‣ Queries are tailored for your data format ‣ Focus on writing business logic 8 ‣Data has to be stored redundantly and has to be kept in sync ‣Several technologies involved ‣Administration effort is huge
  • 9. “The Real World of the Database Administrator” Study by DELL (March 2015) ‣ The key challenge for DBAs is learning new technologies. 9
  • 11. Solution: Multi Model Database ‣ Can natively store several kinds of data models: ‣ Key-value pairs ‣ Documents ‣ Graphs ‣ Delivers query mechanisms for all data models 11
  • 12. Polyglot Persistence Revisited 12 Source: Martin Fowler, http://martinfowler.com/articles/nosql-intro.pdf Shopping Cart KeyValue Reporting RDBMS Product Catalog Document User activity log Column Analytics Column Recommendations Graph Financial Data RDBMS User Sessions KeyValue Reporting RDBMS Product Catalog ArangoDB Shopping Cart ArangoDB User activity log Cassandra Analytics Cassandra Recommendations ArangoDB Financial Data ArangoDB User Sessions ArangoDB
  • 13. Use Case: Multi-Model-Databases 13 Recommendations Product-CatalogShopping-Cart Sales-History Customer { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “userID": 239178239, “productID”: 128623883, “number": 5, “price”: 12.20, } { “Name": "Smith", “lastLogin”: “2012-11-01", “Visits": 121, “shipping address”: “abc”, “shipping address”: “def” } { “Name": "Meyer", “lastLogin”: “2012-11-21", “Visits": 20, “shipping address”: “xyz”, } 423453453 4328, “shirt”, “L”, 1, 12.99 6378, “sweater”, “M”, 2, 37.95 3245, “sweater”, “blue”, 1, 99.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => 874365563 5463, “shirt”, “S”, 1, 9.99 6378, “sweater”, “M”, 2, 37.95 3245, “pants”, “32/34”, “black”, 1, 99.95 => { “type“: "pants", “waist": 32, “length”: 34, “color": "blue", “material”: “cotton" } { “type“: "television", “diagonal screen size": 46, “hdmi inputs": 3, “wall mountable": true, “built-in digital tuner": true, “dynamic contrast ratio”: “50,000:1”, Resolution”: “1920x1080” } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } { “type": "sweater", “color": "blue", “size": “M”, “material”: “wool”, “form”: “turtleneck" } DocumentStore GraphStore DocumentStore DocumentStoreKeyValueStore
  • 14. My four favourite features of ‣ MULTI-MODEL stores graphs and documents ‣ AQL offering joins & traversals ‣ ACID including Multi Collection Transactions 14 ‣ FOXX extend the API and adapt it to your needs
  • 15. AQL 15 FOR p IN product FILTER p.color == "yellow" FOR d IN GRAPH_DISTANCE_TO("suggestions", p._id, "customer/alice", {direction: "inbound"}) FILTER d.distance > 1 RETURN p LIMIT 10 RETURN r SORT d.distance Lena (Customer) knows bought likes on: 03/2015 Shirt (Product) Alice (Customer) color: yellow VERTEX EDGE VERTEX
  • 16. Foxx Example 16 FILTER p.color == @color FOR d IN GRAPH_DISTANCE_TO("suggestion", p._id, "customer/alice", {direction: "inbound"}) LET r = {distance: d.distance, product: p} FILTER r.distance > 1 SORT r.distance LIMIT 10 RETURN r', controller.get("/recommend/:color", function(req, res) { res.json(db._query('FOR p IN products }); {color: req.params("color")}).toArray());
  • 17. ‣ Native mapping of data into DB ‣ DB optimized ‣ Queries are tailored for your data format ‣ Focus on writing business logic 17 ‣Data has to be stored redundantly and has to be kept in sync ‣Several technologies involved ‣Administration effort is huge ‣One technology involved Benefits & Overhead (Multi-Model)
  • 18. ‣ open source and free (Apache 2 license) ‣ sharding & replication ‣ JavaScript throughout (V8 built into server) ‣ drivers for a wide range of languages ‣ web frontend ‣ good & complete documentation ‣ professional as well as community support 18 An overview of other features
  • 19. DCOS integration 19 ‣Run distributed databases and other distributed applications sharing a single DCOS, like Mesosphere or Docker Swarm. ‣A DCOS offers services that simplify the design and implementation of a distributed database. ‣ArangoDB's distributed design lends itself particularly well for Apache Mesos integration. ‣At the same time we can benefit from the Mesos infrastructure for our own failover and convenient cluster administration.
  • 20. Join our growing community 20 .. working on the geo index, the full text search and many APIs: Ruby, Python, PHP, Java, D, Javascript, ...
  • 21. Thank you ‣ Further questions? ‣ Write me a mail: ingo@arangodb.com ‣ Join our google group: https://groups.google.com/forum/#!forum/arangodb 21