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

Like this? Share it with your network

Share

Consistency in Distributed Systems

on

  • 4,456 views

 

Statistics

Views

Total Views
4,456
Views on SlideShare
4,444
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 Presentation Transcript

  • 1. Consistency in Distributed Systems Shane K Johnson CITYECH, Inc. March 31, 2010
  • 2. Outline
    • Physical Distribution
    • 3. CAP Theorem
      • BASE
    • Consistency
      • Eventual Consistency
    • Consistent Hashing
    • 4. Consensus Protocols
    • 5. Vector Clocks
  • 6. Physical Distribution
    • Replicated
    • 7. Partitioned
    • 8. Both
  • 9. CAP Theorem
    • Brewer's Conjecture
      • Eric Brewer
      • 10. ACM Symposium on the Principles of Distributed Computing (PODC)
      • 11. July 19th 2000
    • Brewer's Theorom
      • Formally Proved by Seth Gilbert/Nancy Lynch
      • 12. MIT
      • 13. 2002
  • 14. 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
    • 15. Partition Tolerant
  • 16. BASE
    • Alternative to ACID
      • Brewer
      • 17. SOSP Article
      • 18. 1997
  • 19. BASE
    • Basically
    • 20. Available
    • 21. Soft State
    • 22. Eventually Consistent
  • 23. 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.”
  • 24. Eventually Consistent
    • Werner Vogels – CTO, Amazon
    • 25. Eventual Consistency
      • Casual
      • 26. Read Your Writes
      • 27. 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.
  • 28. Eventually Consistent
    • N = # Nodes
    • 29. W = # Replicas to Acknowledge Update
    • 30. R = # Replicas Contacted for Read
    • 31. 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
    • 32. Optimized Write W=1, R=N
  • 33. Consistent Hashing
    • Before
      • Object o
      • 34. # Nodes n
        • hash(o) mod n
    • Problem
      • Rebalancing (Add/Remove Nodes)
  • 35. Consistent Hashing
    • Hash Nodes
    • 36. Treat Hash Table as Hash Ring
    • 37. Hash Object
    • 38. Traverse Until Node Found
  • 39. Consensus Protocols
    • Quorum
    • 40. Paxos
      • Leslie Lamport
        • The Part-Time Parliament, 1998
      • Roles
        • Client
        • 41. Acceptor
        • 42. Proposer
          • Notified Quorum of Acceptors on Behalf of Client
        • Learner
          • Execute Request, Send Response to Client
  • 43. Vector Clocks
    • Lamport Timestamps -> Logical Clocks
  • 44. References
    • http://www.julianbrowne.com/article/viewer/brewers-cap-theorem
    • 45. http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
    • 46. http://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html
    • 47. http://en.wikipedia.org/wiki/Paxos_algorithm
    • 48. http://en.wikipedia.org/wiki/Vector_clock