Upload
jonathan-weiss
View
1.913
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Introduction to NoSQL, Redis and CouchDB presented by Jonathan Weiss at BarCampRuhr4
Citation preview
Jonathan WeissPeritor GmbH
N✮SQLData-Storage jenseits von SQL
Wer?
Ruby-Entwickler
Open-Source-Contributor (http://github.com/jweiss)
@jweiss
2
N✮SQL-Datenbanken?
3
Built for the Web
Skalierbar
Performant
Flexibles Datenschema
4
DynamoCouchDBDynomite
Tokyo Tyrant
MongoDB
Riak
Amazon SimpleDB
Redis Memcached
BigTableAmazon S3
Cassandra
Lotus Notes
Excel ;)Neo4j
Project Voldemort HBase
Der Status-Quo
Relationale Datenstrukturen
SQL
Transaktionssicherheit
Locking
5
Das Problem
6
Das Problem
7
Die Lösung
8
”Simplicity is prerequisite for reliability“— Edsger W. Dijkstra
Die Lösung
key => “value”
9
Dokumente
10
Integrität
11
Eventual Consistency
12
Append-Only
13
Append-Only
14
Update
Append-Only
15
Update
Skalierbarkeit
16
Tools
17
Tools
18
DynamoCouchDBDynomite
Tokyo Tyrant
MongoDB
Riak
Amazon SimpleDB
Redis Memcached
BigTableAmazon S3
Cassandra
Lotus Notes
Excel ;)Neo4j
Project Voldemort HBase
Tools
19
DynamoCouchDBDynomite
Tokyo Tyrant
MongoDB
Riak
Amazon SimpleDB
Redis Memcached
BigTableAmazon S3
Cassandra
Lotus Notes
Excel ;)Neo4j
Project Voldemort HBase
Redis
Simpler Key-Value-Store
Speichert Strings, Listen und Sets
Persistenz über Snapshots oder Append-Logs
20
Redis
21
Redis
set foo 4
1000
+OK
22
Request
Response
Scaling
Master-Slave mittels Snapshots
Multiple Master mittels Hash Ring
23
Einsatz-Szenarien
Persistenter Cache
Session-Store
Realtime-Data: Monitoring, Trading, ...
Simple Message Queue
Shared State
24
25
CouchDBrelax
CouchDB
Dokument-orientiert
26
27
”CouchDB is built of the Web“— Jacob Kaplan-Moss
CouchDB Document
28
{ "_id": "BCCD12CBB", "_rev": "1-‐AB764C", "type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true}
CouchDB Document
29
{ "_id": "BCCD12CBB", "_rev": "1-‐AB764C", "type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true}
CouchDB Document
30
{ "_id": "BCCD12CBB", "_rev": "1-‐AB764C", "type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true}
CouchDB - CRUD
Erstellen/Aktualisieren:
PUT /starwars/BCCD12CBB
Lesen:
GET /starwars/BCCD12CBB
Löschen:
DELETE /starwars/BCCD12CBB
31
CouchDB
Wie komme ich an meine Daten?
32
CouchDB
33
Views!
CouchDB
34
function(doc) { if (doc.headware) { for (var hat in doc.headware) { emit(hat, 1); } }}
CouchDB
35
function(keys, values, rereduce) { return sum(values);}
Libraries
SimplyStored: Ruby wrapper
http://github.com/peritor/simply_stored
36
ModelsAssociationsCallbacksValidationsDynamic finderS3 attachmentsParanoid delete
Libraries
37
B-Tree
38
Crash-Proof
39
Offline by default
40
Replication
41
CouchDB
POST /_replication
42
Und?
Daten sind wieder König
43
Aber!
Kein goldener Hammer
44
45
46
Peritor
47
Cloud-Management und -Deployment made easy
http://scalarium.com
© Peritor GmbH - Alle Rechte Vorbehalten
Peritor GmbHBlücherstr. 22, Hof III Aufgang 610961 Berlin
Tel.: +49 (0)30 69 20 09 84 0Fax: +49 (0)30 69 20 09 84 9
Internet: www.peritor.comE-Mail: [email protected]