SlideShare a Scribd company logo
1 of 56
Download to read offline
Dynamo: not just datastores
          Susan Potter




         September 2011
Overview: In a nutshell




      Figure: "a highly available key-value storage system"
Overview: Not for all apps
Overview: Agenda


  Distribution & consistency   Riak abstractions

  t - Fault tolerance          Building an application

  N, R, W                      Considerations

  Dynamo techniques            Oh, the possibilities!
Distributed models & consistency
     Are you on ACID?
     Are your apps ACID?
     Few apps require
     strong consistency
     Embrace BASE
     for high availability
Distributed models & consistency
     Are you on ACID?
     Are your apps ACID?
     Few apps require
     strong consistency
     Embrace BASE
     for high availability
Distributed models & consistency
     Are you on ACID?
     Are your apps ACID?
     Few apps require
     strong consistency
     Embrace BASE
     for high availability
Distributed models & consistency
     Are you on ACID?
     Are your apps ACID?
     Few apps require
     strong consistency
     Embrace BASE
     for high availability
Distributed models & consistency



                   BASE
 Basically Available Soft-state Eventual consistency
Distributed models & consistency



                   BASE
 Basically Available Soft-state Eventual consistency

                  </RANT>
t-Fault tolerance: Two kinds of failure
t-Fault tolerance: More on failure


     Failstop
     fail in well understood / deterministic ways




     Byzantine
     fail in arbitrary non-deterministic ways
t-Fault tolerance: More on failure


     Failstop
     fail in well understood / deterministic ways

     t-Fault tolerance means t + 1 nodes

     Byzantine
     fail in arbitrary non-deterministic ways
t-Fault tolerance: More on failure


     Failstop
     fail in well understood / deterministic ways

     t-Fault tolerance means t + 1 nodes

     Byzantine
     fail in arbitrary non-deterministic ways
t-Fault tolerance: More on failure


     Failstop
     fail in well understood / deterministic ways

     t-Fault tolerance means t + 1 nodes

     Byzantine
     fail in arbitrary non-deterministic ways

     t-Fault tolerance means 2t + 1 nodes
CAP Controls: N, R, W

    N = number of replicas
    must be 1 ≤ N ≤ nodes

    R = number of responding read nodes
    can be set per request

    W = number of responding write nodes
    can be set per request

    Q = quorum "majority rules"
    set in stone: Q = N/2 + 1

    Tunability
    when R = W = N =⇒ strong

    when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
CAP Controls: N, R, W

    N = number of replicas
    must be 1 ≤ N ≤ nodes

    R = number of responding read nodes
    can be set per request

    W = number of responding write nodes
    can be set per request

    Q = quorum "majority rules"
    set in stone: Q = N/2 + 1

    Tunability
    when R = W = N =⇒ strong

    when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
CAP Controls: N, R, W

    N = number of replicas
    must be 1 ≤ N ≤ nodes

    R = number of responding read nodes
    can be set per request

    W = number of responding write nodes
    can be set per request

    Q = quorum "majority rules"
    set in stone: Q = N/2 + 1

    Tunability
    when R = W = N =⇒ strong

    when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
CAP Controls: N, R, W

    N = number of replicas
    must be 1 ≤ N ≤ nodes

    R = number of responding read nodes
    can be set per request

    W = number of responding write nodes
    can be set per request

    Q = quorum "majority rules"
    set in stone: Q = N/2 + 1

    Tunability
    when R = W = N =⇒ strong

    when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
CAP Controls: N, R, W

    N = number of replicas
    must be 1 ≤ N ≤ nodes

    R = number of responding read nodes
    can be set per request

    W = number of responding write nodes
    can be set per request

    Q = quorum "majority rules"
    set in stone: Q = N/2 + 1

    Tunability
    when R = W = N =⇒ strong

    when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
Dynamo: Properties

    Decentralized
    no masters exist

    Homogeneous
    nodes have same capabilities

    No Global State
    no SPOFs for global state

    Deterministic Replica Placement
    each node can calculate where replicas should exist for key

    Logical Time
    No reliance on physical time
Dynamo: Properties

    Decentralized
    no masters exist

    Homogeneous
    nodes have same capabilities

    No Global State
    no SPOFs for global state

    Deterministic Replica Placement
    each node can calculate where replicas should exist for key

    Logical Time
    No reliance on physical time
Dynamo: Properties

    Decentralized
    no masters exist

    Homogeneous
    nodes have same capabilities

    No Global State
    no SPOFs for global state

    Deterministic Replica Placement
    each node can calculate where replicas should exist for key

    Logical Time
    No reliance on physical time
