Consistency in Distributed Systems
Upcoming SlideShare
Loading in...5
×
 

Consistency in Distributed Systems

on

  • 4,300 views

 

Statistics

Views

Total Views
4,300
Views on SlideShare
4,288
Embed Views
12

Actions

Likes
1
Downloads
73
Comments
0

4 Embeds 12

http://www.slideshare.net 9
http://www.linkedin.com 1
https://twitter.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Consistency in Distributed Systems Consistency in Distributed Systems Presentation Transcript

    • Consistency in Distributed Systems Shane K Johnson CITYECH, Inc. March 31, 2010
    • Outline
      • Physical Distribution
      • CAP Theorem
        • BASE
      • Consistency
        • Eventual Consistency
      • Consistent Hashing
      • Consensus Protocols
      • Vector Clocks
    • Physical Distribution
      • Replicated
      • Partitioned
      • Both
    • CAP Theorem
      • Brewer's Conjecture
        • Eric Brewer
        • ACM Symposium on the Principles of Distributed Computing (PODC)
        • July 19th 2000
      • Brewer's Theorom
        • Formally Proved by Seth Gilbert/Nancy Lynch
        • MIT
        • 2002
    • CAP Theorem
      • Consistent
        • "...the C in ACID...a preset contraint of distributed systems that multiple values for the same piece of data are not allowed..."
      • Available
      • Partition Tolerant
    • BASE
      • Alternative to ACID
        • Brewer
        • SOSP Article
        • 1997
    • BASE
      • Basically
      • Available
      • Soft State
      • Eventually Consistent
    • Consistency
      • Strong
        • “After the update completes, any subsequent access will return the updated value.”
      • Weak
        • “The system does not guarantee that subsequent accesses will return the updated value.” Inconsistency Windows
      • Eventual
        • “The storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value.”
    • Eventually Consistent
      • Werner Vogels – CTO, Amazon
      • Eventual Consistency
        • Casual
        • Read Your Writes
        • Session
          • Session Based Read Your Writes
        • Monotonic Read
          • Once a process has seen a particular value, it will never see an older one.
        • Monotonic Write
          • Writes by the same process are serialized.
    • Eventually Consistent
      • N = # Nodes
      • W = # Replicas to Acknowledge Update
      • R = # Replicas Contacted for Read
      • Strong (W + R > N)
        • Synchronous Master/Master N=2, W=2, R=1
      • Weak/Eventual (W + R <= N)
        • Asynchronous Master/Master N=2, W=1, R=1
      • Optimized Read R=1, N=W
      • Optimized Write W=1, R=N
    • Consistent Hashing
      • Before
        • Object o
        • # Nodes n
          • hash(o) mod n
      • Problem
        • Rebalancing (Add/Remove Nodes)
    • Consistent Hashing
      • Hash Nodes
      • Treat Hash Table as Hash Ring
      • Hash Object
      • Traverse Until Node Found
    • Consensus Protocols
      • Quorum
      • Paxos
        • Leslie Lamport
          • The Part-Time Parliament, 1998
        • Roles
          • Client
          • Acceptor
          • Proposer
            • Notified Quorum of Acceptors on Behalf of Client
          • Learner
            • Execute Request, Send Response to Client
    • Vector Clocks
      • Lamport Timestamps -> Logical Clocks
    • References
      • http://www.julianbrowne.com/article/viewer/brewers-cap-theorem
      • http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
      • http://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html
      • http://en.wikipedia.org/wiki/Paxos_algorithm
      • http://en.wikipedia.org/wiki/Vector_clock