#nosql introduction
-
Upload
jethrobakker -
Category
Technology
-
view
767 -
download
1
Transcript of #nosql introduction
Not using relational model
Running well on cluster
Open-source
Built for the 21st century web estates
Schemaless
"Aggregate is a cluster of associated objects that we treat as a unit for the purpose of data changes."
Eric Evans Domain driven design (2003)
{ "relatie": "A", "startDatum": "2013-06-20 10:00", "eindDatum": "2013-06-21 10:00", "type": { "omschrijving": "voorinspectie", "is_adhoc": false }, "opdracht": { "omschrijving": "Voorinspectie woning 20-06-2013" }, "objecten": [ { "omschrijving": "woonhuis", "bouwjaar": 2000, "objecten": [ { "omschrijving": "beneden verdieping" }, { "omschrijving": "1e verdieping" }, { "omschrijving": "2e verdieping" } ] } ]}
Aggregate oriented databases:● Key-value store● Document store● Column family store
Aggregate ignorant databases:● Graph databases
Type : AantalMap
Voorinspectie : 1Voorinspectie : 1Eindinspectie : 1Eindinspectie : 1
=
"Calculate the amount of inspections per type"
Voorinspectie : 1Voorinspectie : 1Eindinspectie : 1Eindinspectie : 1
Voorinspectie : 2Eindinspectie : 2
Reduce
Riak
● Key-value store● Production support by Basho● Text, images, JSON, XML
Use cases:● Session data● User preferences● Shopping cart data
MongoDB
● Document store● Production support by 10Gen● XML, JSON, BSON● Hierarchical tree data structure
Use cases:● Event logging● Blog platforms● Realtime analytics● E-commerce applications
Cassandra
● Column family store● Production support by DataStax
Use cases:● Event logging● Blogging platforms● Counters● Expiry usage
NoSQL versus SQL
Pro:● Horizontal scalability● Stores any data● High write or read throughput
Cons:● Only stores data, no reporting or aggregation● Eventually consistent
Related work
● Search engines, like ElasticSearch and Solr● Blob / Object stores, like Ceph, OpenStack
Swift● Analytics, like Hadoop, Storm
Use cases @Flusso
● Common solution to store large amounts of documents and images. Known issue in several projects.
● Manage state between mobile apps and backend in aggregate store.
Summary
● Value of relational databases● Two pitfalls:
○ Scalability○ Mismatch OO and relation model
● NoSQL databases○ Different modeling○ Distribution models○ CAP instead of ACID○ 4 Types: Key-Value, Document, Column-Family,
Graph● Demo's