Your SlideShare is downloading. ×
  • Like
Consistency in Distributed Systems
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Consistency in Distributed Systems

  • 3,709 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,709
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
75
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

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
  • 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
  • 19. BASE
  • 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