Dynamo: Properties

    Decentralized
    no masters exist

    Homogeneous
    nodes have same capabilities

    No Global State
    no SPOFs for global state

    Deterministic Replica Placement
    each node can calculate where replicas should exist for key

    Logical Time
    No reliance on physical time
Dynamo: Properties

    Decentralized
    no masters exist

    Homogeneous
    nodes have same capabilities

    No Global State
    no SPOFs for global state

    Deterministic Replica Placement
    each node can calculate where replicas should exist for key

    Logical Time
    No reliance on physical time
Dynamo: Techniques


       Consistent Hashing

       Vector Clocks

       Gossip Protocol

       Hinted Handoff
Dynamo: Techniques


       Consistent Hashing

       Vector Clocks

       Gossip Protocol

       Hinted Handoff
Dynamo: Consistent hashing




         Figure: PrefsList for K is [C, D, E]
Dynamo: Vector clocks



   -type vclock() ::
 [{actor(), counter()}]
         A occurred-before B if counters in A are
     less than or equal to those in B for each actor
Dynamo: Gossip protocol




        Figure:   "You would never guess what I heard down the pub..."
Dynamo: Hinted handoff




       Figure:   "Here, take the baton and take over from me. KTHXBAI"
riak_core: Abstractions

         Coordinator
         enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes

         VNodes
         Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication

         Watchers
         gen_event, listens for ring and service events, used to calculate fallback nodes

         Ring Manager
         stores local node copy of ring (and cluster?) data

         Ring Event Handlers
         notified about ring (and cluster?) changes and broadcasts plus metadata changes
riak_core: Abstractions

         Coordinator
         enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes

         VNodes
         Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication

         Watchers
         gen_event, listens for ring and service events, used to calculate fallback nodes

         Ring Manager
         stores local node copy of ring (and cluster?) data

         Ring Event Handlers
         notified about ring (and cluster?) changes and broadcasts plus metadata changes
riak_core: Abstractions

         Coordinator
         enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes

         VNodes
         Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication

         Watchers
         gen_event, listens for ring and service events, used to calculate fallback nodes

         Ring Manager
         stores local node copy of ring (and cluster?) data

         Ring Event Handlers
         notified about ring (and cluster?) changes and broadcasts plus metadata changes
riak_core: Abstractions

         Coordinator
         enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes

         VNodes
         Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication

         Watchers
         gen_event, listens for ring and service events, used to calculate fallback nodes

         Ring Manager
         stores local node copy of ring (and cluster?) data

         Ring Event Handlers
         notified about ring (and cluster?) changes and broadcasts plus metadata changes
riak_core: Abstractions

         Coordinator
         enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes

         VNodes
         Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication

         Watchers
         gen_event, listens for ring and service events, used to calculate fallback nodes

         Ring Manager
         stores local node copy of ring (and cluster?) data

         Ring Event Handlers
         notified about ring (and cluster?) changes and broadcasts plus metadata changes
riak_core: Coordinator




             Figure:   Header of a coordinator
riak_core: Commands



  -type riak_cmd() ::
{verb(), key(), payload()}
Implement handle_command/3 clause for each command in your
                  callback VNode module
riak_core: VNodes
riak_core: VNodes




        Figure:   Sample handoff functions from RTS example app
riak_core: Project Structure

         rebar ;)
         also written by the Basho team, makes OTP building and deploying much less painful



         dependencies
         add you_app, riak_core, riak_kv, etc. as dependencies to shell project



         new in 1.0 stuff
         cluster vs ring membership, riak_pipe, etc.
riak_core: Project Structure

         rebar ;)
         also written by the Basho team, makes OTP building and deploying much less painful



         dependencies
         add you_app, riak_core, riak_kv, etc. as dependencies to shell project



         new in 1.0 stuff
         cluster vs ring membership, riak_pipe, etc.
riak_core: Project Structure

         rebar ;)
         also written by the Basho team, makes OTP building and deploying much less painful



         dependencies
         add you_app, riak_core, riak_kv, etc. as dependencies to shell project



         new in 1.0 stuff
         cluster vs ring membership, riak_pipe, etc.
Considerations

                 Other:stuff()
     Interface layer
     riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers



     Securing application
     riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies



     Distribution models
     e.g. pipelined, laned vs tiered



     Query/execution models
     e.g. map-reduce (M/R), ASsociated SET (ASSET)
