SlideShare a Scribd company logo
Not only SQL
   Mårten Gustafson
  Qbranch CODE tech-meet @ 2010-04-15
What?
“NoSQL is a movement promoting a loosely
defined class of non-relational data stores that
break with a long history of relational
databases” - Wikipedia
What?
“NoSQL is a movement promoting a loosely
defined class of non-relational data stores
that break with a long history of relational
databases” - Wikipedia
Not a single technique

Not a single type of data

Not a single type of use case
Why?

• Non-relational
• Schema-less
• “Easily” scalable
• REST/JSON API = web friendly
What’s out there?
                 Storage type        License      Implemented in
Amazon Dynamo      Key/Value            n/a               ?
   Cassandra      Columnfamily        ASL 2.0           Java
   CouchDB         Document           ASL 2.0          Erlang
   Dynomite        Key/Value       BSD/MIT-style       Erlang
     HBase        Columnfamily        ASL 2.0           Java
   MongoDB         Document         AGPL v3.0           C++
     Neo4J           Graph       AGPL v3.0 / Comm       Java
      Riak         Key/Value          ASL 2.0          Erlang
     Redis         Key/Value       BSD/MIT-style         C
    Scalaris       Key/Value          ASL 2.0          Erlang
 Tokyo Cabinet     Key/Value           LGPL              C
   Voldemort       Key/Value          ASL 2.0           Java
Distribution


• Master / Slave
• Master / Slave(s)
• Masterless (Master / Master)
Distribution
                       Masterless   Master/Slave   Hot standby
 Amazon Dynamo             X
     Cassandra             X
     CouchDB               X
     Dynomite              X
       HBase                             ?
     MongoDB                             X             X
      Neo4J*
        Riak               X
       Redis                             X
      Scalaris             X
   Tokyo Cabinet
     Voldemort             X
* Neo4J HA coming “soon”
Distribution
                           Masterless     Master/Slave
                                                                 ie
                                                         Hot standbyw
     Amazon Dynamo             X
                                                           d v
         Cassandra             X

                                                     ifie
                                                   l
         CouchDB               X
         Dynomite              X

                                           m p
                                          i
           HBase                               ?
         MongoDB

                                 y      s      X             X
          Neo4J*

                        e      r
                       v
            Riak               X


                     a
           Redis                               X


           is
          Scalaris             X



 h i     s
       Tokyo Cabinet
         Voldemort             X

T   * Neo4J HA coming “soon”
Common factor


   “...of the web...”
     Of the who?!
Of the web
“...Django may be built for the Web, but
CouchDB is built of the Web. I’ve never seen
software that so completely embraces the
philosophies behind HTTP. CouchDB
makes Django look old-school in the same way
that Django makes ASP look outdated”
- http://jacobian.org/writing/of-the-web/
Of the web

“...CouchDB may succeeded, and it may fail; who
knows. I’m sure of one thing, though — this is
what the software of the future looks like”
- http://jacobian.org/writing/of-the-web/
So freakin’ what?!



All your webish skillz and tools apply...
So freakin’ what?!
 language-, platform- and OS-neutral

load balancers                         proxies

                    MIME / Content-Type

   All your webish skillz and tools apply...

                 HTTP client libs (etag, if-modified-since, etc)
   caches
These guys can just suck it




  HTTP/REST is integration that works
                (YMMV)
Buckle Up Dorothy. Cause' Kansas, Is Going Bye-Bye
Key/Value Store


     I got keys but no locks
Riak

Decentralized key-value store
A flexible map/reduce engine
HTTP/JSON API
A database ideally suited for Web applications
The Ring
The Ring
            12     1
     11                    2

10                             3

9                              4

     8                     5
             7     6

          ring size = 12
The Ring


One Ring size to rule them all, One Ring size to
find them, One Ring size to bring them all and in
the cluster bind them...
Consistent Hashing
 Store/Save (PUT)
Consistent Hashing
 Store/Save (PUT)
Consistent Hashing
          Read (GET)
“I want “ is
answered by:
where is on
the ring?
Consistent Hashing
          Read (GET)
“I want “ is
answered by:
where is on
the ring?
Cluster

                                            Instance A


                                            Instance B


                                            Instance C


ring size = 12
instances = 3
ring size / nodes = ~slices per instances
Cluster

                                            Instance A


                                            Instance B


                                            Instance C


ring size = 12
instances = 3
ring size / nodes = ~slices per instances
Cluster - Read (GET)
  Instance A   Instance B   Instance C
Cluster - Read (GET)
I can haz    ?



                       Instance A   Instance B   Instance C

Hm,       lives in a
slice of the ring
owned by instance
C.
Cluster - Read (GET)
I can haz   ?



                 Instance A   Instance B   Instance C

                                                        Okidoki, now
     Hey C! I need                                      where’s he...a yeah
                                                        in my fourth slice
Cluster - Read (GET)
I can haz   ?
                                                         Here ya go


                Instance A     Instance B   Instance C

                     Cheers!
Riak “stuff”
Riak “stuff”




           Bucket
  Container/keyspace.
Determines number of
replicas for its contents
Riak “stuff”



                            Consistent Hashing
                                     Key hashing technique
                                     used to distribute keys
                                           on the ring



           Bucket
  Container/keyspace.
Determines number of
replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                Riak “stuff”
              Gossiping




                             Consistent Hashing
                                      Key hashing technique
                                      used to distribute keys
                                            on the ring



            Bucket
   Container/keyspace.
 Determines number of
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                Riak “stuff”
              Gossiping




                             Consistent Hashing
                                      Key hashing technique
                                      used to distribute keys
                                            on the ring                 Hinted Handoff
                                                                 Covering for a
            Bucket                                              failed “neighbor”
                                                                node while gone
   Container/keyspace.
 Determines number of
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                Riak “stuff”                                   Allows retrieval of
                                                                             “weakly” linked objects

              Gossiping                                            Links



                             Consistent Hashing
                                      Key hashing technique
                                      used to distribute keys
                                            on the ring                 Hinted Handoff
                                                                 Covering for a
            Bucket                                              failed “neighbor”
                                                                node while gone
   Container/keyspace.
 Determines number of
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                 Riak “stuff”                                      Allows retrieval of
                                                                                 “weakly” linked objects

              Gossiping                                                Links



                             Consistent Hashing
                                          Key hashing technique
                                          used to distribute keys
                                                on the ring                 Hinted Handoff
                                     Merkle Tree                     Covering for a
            Bucket                Data structure for
                                                                    failed “neighbor”
                                                                    node while gone
   Container/keyspace.         efficient summary about
 Determines number of             objects. Gossiped.
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                 Riak “stuff”                                        Allows retrieval of
                                                                                   “weakly” linked objects

              Gossiping                                                Links


                                                                     Node
                             Consistent Hashing                        One server. Runs
                                                                      vnodes which claims
                                                                          partitions.
                                          Key hashing technique
                                          used to distribute keys
                                                on the ring                 Hinted Handoff
                                     Merkle Tree                     Covering for a
            Bucket                Data structure for
                                                                    failed “neighbor”
                                                                    node while gone
   Container/keyspace.         efficient summary about
 Determines number of             objects. Gossiped.
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                 Riak “stuff”                                          Allows retrieval of
                                                                                     “weakly” linked objects
                                           Partition
              Gossiping                                                  Links
                                  One slice (part) of the ring.




                                                                       Node
                             Consistent Hashing                          One server. Runs
                                                                        vnodes which claims
                                                                            partitions.
                                            Key hashing technique
                                            used to distribute keys
                                                  on the ring                 Hinted Handoff
                                     Merkle Tree                       Covering for a
            Bucket                Data structure for
                                                                      failed “neighbor”
                                                                      node while gone
   Container/keyspace.         efficient summary about
 Determines number of             objects. Gossiped.
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                 Riak “stuff”                                          Allows retrieval of
                                                                                     “weakly” linked objects
                                           Partition
              Gossiping                                                  Links
                                  One slice (part) of the ring.




                                                                       Node
Auto correction of
out-of-date objects
                             Consistent Hashing                          One server. Runs
                                                                        vnodes which claims
                                                                            partitions.
                 Read Repair                Key hashing technique
                                            used to distribute keys
                                                  on the ring                 Hinted Handoff
                                     Merkle Tree                       Covering for a
            Bucket                Data structure for
                                                                      failed “neighbor”
                                                                      node while gone
   Container/keyspace.         efficient summary about
 Determines number of             objects. Gossiped.
 replicas for its contents
Shares state, bucket
and ring knowledge
   in the cluster
                                 Riak “stuff”                                          Allows retrieval of
                                                                                     “weakly” linked objects
                                           Partition
              Gossiping                                                  Links
                                  One slice (part) of the ring.




                                                                       Node
Auto correction of
out-of-date objects
                             Consistent Hashing                          One server. Runs
                                                                        vnodes which claims
                                                                            partitions.
                 Read Repair                Key hashing technique
                                            used to distribute keys
                                                  on the ring                 Hinted Handoff
                                     Merkle Tree                       Covering for a
            Bucket                Data structure for
                                                                      failed “neighbor”
                                                                      node while gone         Number of copies
   Container/keyspace.         efficient summary about                                         of the same object
 Determines number of
 replicas for its contents
                                  objects. Gossiped.                    Replica                  in the cluster