Considerations

                 Other:stuff()
     Interface layer
     riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers



     Securing application
     riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies



     Distribution models
     e.g. pipelined, laned vs tiered



     Query/execution models
     e.g. map-reduce (M/R), ASsociated SET (ASSET)
Considerations

                 Other:stuff()
     Interface layer
     riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers



     Securing application
     riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies



     Distribution models
     e.g. pipelined, laned vs tiered



     Query/execution models
     e.g. map-reduce (M/R), ASsociated SET (ASSET)
Considerations

                 Other:stuff()
     Interface layer
     riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers



     Securing application
     riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies



     Distribution models
     e.g. pipelined, laned vs tiered



     Query/execution models
     e.g. map-reduce (M/R), ASsociated SET (ASSET)
Oh, the possibilities!

                    What:next()
     Concurrency models
     e.g. actor, disruptor, evented/reactor, threading



     Consistency models
     e.g. vector-field, causal, FIFO



     Computation optimizations
     e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?)



     Other optimizations
     e.g. Client discovery, Remote Direct Memory Access (RDMA)
Oh, the possibilities!

                    What:next()
     Concurrency models
     e.g. actor, disruptor, evented/reactor, threading



     Consistency models
     e.g. vector-field, causal, FIFO



     Computation optimizations
     e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?)



     Other optimizations
     e.g. Client discovery, Remote Direct Memory Access (RDMA)
Oh, the possibilities!

                    What:next()
     Concurrency models
     e.g. actor, disruptor, evented/reactor, threading



     Consistency models
     e.g. vector-field, causal, FIFO



     Computation optimizations
     e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?)



     Other optimizations
     e.g. Client discovery, Remote Direct Memory Access (RDMA)
Oh, the possibilities!

                    What:next()
     Concurrency models
     e.g. actor, disruptor, evented/reactor, threading



     Consistency models
     e.g. vector-field, causal, FIFO



     Computation optimizations
     e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?)



     Other optimizations
     e.g. Client discovery, Remote Direct Memory Access (RDMA)
# finger $(whoami)


Login: susan               Name: Susan Potter
Directory: /home/susan     Shell: /bin/zsh
On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0
Too much unread mail on me@susanpotter.net
Now working at Assistly! Looking for smart developers!;)
Plan:
  github: mbbx6spp
  twitter: @SusanPotter
Slides & Material

 https://github.com/mbbx6spp/riak_core-templates




      Figure:   http://susanpotter.net/talks/strange-loop/2011/dynamo-not-just-for-datastores/
Examples


       Rebar Templates
       https://github.com/mbbx6spp/riak_core-templates

       Riak Pipes
       https://github.com/basho/riak_pipe

       Riak Zab
       https://github.com/jtuple/riak_zab
Questions?




         Figure:   http://www.flickr.com/photos/42682395@N04/




         @SusanPotter
Questions?




         Figure:   http://www.flickr.com/photos/42682395@N04/




         @SusanPotter

More Related Content

What's hot

Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitivesBartosz Sypytkowski
 
Using ngx_lua in UPYUN
Using ngx_lua in UPYUNUsing ngx_lua in UPYUN
Using ngx_lua in UPYUNCong Zhang
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming PatternsHao Chen
 
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....Alessandro Cinelli (cirpo)
 
Testing your infrastructure with litmus
Testing your infrastructure with litmusTesting your infrastructure with litmus
Testing your infrastructure with litmusBram Vogelaar
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueGleicon Moraes
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talkLocaweb
 
Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaJon Moore
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Big Data Spain
 
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...CODE BLUE
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStackBram Vogelaar
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network TroubleshootingOpen Source Consulting
 
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016Wei Lin
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in VaultGlynnForrest
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksLaurent Bernaille
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultBram Vogelaar
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for DummiesŁukasz Proszek
 
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerRunning High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
 

What's hot (20)

Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitives
 
Using ngx_lua in UPYUN
Using ngx_lua in UPYUNUsing ngx_lua in UPYUN
Using ngx_lua in UPYUN
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWSDiscovering OpenBSD on AWS
Discovering OpenBSD on AWS
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
 
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
 
Testing your infrastructure with litmus
Testing your infrastructure with litmusTesting your infrastructure with litmus
Testing your infrastructure with litmus
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talk
 
Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and Lua
 
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
 
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...
The Art of Exploiting Unconventional Use-after-free Bugs in Android Kernel by...
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
Building Distributed System with Celery on Docker Swarm - PyCon JP 2016
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in Vault
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for Dummies
 
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerRunning High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
 