Shares state, bucket
 and ring knowledge
    in the cluster
                                    Riak “stuff”                                          Allows retrieval of
                                                                                        “weakly” linked objects
                                              Partition
                Gossiping                                                   Links
   The complete “space”,             One slice (part) of the ring.
divided into partitions which
    are claimed by vnodes


     Ring                                                                 Node
 Auto correction of
 out-of-date objects
                                Consistent Hashing                          One server. Runs
                                                                           vnodes which claims
                                                                               partitions.
                   Read Repair                 Key hashing technique
                                               used to distribute keys
                                                     on the ring                 Hinted Handoff
                                        Merkle Tree                       Covering for a
              Bucket                 Data structure for
                                                                         failed “neighbor”
                                                                         node while gone         Number of copies
     Container/keyspace.          efficient summary about                                         of the same object
   Determines number of
   replicas for its contents
                                     objects. Gossiped.                    Replica                  in the cluster
Shares state, bucket
 and ring knowledge
    in the cluster
                                    Riak “stuff”                                           Allows retrieval of
                                                                                         “weakly” linked objects
                                              Partition
                Gossiping                                                     Links
   The complete “space”,             One slice (part) of the ring.
divided into partitions which

                                Vector Clock
    are claimed by vnodes
                                                                Conflic detection
                                                              technique for objects.
     Ring                                                                  Node
 Auto correction of
 out-of-date objects
                                Consistent Hashing                           One server. Runs
                                                                            vnodes which claims
                                                                                partitions.
                   Read Repair                 Key hashing technique
                                               used to distribute keys
                                                     on the ring                       Hinted Handoff
                                        Merkle Tree                       Covering for a
              Bucket                 Data structure for
                                                                         failed “neighbor”
                                                                         node while gone          Number of copies
     Container/keyspace.          efficient summary about                                          of the same object
   Determines number of
   replicas for its contents
                                     objects. Gossiped.                    Replica                   in the cluster
Shares state, bucket
 and ring knowledge
    in the cluster
                                    Riak “stuff”                                           Allows retrieval of
                                                                                         “weakly” linked objects
                                              Partition
                Gossiping                                                     Links
   The complete “space”,             One slice (part) of the ring.
                                                                                          Vnode
divided into partitions which

                                Vector Clock
    are claimed by vnodes
                                                                Conflic detection
                                                              technique for objects.
     Ring                                                                  Node                     Runs in a node
                                                                                                    and claims one
 Auto correction of
 out-of-date objects
                                Consistent Hashing                           One server. Runs
                                                                            vnodes which claims
                                                                                                    partition on the
                                                                                                           ring
                                                                                partitions.
                   Read Repair                 Key hashing technique
                                               used to distribute keys
                                                     on the ring                       Hinted Handoff
                                        Merkle Tree                       Covering for a
              Bucket                 Data structure for
                                                                         failed “neighbor”
                                                                         node while gone          Number of copies
     Container/keyspace.          efficient summary about                                          of the same object
   Determines number of
   replicas for its contents
                                     objects. Gossiped.                    Replica                   in the cluster
Riak - Takeaways

• No single point of failure
• Choose your levels for:
 • availability
 • consistency
 • partition tolerance
But wait, there’s more...

•   Binary data + Content-Type = whatever

    •   MP3’s, Images, Text, ...

•   Map/Reduce

    •   Local data, parallel
This slide intentionally left blank
Document Store


      Relax
CouchDB

Document oriented databased
Kick ass replication
HTTP/JSON API
Map/reduce view (index) definitions
World view
One document == JSON
One document == One record
Many documents == One database
Many databases == One instance
No schema
World view

Documents can
  have attachments (binary + mime type)
  be rendered differently (HTML, XML)
A document
                                                       Key, either you
                                                    choose it or CouchDB
                                                       does it for you
{
    "_id": "b098445d587b1f347e48e1a79301de02",
    "_rev": "1-80bfd8302e0f08eec2396c8107cafc19",
    "platform": {
       "browser": "mozilla",
       "version": "1.9.1.8"
    },
    "timestamp": 1270131033337
                                                       Revision
}                                                      number
Views

Filter
Collate
Aggregate
Views
{
    "_id": "b098445d587b1f347e48e1a79301de02",
    "_rev": "1-80bfd8302e0f08eec2396c8107cafc19",
    "platform": {
       "browser": "mozilla",
       "version": "1.9.1.8"
    },
    "timestamp": 1270131033337
}

+
function(doc)
{
  emit(doc.platform.browser, doc.platform.version);
}

=
{
    "total_rows": 1,
    "offset": 0,
    "rows": [
      "id": "b098445d587b1f347e48e1a79301de02",
      "key": "mozilla",
      "value": "1.9.1.8"
    ]
Views
Views are stored
     as an accessible web resource
     on disk
     and incrementally updated
     as well as replicated with the database
Replication
Peer to peer
Online/Offline
Conflict detection and resolution
Any number of nodes
     Local
     Remote
Replication
Replication
Replication
Replication
Replication
CouchDB “stuff”
CouchDB “stuff”


                          Append only
        Hence, won’t corrupt
            its data files
CouchDB “stuff”
       MVCC

Multi version concurrency control.
 Writers do not block readers.
 Readers do not block writers.                         Append only
                                     Hence, won’t corrupt
                                         its data files
CouchDB “stuff”
                             BDCRR
       MVCC                              Bi-directional, conflict
                                         resolving, replication
Multi version concurrency control.
 Writers do not block readers.
 Readers do not block writers.                          Append only
                                     Hence, won’t corrupt
                                         its data files
CouchDB “stuff”
                                      BDCRR
                MVCC                              Bi-directional, conflict
                                                  resolving, replication
         Multi version concurrency control.
          Writers do not block readers.
          Readers do not block writers.                          Append only

             Compaction                       Hence, won’t corrupt
                                                  its data files

Append only will cause data files to
grow. Compaction to the rescue, in
the background - for your pleasure.
CouchDB “stuff”
                                      BDCRR
                MVCC                                   Bi-directional, conflict
                                                       resolving, replication
         Multi version concurrency control.
          Writers do not block readers.
          Readers do not block writers.                               Append only

             Compaction                           Hence, won’t corrupt
                                                      its data files

Append only will cause data files to
grow. Compaction to the rescue, in                                     ACID
the background - for your pleasure.            Awesome, Cool,
                                              Impressive, Dope
CouchDB - Takeaways

• Kick ass replication
• Views are fast
• Can host and serve complete webapps
Outro

• Test one or more NoSQL thingys
• Get familiar with Brewers CAP theorem
• Get familiar with the Dynamo paper
Over and out.

Mårten Gustafson
@martengustafson

http://marten.gustafson.pp.se/

marten.gustafson@gmail.com

More Related Content

What's hot

Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
librados
libradoslibrados
librados
Patrick McGarry
 
Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/O
George Cao
 
Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)
Chris Richardson
 
Apache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In ActionApache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In Actionday
 
Storing VMs with Cinder and Ceph RBD.pdf
Storing VMs with Cinder and Ceph RBD.pdfStoring VMs with Cinder and Ceph RBD.pdf
Storing VMs with Cinder and Ceph RBD.pdf
OpenStack Foundation
 
What you need to know about ceph
What you need to know about cephWhat you need to know about ceph
What you need to know about ceph
Emma Haruka Iwao
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
Patrick McGarry
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with Ripple
Sean Cribbs
 
Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Chris Richardson
 
Openstack with ceph
Openstack with cephOpenstack with ceph
Openstack with cephIan Colle
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Chris Richardson
 
The container revolution, and what it means to operators.pptx
The container revolution, and what it means to operators.pptxThe container revolution, and what it means to operators.pptx
The container revolution, and what it means to operators.pptx
Robert Starmer
 
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho and Riak at GOTO Stockholm:  "Don't Use My Database."Basho and Riak at GOTO Stockholm:  "Don't Use My Database."
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho Technologies
 
DConf2015 - Using D for Development of Large Scale Primary Storage
DConf2015 - Using D for Development  of Large Scale Primary StorageDConf2015 - Using D for Development  of Large Scale Primary Storage
DConf2015 - Using D for Development of Large Scale Primary Storage
Liran Zvibel
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
Karan Singh
 
XenSummit - 08/28/2012
XenSummit - 08/28/2012XenSummit - 08/28/2012
XenSummit - 08/28/2012
Ceph Community
 
Developing polyglot persistence applications #javaone 2012
Developing polyglot persistence applications  #javaone 2012Developing polyglot persistence applications  #javaone 2012
Developing polyglot persistence applications #javaone 2012
Chris Richardson
 
New Ceph capabilities and Reference Architectures
New Ceph capabilities and Reference ArchitecturesNew Ceph capabilities and Reference Architectures
New Ceph capabilities and Reference Architectures
Kamesh Pemmaraju
 
Introduction to Tokyo Products
Introduction to Tokyo ProductsIntroduction to Tokyo Products
Introduction to Tokyo Products
Mikio Hirabayashi
 

What's hot (20)

Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
librados
libradoslibrados
librados
 
Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/O
 
Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)
 
Apache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In ActionApache Con Us2007 Jcr In Action
Apache Con Us2007 Jcr In Action
 
Storing VMs with Cinder and Ceph RBD.pdf
Storing VMs with Cinder and Ceph RBD.pdfStoring VMs with Cinder and Ceph RBD.pdf
Storing VMs with Cinder and Ceph RBD.pdf
 