Viewers also liked

Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using GitSusan Potter
 
Writing Bullet-Proof Javascript: By Using CoffeeScript
Writing Bullet-Proof Javascript: By Using CoffeeScriptWriting Bullet-Proof Javascript: By Using CoffeeScript
Writing Bullet-Proof Javascript: By Using CoffeeScriptSusan Potter
 
Link Walking with Riak
Link Walking with RiakLink Walking with Riak
Link Walking with RiakSusan Potter
 
Designing for Concurrency
Designing for ConcurrencyDesigning for Concurrency
Designing for ConcurrencySusan Potter
 
Functional Algebra: Monoids Applied
Functional Algebra: Monoids AppliedFunctional Algebra: Monoids Applied
Functional Algebra: Monoids AppliedSusan Potter
 
Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monadskenbot
 
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle Trees
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle TreesModern Algorithms and Data Structures - 1. Bloom Filters, Merkle Trees
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle TreesLorenzo Alberton
 
Scaling Teams, Processes and Architectures
Scaling Teams, Processes and ArchitecturesScaling Teams, Processes and Architectures
Scaling Teams, Processes and ArchitecturesLorenzo Alberton
 
Your data structures are made of maths!
Your data structures are made of maths!Your data structures are made of maths!
Your data structures are made of maths!kenbot
 
Scalable Architectures - Taming the Twitter Firehose
Scalable Architectures - Taming the Twitter FirehoseScalable Architectures - Taming the Twitter Firehose
Scalable Architectures - Taming the Twitter FirehoseLorenzo Alberton
 
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014Susan Potter
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeLorenzo Alberton
 
The Art of Scalability - Managing growth
The Art of Scalability - Managing growthThe Art of Scalability - Managing growth
The Art of Scalability - Managing growthLorenzo Alberton
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenLorenzo Alberton
 
Monitoring at scale - Intuitive dashboard design
Monitoring at scale - Intuitive dashboard designMonitoring at scale - Intuitive dashboard design
Monitoring at scale - Intuitive dashboard designLorenzo Alberton
 
Trees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresTrees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresLorenzo Alberton
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginnerskenbot
 
Data made out of functions
Data made out of functionsData made out of functions
Data made out of functionskenbot
 

Viewers also liked (19)

Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using Git
 
Writing Bullet-Proof Javascript: By Using CoffeeScript
Writing Bullet-Proof Javascript: By Using CoffeeScriptWriting Bullet-Proof Javascript: By Using CoffeeScript
Writing Bullet-Proof Javascript: By Using CoffeeScript
 
Link Walking with Riak
Link Walking with RiakLink Walking with Riak
Link Walking with Riak
 
Designing for Concurrency
Designing for ConcurrencyDesigning for Concurrency
Designing for Concurrency
 
Functional Algebra: Monoids Applied
Functional Algebra: Monoids AppliedFunctional Algebra: Monoids Applied
Functional Algebra: Monoids Applied
 
Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monads
 
Why Haskell
Why HaskellWhy Haskell
Why Haskell
 
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle Trees
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle TreesModern Algorithms and Data Structures - 1. Bloom Filters, Merkle Trees
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle Trees
 
Scaling Teams, Processes and Architectures
Scaling Teams, Processes and ArchitecturesScaling Teams, Processes and Architectures
Scaling Teams, Processes and Architectures
 
Your data structures are made of maths!
Your data structures are made of maths!Your data structures are made of maths!
Your data structures are made of maths!
 
Scalable Architectures - Taming the Twitter Firehose
Scalable Architectures - Taming the Twitter FirehoseScalable Architectures - Taming the Twitter Firehose
Scalable Architectures - Taming the Twitter Firehose
 
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014
Scalaz By Example (An IO Taster) -- PDXScala Meetup Jan 2014
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
 
The Art of Scalability - Managing growth
The Art of Scalability - Managing growthThe Art of Scalability - Managing growth
The Art of Scalability - Managing growth
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and when
 
Monitoring at scale - Intuitive dashboard design
Monitoring at scale - Intuitive dashboard designMonitoring at scale - Intuitive dashboard design
Monitoring at scale - Intuitive dashboard design
 
Trees In The Database - Advanced data structures
Trees In The Database - Advanced data structuresTrees In The Database - Advanced data structures
Trees In The Database - Advanced data structures
 