What you need to know about ceph
What you need to know about cephWhat you need to know about ceph
What you need to know about ceph
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with Ripple
 
Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)
 
Openstack with ceph
Openstack with cephOpenstack with ceph
Openstack with ceph
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)
 
The container revolution, and what it means to operators.pptx
The container revolution, and what it means to operators.pptxThe container revolution, and what it means to operators.pptx
The container revolution, and what it means to operators.pptx
 
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho and Riak at GOTO Stockholm:  "Don't Use My Database."Basho and Riak at GOTO Stockholm:  "Don't Use My Database."
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
 
DConf2015 - Using D for Development of Large Scale Primary Storage
DConf2015 - Using D for Development  of Large Scale Primary StorageDConf2015 - Using D for Development  of Large Scale Primary Storage
DConf2015 - Using D for Development of Large Scale Primary Storage
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
 
XenSummit - 08/28/2012
XenSummit - 08/28/2012XenSummit - 08/28/2012
XenSummit - 08/28/2012
 
Developing polyglot persistence applications #javaone 2012
Developing polyglot persistence applications  #javaone 2012Developing polyglot persistence applications  #javaone 2012
Developing polyglot persistence applications #javaone 2012
 
New Ceph capabilities and Reference Architectures
New Ceph capabilities and Reference ArchitecturesNew Ceph capabilities and Reference Architectures
New Ceph capabilities and Reference Architectures
 
Introduction to Tokyo Products
Introduction to Tokyo ProductsIntroduction to Tokyo Products
Introduction to Tokyo Products
 

Similar to NoSQL @ Qbranch -2010-04-15

Cassandra for Sysadmins
Cassandra for SysadminsCassandra for Sysadmins
Cassandra for Sysadmins
Nathan Milford
 
No Sql
No SqlNo Sql
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQL
sunnygleason
 
Sparse Content Map Storage System
Sparse Content Map Storage SystemSparse Content Map Storage System
Sparse Content Map Storage System
ianeboston
 
NoSQL
NoSQLNoSQL
DreamObjects - Ceph Day Nov 2012
DreamObjects - Ceph Day Nov 2012DreamObjects - Ceph Day Nov 2012
DreamObjects - Ceph Day Nov 2012
Ceph Community
 
Cassandra
CassandraCassandra
Cassandra
kspichale
 
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non RelazionaliNoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
Steve Maraspin
 
Cassandra勉強会
Cassandra勉強会Cassandra勉強会
Cassandra勉強会
Shun Nakamura
 
On Rails with Apache Cassandra
On Rails with Apache CassandraOn Rails with Apache Cassandra
On Rails with Apache Cassandra
Stu Hood
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_data
Roger Xia
 
Acunu & OCaml: Experience Report, CUFP
Acunu & OCaml: Experience Report, CUFPAcunu & OCaml: Experience Report, CUFP
Acunu & OCaml: Experience Report, CUFPAcunu
 
The DynaSlave Plugin
The DynaSlave PluginThe DynaSlave Plugin
The DynaSlave Plugin
Brian Moyles
 
Sparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
Ian Pointer
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
Marakana Inc.
 
Polyglot persistence for Java developers - moving out of the relational comfo...
Polyglot persistence for Java developers - moving out of the relational comfo...Polyglot persistence for Java developers - moving out of the relational comfo...
Polyglot persistence for Java developers - moving out of the relational comfo...
Chris Richardson
 
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
buildacloud
 
Ceph LISA'12 Presentation
Ceph LISA'12 PresentationCeph LISA'12 Presentation
Ceph LISA'12 Presentation
Ceph Community
 

Similar to NoSQL @ Qbranch -2010-04-15 (20)

Cassandra for Sysadmins
Cassandra for SysadminsCassandra for Sysadmins
Cassandra for Sysadmins
 
No Sql
No SqlNo Sql
No Sql
 
Cassandra
CassandraCassandra
Cassandra
 
Accelerating NoSQL
Accelerating NoSQLAccelerating NoSQL
Accelerating NoSQL
 
Sparse Content Map Storage System
Sparse Content Map Storage SystemSparse Content Map Storage System
Sparse Content Map Storage System
 
NoSQL
NoSQLNoSQL
NoSQL
 
DreamObjects - Ceph Day Nov 2012
DreamObjects - Ceph Day Nov 2012DreamObjects - Ceph Day Nov 2012
DreamObjects - Ceph Day Nov 2012
 
Cassandra
CassandraCassandra
Cassandra
 
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non RelazionaliNoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
NoSQL Data Stores: Introduzione alle Basi di Dati Non Relazionali
 