Category theory for beginners
Category theory for beginnersCategory theory for beginners
Category theory for beginners
 
Data made out of functions
Data made out of functionsData made out of functions
Data made out of functions
 

Similar to DynamoDB and Riak: Key-value datastores beyond the basics

Introduction to Cassandra: Replication and Consistency
Introduction to Cassandra: Replication and ConsistencyIntroduction to Cassandra: Replication and Consistency
Introduction to Cassandra: Replication and ConsistencyBenjamin Black
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing RiakKevin Smith
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing RiakKevin Smith
 
Handling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web SystemsHandling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web SystemsVineet Gupta
 
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 RippleSean Cribbs
 
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016StampedeCon
 
Low Energy Task Scheduling based on Work Stealing
Low Energy Task Scheduling based on Work StealingLow Energy Task Scheduling based on Work Stealing
Low Energy Task Scheduling based on Work StealingLEGATO project
 
Big Data & NoSQL - EFS'11 (Pavlo Baron)
Big Data & NoSQL - EFS'11 (Pavlo Baron)Big Data & NoSQL - EFS'11 (Pavlo Baron)
Big Data & NoSQL - EFS'11 (Pavlo Baron)Pavlo Baron
 
Gossip & Key Value Store
Gossip & Key Value StoreGossip & Key Value Store
Gossip & Key Value StoreSajeev P
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Ivan Čukić
 
REEF: Towards a Big Data Stdlib
REEF: Towards a Big Data StdlibREEF: Towards a Big Data Stdlib
REEF: Towards a Big Data StdlibDataWorks Summit
 
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
Papers We Love / Kyiv :  PAXOS (and little about other consensuses )Papers We Love / Kyiv :  PAXOS (and little about other consensuses )
Papers We Love / Kyiv : PAXOS (and little about other consensuses )Ruslan Shevchenko
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on androidKoan-Sin Tan
 
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]Chris Suszyński
 
Computational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in RComputational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in Rherbps10
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value StoreSantal Li
 

Similar to DynamoDB and Riak: Key-value datastores beyond the basics (20)

Introduction to Cassandra: Replication and Consistency
Introduction to Cassandra: Replication and ConsistencyIntroduction to Cassandra: Replication and Consistency
Introduction to Cassandra: Replication and Consistency
 
Self healing data
Self healing dataSelf healing data
Self healing data
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing Riak
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing Riak
 
Handling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web SystemsHandling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web Systems
 
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
 
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016
Analyzing Time-Series Data with Apache Spark and Cassandra - StampedeCon 2016
 
Low Energy Task Scheduling based on Work Stealing
Low Energy Task Scheduling based on Work StealingLow Energy Task Scheduling based on Work Stealing
Low Energy Task Scheduling based on Work Stealing
 
Big Data & NoSQL - EFS'11 (Pavlo Baron)
Big Data & NoSQL - EFS'11 (Pavlo Baron)Big Data & NoSQL - EFS'11 (Pavlo Baron)
Big Data & NoSQL - EFS'11 (Pavlo Baron)
 
Lect 1.pptx
Lect 1.pptxLect 1.pptx
Lect 1.pptx
 
Gossip & Key Value Store
Gossip & Key Value StoreGossip & Key Value Store
Gossip & Key Value Store
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
 
REEF: Towards a Big Data Stdlib
REEF: Towards a Big Data StdlibREEF: Towards a Big Data Stdlib
REEF: Towards a Big Data Stdlib
 
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
Papers We Love / Kyiv :  PAXOS (and little about other consensuses )Papers We Love / Kyiv :  PAXOS (and little about other consensuses )
Papers We Love / Kyiv : PAXOS (and little about other consensuses )
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
 
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]
You need Event Mesh, not Service Mesh - Chris Suszynski [WJUG 301]
 
Computational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in RComputational Techniques for the Statistical Analysis of Big Data in R
Computational Techniques for the Statistical Analysis of Big Data in R
 
motor_2.ppt
motor_2.pptmotor_2.ppt
motor_2.ppt
 
Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
 

More from Susan Potter

Thinking in Properties
Thinking in PropertiesThinking in Properties
Thinking in PropertiesSusan Potter
 
Champaign-Urbana Javascript Meetup Talk (Jan 2020)
Champaign-Urbana Javascript Meetup Talk (Jan 2020)Champaign-Urbana Javascript Meetup Talk (Jan 2020)
Champaign-Urbana Javascript Meetup Talk (Jan 2020)Susan Potter
 