Cassandra勉強会
Cassandra勉強会Cassandra勉強会
Cassandra勉強会
 
On Rails with Apache Cassandra
On Rails with Apache CassandraOn Rails with Apache Cassandra
On Rails with Apache Cassandra
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_data
 
Hbase jdd
Hbase jddHbase jdd
Hbase jdd
 
Acunu & OCaml: Experience Report, CUFP
Acunu & OCaml: Experience Report, CUFPAcunu & OCaml: Experience Report, CUFP
Acunu & OCaml: Experience Report, CUFP
 
The DynaSlave Plugin
The DynaSlave PluginThe DynaSlave Plugin
The DynaSlave Plugin
 
Sparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Polyglot persistence for Java developers - moving out of the relational comfo...
Polyglot persistence for Java developers - moving out of the relational comfo...Polyglot persistence for Java developers - moving out of the relational comfo...
Polyglot persistence for Java developers - moving out of the relational comfo...
 
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
 
Ceph LISA'12 Presentation
Ceph LISA'12 PresentationCeph LISA'12 Presentation
Ceph LISA'12 Presentation
 

More from Mårten Gustafson

2011 05-12 nosql-fritidsresor
2011 05-12 nosql-fritidsresor2011 05-12 nosql-fritidsresor
2011 05-12 nosql-fritidsresor
Mårten Gustafson
 
2011-06-01-stockholm-devops-blitz
2011-06-01-stockholm-devops-blitz2011-06-01-stockholm-devops-blitz
2011-06-01-stockholm-devops-blitz
Mårten Gustafson
 
2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english
Mårten Gustafson
 
2010-11-12 Databases overview
2010-11-12 Databases overview2010-11-12 Databases overview
2010-11-12 Databases overview
Mårten Gustafson
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime Environments
Mårten Gustafson
 
WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09
Mårten Gustafson
 

More from Mårten Gustafson (6)

2011 05-12 nosql-fritidsresor
2011 05-12 nosql-fritidsresor2011 05-12 nosql-fritidsresor
2011 05-12 nosql-fritidsresor
 
2011-06-01-stockholm-devops-blitz
2011-06-01-stockholm-devops-blitz2011-06-01-stockholm-devops-blitz
2011-06-01-stockholm-devops-blitz
 
2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english
 
2010-11-12 Databases overview
2010-11-12 Databases overview2010-11-12 Databases overview
2010-11-12 Databases overview
 
WebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime EnvironmentsWebSphere Message Broker In Shared Runtime Environments
WebSphere Message Broker In Shared Runtime Environments
 
WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09
 

Recently uploaded

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 

Recently uploaded (20)

Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 

NoSQL @ Qbranch -2010-04-15

  • 1. Not only SQL Mårten Gustafson Qbranch CODE tech-meet @ 2010-04-15
  • 2. What? “NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases” - Wikipedia
  • 3. What? “NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases” - Wikipedia Not a single technique Not a single type of data Not a single type of use case
  • 4. Why? • Non-relational • Schema-less • “Easily” scalable • REST/JSON API = web friendly
  • 5. What’s out there? Storage type License Implemented in Amazon Dynamo Key/Value n/a ? Cassandra Columnfamily ASL 2.0 Java CouchDB Document ASL 2.0 Erlang Dynomite Key/Value BSD/MIT-style Erlang HBase Columnfamily ASL 2.0 Java MongoDB Document AGPL v3.0 C++ Neo4J Graph AGPL v3.0 / Comm Java Riak Key/Value ASL 2.0 Erlang Redis Key/Value BSD/MIT-style C Scalaris Key/Value ASL 2.0 Erlang Tokyo Cabinet Key/Value LGPL C Voldemort Key/Value ASL 2.0 Java
  • 6. Distribution • Master / Slave • Master / Slave(s) • Masterless (Master / Master)
  • 7. Distribution Masterless Master/Slave Hot standby Amazon Dynamo X Cassandra X CouchDB X Dynomite X HBase ? MongoDB X X Neo4J* Riak X Redis X Scalaris X Tokyo Cabinet Voldemort X * Neo4J HA coming “soon”
  • 8. Distribution Masterless Master/Slave ie Hot standbyw Amazon Dynamo X d v Cassandra X ifie l CouchDB X Dynomite X m p i HBase ? MongoDB y s X X Neo4J* e r v Riak X a Redis X is Scalaris X h i s Tokyo Cabinet Voldemort X T * Neo4J HA coming “soon”
  • 9. Common factor “...of the web...” Of the who?!
  • 10. Of the web “...Django may be built for the Web, but CouchDB is built of the Web. I’ve never seen software that so completely embraces the philosophies behind HTTP. CouchDB makes Django look old-school in the same way that Django makes ASP look outdated” - http://jacobian.org/writing/of-the-web/
  • 11. Of the web “...CouchDB may succeeded, and it may fail; who knows. I’m sure of one thing, though — this is what the software of the future looks like” - http://jacobian.org/writing/of-the-web/
  • 12. So freakin’ what?! All your webish skillz and tools apply...
  • 13. So freakin’ what?! language-, platform- and OS-neutral load balancers proxies MIME / Content-Type All your webish skillz and tools apply... HTTP client libs (etag, if-modified-since, etc) caches
  • 14. These guys can just suck it HTTP/REST is integration that works (YMMV)
  • 15. Buckle Up Dorothy. Cause' Kansas, Is Going Bye-Bye
  • 16. Key/Value Store I got keys but no locks
  • 17. Riak Decentralized key-value store A flexible map/reduce engine HTTP/JSON API A database ideally suited for Web applications
  • 19. The Ring 12 1 11 2 10 3 9 4 8 5 7 6 ring size = 12
  • 20. The Ring One Ring size to rule them all, One Ring size to find them, One Ring size to bring them all and in the cluster bind them...
  • 23. Consistent Hashing Read (GET) “I want “ is answered by: where is on the ring?
  • 24. Consistent Hashing Read (GET) “I want “ is answered by: where is on the ring?
  • 25. Cluster Instance A Instance B Instance C ring size = 12 instances = 3 ring size / nodes = ~slices per instances
  • 26. Cluster Instance A Instance B Instance C ring size = 12 instances = 3 ring size / nodes = ~slices per instances
  • 27. Cluster - Read (GET) Instance A Instance B Instance C
  • 28. Cluster - Read (GET) I can haz ? Instance A Instance B Instance C Hm, lives in a slice of the ring owned by instance C.
  • 29. Cluster - Read (GET) I can haz ? Instance A Instance B Instance C Okidoki, now Hey C! I need where’s he...a yeah in my fourth slice
  • 30. Cluster - Read (GET) I can haz ? Here ya go Instance A Instance B Instance C Cheers!
  • 32. Riak “stuff” Bucket Container/keyspace. Determines number of replicas for its contents
  • 33. Riak “stuff” Consistent Hashing Key hashing technique used to distribute keys on the ring Bucket Container/keyspace. Determines number of replicas for its contents
  • 34. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Gossiping Consistent Hashing Key hashing technique used to distribute keys on the ring Bucket Container/keyspace. Determines number of replicas for its contents
  • 35. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Gossiping Consistent Hashing Key hashing technique used to distribute keys on the ring Hinted Handoff Covering for a Bucket failed “neighbor” node while gone Container/keyspace. Determines number of replicas for its contents
  • 36. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Gossiping Links Consistent Hashing Key hashing technique used to distribute keys on the ring Hinted Handoff Covering for a Bucket failed “neighbor” node while gone Container/keyspace. Determines number of replicas for its contents
  • 37. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Gossiping Links Consistent Hashing Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Container/keyspace. efficient summary about Determines number of objects. Gossiped. replicas for its contents
  • 38. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Gossiping Links Node Consistent Hashing One server. Runs vnodes which claims partitions. Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Container/keyspace. efficient summary about Determines number of objects. Gossiped. replicas for its contents
  • 39. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links One slice (part) of the ring. Node Consistent Hashing One server. Runs vnodes which claims partitions. Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Container/keyspace. efficient summary about Determines number of objects. Gossiped. replicas for its contents
  • 40. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links One slice (part) of the ring. Node Auto correction of out-of-date objects Consistent Hashing One server. Runs vnodes which claims partitions. Read Repair Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Container/keyspace. efficient summary about Determines number of objects. Gossiped. replicas for its contents
  • 41. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links One slice (part) of the ring. Node Auto correction of out-of-date objects Consistent Hashing One server. Runs vnodes which claims partitions. Read Repair Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Number of copies Container/keyspace. efficient summary about of the same object Determines number of replicas for its contents objects. Gossiped. Replica in the cluster
  • 42. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links The complete “space”, One slice (part) of the ring. divided into partitions which are claimed by vnodes Ring Node Auto correction of out-of-date objects Consistent Hashing One server. Runs vnodes which claims partitions. Read Repair Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Number of copies Container/keyspace. efficient summary about of the same object Determines number of replicas for its contents objects. Gossiped. Replica in the cluster
  • 43. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links The complete “space”, One slice (part) of the ring. divided into partitions which Vector Clock are claimed by vnodes Conflic detection technique for objects. Ring Node Auto correction of out-of-date objects Consistent Hashing One server. Runs vnodes which claims partitions. Read Repair Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Number of copies Container/keyspace. efficient summary about of the same object Determines number of replicas for its contents objects. Gossiped. Replica in the cluster
  • 44. Shares state, bucket and ring knowledge in the cluster Riak “stuff” Allows retrieval of “weakly” linked objects Partition Gossiping Links The complete “space”, One slice (part) of the ring. Vnode divided into partitions which Vector Clock are claimed by vnodes Conflic detection technique for objects. Ring Node Runs in a node and claims one Auto correction of out-of-date objects Consistent Hashing One server. Runs vnodes which claims partition on the ring partitions. Read Repair Key hashing technique used to distribute keys on the ring Hinted Handoff Merkle Tree Covering for a Bucket Data structure for failed “neighbor” node while gone Number of copies Container/keyspace. efficient summary about of the same object Determines number of replicas for its contents objects. Gossiped. Replica in the cluster
  • 45. Riak - Takeaways • No single point of failure • Choose your levels for: • availability • consistency • partition tolerance
  • 46. But wait, there’s more... • Binary data + Content-Type = whatever • MP3’s, Images, Text, ... • Map/Reduce • Local data, parallel
  • 48. Document Store Relax
  • 49. CouchDB Document oriented databased Kick ass replication HTTP/JSON API Map/reduce view (index) definitions
  • 50. World view One document == JSON One document == One record Many documents == One database Many databases == One instance No schema
  • 51. World view Documents can have attachments (binary + mime type) be rendered differently (HTML, XML)
  • 52. A document Key, either you choose it or CouchDB does it for you { "_id": "b098445d587b1f347e48e1a79301de02", "_rev": "1-80bfd8302e0f08eec2396c8107cafc19", "platform": { "browser": "mozilla", "version": "1.9.1.8" }, "timestamp": 1270131033337 Revision } number
  • 54. Views { "_id": "b098445d587b1f347e48e1a79301de02", "_rev": "1-80bfd8302e0f08eec2396c8107cafc19", "platform": { "browser": "mozilla", "version": "1.9.1.8" }, "timestamp": 1270131033337 } + function(doc) { emit(doc.platform.browser, doc.platform.version); } = { "total_rows": 1, "offset": 0, "rows": [ "id": "b098445d587b1f347e48e1a79301de02", "key": "mozilla", "value": "1.9.1.8" ]
  • 55. Views Views are stored as an accessible web resource on disk and incrementally updated as well as replicated with the database
  • 56. Replication Peer to peer Online/Offline Conflict detection and resolution Any number of nodes Local Remote
  • 63. CouchDB “stuff” Append only Hence, won’t corrupt its data files
  • 64. CouchDB “stuff” MVCC Multi version concurrency control. Writers do not block readers. Readers do not block writers. Append only Hence, won’t corrupt its data files
  • 65. CouchDB “stuff” BDCRR MVCC Bi-directional, conflict resolving, replication Multi version concurrency control. Writers do not block readers. Readers do not block writers. Append only Hence, won’t corrupt its data files
  • 66. CouchDB “stuff” BDCRR MVCC Bi-directional, conflict resolving, replication Multi version concurrency control. Writers do not block readers. Readers do not block writers. Append only Compaction Hence, won’t corrupt its data files Append only will cause data files to grow. Compaction to the rescue, in the background - for your pleasure.
  • 67. CouchDB “stuff” BDCRR MVCC Bi-directional, conflict resolving, replication Multi version concurrency control. Writers do not block readers. Readers do not block writers. Append only Compaction Hence, won’t corrupt its data files Append only will cause data files to grow. Compaction to the rescue, in ACID the background - for your pleasure. Awesome, Cool, Impressive, Dope
  • 68. CouchDB - Takeaways • Kick ass replication • Views are fast • Can host and serve complete webapps
  • 69. Outro • Test one or more NoSQL thingys • Get familiar with Brewers CAP theorem • Get familiar with the Dynamo paper
  • 70. Over and out. Mårten Gustafson @martengustafson http://marten.gustafson.pp.se/ marten.gustafson@gmail.com

Editor's Notes

  1. * Relational not always most suitable model * Schema-less gives freedom * Non-relational gives interesting scalability capabilities (which most provides) * Most provides REST/JSON API ** Very suitable for web dev’t ** Easy peasy to use, regardless of environment
  2. * Hinted handoff
  3. * Hinted handoff
  4. * Hinted handoff
  5. * Hinted handoff
  6. * Hinted handoff
  7. * Hinted handoff
  8. * Hinted handoff
  9. * Hinted handoff
  10. * Hinted handoff
  11. * Hinted handoff
  12. * Hinted handoff
  13. * Hinted handoff
  14. * Hinted handoff
  15. * Hinted handoff
  16. * Hinted handoff
  17. * Hinted handoff
  18. collation - assembling in proper numerical or logical sequence
  19. Simplified view explanation