From Zero to Haskell: Lessons Learned
From Zero to Haskell: Lessons LearnedFrom Zero to Haskell: Lessons Learned
From Zero to Haskell: Lessons LearnedSusan Potter
 
Dynamically scaling a political news and activism hub (up to 5x the traffic i...
Dynamically scaling a political news and activism hub (up to 5x the traffic i...Dynamically scaling a political news and activism hub (up to 5x the traffic i...
Dynamically scaling a political news and activism hub (up to 5x the traffic i...Susan Potter
 
Deploying distributed software services to the cloud without breaking a sweat
Deploying distributed software services to the cloud without breaking a sweatDeploying distributed software services to the cloud without breaking a sweat
Deploying distributed software services to the cloud without breaking a sweatSusan Potter
 

More from Susan Potter (6)

Thinking in Properties
Thinking in PropertiesThinking in Properties
Thinking in Properties
 
Champaign-Urbana Javascript Meetup Talk (Jan 2020)
Champaign-Urbana Javascript Meetup Talk (Jan 2020)Champaign-Urbana Javascript Meetup Talk (Jan 2020)
Champaign-Urbana Javascript Meetup Talk (Jan 2020)
 
From Zero to Haskell: Lessons Learned
From Zero to Haskell: Lessons LearnedFrom Zero to Haskell: Lessons Learned
From Zero to Haskell: Lessons Learned
 
Dynamically scaling a political news and activism hub (up to 5x the traffic i...
Dynamically scaling a political news and activism hub (up to 5x the traffic i...Dynamically scaling a political news and activism hub (up to 5x the traffic i...
Dynamically scaling a political news and activism hub (up to 5x the traffic i...
 
Twitter4R OAuth
Twitter4R OAuthTwitter4R OAuth
Twitter4R OAuth
 
Deploying distributed software services to the cloud without breaking a sweat
Deploying distributed software services to the cloud without breaking a sweatDeploying distributed software services to the cloud without breaking a sweat
Deploying distributed software services to the cloud without breaking a sweat
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

DynamoDB and Riak: Key-value datastores beyond the basics

  • 1. Dynamo: not just datastores Susan Potter September 2011
  • 2. Overview: In a nutshell Figure: "a highly available key-value storage system"
  • 3. Overview: Not for all apps
  • 4. Overview: Agenda Distribution & consistency Riak abstractions t - Fault tolerance Building an application N, R, W Considerations Dynamo techniques Oh, the possibilities!
  • 5. Distributed models & consistency Are you on ACID? Are your apps ACID? Few apps require strong consistency Embrace BASE for high availability
  • 6. Distributed models & consistency Are you on ACID? Are your apps ACID? Few apps require strong consistency Embrace BASE for high availability
  • 7. Distributed models & consistency Are you on ACID? Are your apps ACID? Few apps require strong consistency Embrace BASE for high availability
  • 8. Distributed models & consistency Are you on ACID? Are your apps ACID? Few apps require strong consistency Embrace BASE for high availability
  • 9. Distributed models & consistency BASE Basically Available Soft-state Eventual consistency
  • 10. Distributed models & consistency BASE Basically Available Soft-state Eventual consistency </RANT>
  • 11. t-Fault tolerance: Two kinds of failure
  • 12. t-Fault tolerance: More on failure Failstop fail in well understood / deterministic ways Byzantine fail in arbitrary non-deterministic ways
  • 13. t-Fault tolerance: More on failure Failstop fail in well understood / deterministic ways t-Fault tolerance means t + 1 nodes Byzantine fail in arbitrary non-deterministic ways
  • 14. t-Fault tolerance: More on failure Failstop fail in well understood / deterministic ways t-Fault tolerance means t + 1 nodes Byzantine fail in arbitrary non-deterministic ways
  • 15. t-Fault tolerance: More on failure Failstop fail in well understood / deterministic ways t-Fault tolerance means t + 1 nodes Byzantine fail in arbitrary non-deterministic ways t-Fault tolerance means 2t + 1 nodes
  • 16. CAP Controls: N, R, W N = number of replicas must be 1 ≤ N ≤ nodes R = number of responding read nodes can be set per request W = number of responding write nodes can be set per request Q = quorum "majority rules" set in stone: Q = N/2 + 1 Tunability when R = W = N =⇒ strong when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
  • 17. CAP Controls: N, R, W N = number of replicas must be 1 ≤ N ≤ nodes R = number of responding read nodes can be set per request W = number of responding write nodes can be set per request Q = quorum "majority rules" set in stone: Q = N/2 + 1 Tunability when R = W = N =⇒ strong when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
  • 18. CAP Controls: N, R, W N = number of replicas must be 1 ≤ N ≤ nodes R = number of responding read nodes can be set per request W = number of responding write nodes can be set per request Q = quorum "majority rules" set in stone: Q = N/2 + 1 Tunability when R = W = N =⇒ strong when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
  • 19. CAP Controls: N, R, W N = number of replicas must be 1 ≤ N ≤ nodes R = number of responding read nodes can be set per request W = number of responding write nodes can be set per request Q = quorum "majority rules" set in stone: Q = N/2 + 1 Tunability when R = W = N =⇒ strong when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
  • 20. CAP Controls: N, R, W N = number of replicas must be 1 ≤ N ≤ nodes R = number of responding read nodes can be set per request W = number of responding write nodes can be set per request Q = quorum "majority rules" set in stone: Q = N/2 + 1 Tunability when R = W = N =⇒ strong when R + W > N =⇒ quorum where W = 1, R = N or W = N, R = 1 or W = R = Q
  • 21. Dynamo: Properties Decentralized no masters exist Homogeneous nodes have same capabilities No Global State no SPOFs for global state Deterministic Replica Placement each node can calculate where replicas should exist for key Logical Time No reliance on physical time
  • 22. Dynamo: Properties Decentralized no masters exist Homogeneous nodes have same capabilities No Global State no SPOFs for global state Deterministic Replica Placement each node can calculate where replicas should exist for key Logical Time No reliance on physical time
  • 23. Dynamo: Properties Decentralized no masters exist Homogeneous nodes have same capabilities No Global State no SPOFs for global state Deterministic Replica Placement each node can calculate where replicas should exist for key Logical Time No reliance on physical time
  • 24. Dynamo: Properties Decentralized no masters exist Homogeneous nodes have same capabilities No Global State no SPOFs for global state Deterministic Replica Placement each node can calculate where replicas should exist for key Logical Time No reliance on physical time
  • 25. Dynamo: Properties Decentralized no masters exist Homogeneous nodes have same capabilities No Global State no SPOFs for global state Deterministic Replica Placement each node can calculate where replicas should exist for key Logical Time No reliance on physical time
  • 26. Dynamo: Techniques Consistent Hashing Vector Clocks Gossip Protocol Hinted Handoff
  • 27. Dynamo: Techniques Consistent Hashing Vector Clocks Gossip Protocol Hinted Handoff
  • 28. Dynamo: Consistent hashing Figure: PrefsList for K is [C, D, E]
  • 29. Dynamo: Vector clocks -type vclock() :: [{actor(), counter()}] A occurred-before B if counters in A are less than or equal to those in B for each actor
  • 30. Dynamo: Gossip protocol Figure: "You would never guess what I heard down the pub..."
  • 31. Dynamo: Hinted handoff Figure: "Here, take the baton and take over from me. KTHXBAI"
  • 32. riak_core: Abstractions Coordinator enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes VNodes Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication Watchers gen_event, listens for ring and service events, used to calculate fallback nodes Ring Manager stores local node copy of ring (and cluster?) data Ring Event Handlers notified about ring (and cluster?) changes and broadcasts plus metadata changes
  • 33. riak_core: Abstractions Coordinator enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes VNodes Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication Watchers gen_event, listens for ring and service events, used to calculate fallback nodes Ring Manager stores local node copy of ring (and cluster?) data Ring Event Handlers notified about ring (and cluster?) changes and broadcasts plus metadata changes
  • 34. riak_core: Abstractions Coordinator enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes VNodes Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication Watchers gen_event, listens for ring and service events, used to calculate fallback nodes Ring Manager stores local node copy of ring (and cluster?) data Ring Event Handlers notified about ring (and cluster?) changes and broadcasts plus metadata changes
  • 35. riak_core: Abstractions Coordinator enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes VNodes Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication Watchers gen_event, listens for ring and service events, used to calculate fallback nodes Ring Manager stores local node copy of ring (and cluster?) data Ring Event Handlers notified about ring (and cluster?) changes and broadcasts plus metadata changes
  • 36. riak_core: Abstractions Coordinator enforces consistency requirements, performing anti-entropy, gen_fsm, coordinates vnodes VNodes Erlang process, vnode to hashring partition, delegated work for its partition, unit of replication Watchers gen_event, listens for ring and service events, used to calculate fallback nodes Ring Manager stores local node copy of ring (and cluster?) data Ring Event Handlers notified about ring (and cluster?) changes and broadcasts plus metadata changes
  • 37. riak_core: Coordinator Figure: Header of a coordinator
  • 38. riak_core: Commands -type riak_cmd() :: {verb(), key(), payload()} Implement handle_command/3 clause for each command in your callback VNode module
  • 40. riak_core: VNodes Figure: Sample handoff functions from RTS example app
  • 41. riak_core: Project Structure rebar ;) also written by the Basho team, makes OTP building and deploying much less painful dependencies add you_app, riak_core, riak_kv, etc. as dependencies to shell project new in 1.0 stuff cluster vs ring membership, riak_pipe, etc.
  • 42. riak_core: Project Structure rebar ;) also written by the Basho team, makes OTP building and deploying much less painful dependencies add you_app, riak_core, riak_kv, etc. as dependencies to shell project new in 1.0 stuff cluster vs ring membership, riak_pipe, etc.
  • 43. riak_core: Project Structure rebar ;) also written by the Basho team, makes OTP building and deploying much less painful dependencies add you_app, riak_core, riak_kv, etc. as dependencies to shell project new in 1.0 stuff cluster vs ring membership, riak_pipe, etc.
  • 44. Considerations Other:stuff() Interface layer riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers Securing application riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies Distribution models e.g. pipelined, laned vs tiered Query/execution models e.g. map-reduce (M/R), ASsociated SET (ASSET)
  • 45. Considerations Other:stuff() Interface layer riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers Securing application riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies Distribution models e.g. pipelined, laned vs tiered Query/execution models e.g. map-reduce (M/R), ASsociated SET (ASSET)
  • 46. Considerations Other:stuff() Interface layer riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers Securing application riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies Distribution models e.g. pipelined, laned vs tiered Query/execution models e.g. map-reduce (M/R), ASsociated SET (ASSET)
  • 47. Considerations Other:stuff() Interface layer riak_core apps need to implement their own interface layer, e.g. HTTP, XMPP, AMQP, MsgPack, ProtoBuffers Securing application riak_core gossip does not address identity/authZ/authN between nodes; relies on Erlang cookies Distribution models e.g. pipelined, laned vs tiered Query/execution models e.g. map-reduce (M/R), ASsociated SET (ASSET)
  • 48. Oh, the possibilities! What:next() Concurrency models e.g. actor, disruptor, evented/reactor, threading Consistency models e.g. vector-field, causal, FIFO Computation optimizations e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?) Other optimizations e.g. Client discovery, Remote Direct Memory Access (RDMA)
  • 49. Oh, the possibilities! What:next() Concurrency models e.g. actor, disruptor, evented/reactor, threading Consistency models e.g. vector-field, causal, FIFO Computation optimizations e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?) Other optimizations e.g. Client discovery, Remote Direct Memory Access (RDMA)
  • 50. Oh, the possibilities! What:next() Concurrency models e.g. actor, disruptor, evented/reactor, threading Consistency models e.g. vector-field, causal, FIFO Computation optimizations e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?) Other optimizations e.g. Client discovery, Remote Direct Memory Access (RDMA)
  • 51. Oh, the possibilities! What:next() Concurrency models e.g. actor, disruptor, evented/reactor, threading Consistency models e.g. vector-field, causal, FIFO Computation optimizations e.g. General Purpose GPU programming, native interfacing (NIFs, JInterface, Scalang?) Other optimizations e.g. Client discovery, Remote Direct Memory Access (RDMA)
  • 52. # finger $(whoami) Login: susan Name: Susan Potter Directory: /home/susan Shell: /bin/zsh On since Mon 29 Sep 1997 21:18 (GMT) on tty1 from :0 Too much unread mail on me@susanpotter.net Now working at Assistly! Looking for smart developers!;) Plan: github: mbbx6spp twitter: @SusanPotter
  • 53. Slides & Material https://github.com/mbbx6spp/riak_core-templates Figure: http://susanpotter.net/talks/strange-loop/2011/dynamo-not-just-for-datastores/
  • 54. Examples Rebar Templates https://github.com/mbbx6spp/riak_core-templates Riak Pipes https://github.com/basho/riak_pipe Riak Zab https://github.com/jtuple/riak_zab
  • 55. Questions? Figure: http://www.flickr.com/photos/42682395@N04/ @SusanPotter
  • 56. Questions? Figure: http://www.flickr.com/photos/42682395@N04/ @SusanPotter