$30 off During Our Annual Pro Sale. View Details »

The Path Towards Simplifying Consistency in Distributed Systems

The Path Towards Simplifying Consistency in Distributed Systems

Caitie McCaffrey

April 24, 2017
Tweet

More Decks by Caitie McCaffrey

Other Decks in Technology

Transcript

  1. The Path Towards
    Simplifying
    Consistency in
    Distributed Systems

    View Slide

  2. Caitie McCaffrey
    Distributed Systems Engineer
    caitiem.com
    @caitie

    View Slide

  3. Distributed Systems Engineer
    Feral Concurrency
    Control Programmer
    Caitie McCaffrey

    View Slide

  4. 2015

    View Slide

  5. 2015
    “Application-level
    Mechanisms for maintaining
    database integrity”

    View Slide

  6. Halo 4 Statistics Service
    Halo 4 Statistics Service
    Record & Aggregate Statistics
    From Every Multiplayer Halo
    Game a User Plays

    View Slide

  7. Halo 4 Statistics Service

    View Slide

  8. Observability at Twitter
    Make Dashboards & Alerts
    Always Available

    View Slide

  9. Cmd Line Tool Viz / Dashboad Alerting Svc
    Cuckoo-Read
    Cuckoo-Write
    Indexing Svc
    Relay Svc
    Twitter Front End
    Twitter
    Svc
    Twitter
    Statsite
    Twitter
    Svc
    Twitter
    Svc
    Scribe
    Collection
    Agent
    HDFS
    Manhattan Database
    Public Cloud
    Observability at Twitter

    View Slide

  10. Notify Users When
    We Receive Abuse
    Reports

    View Slide

  11. Notify Users If An
    Action is Taken

    View Slide

  12. Report
    Events Stream
    Modification
    Events Stream
    Enrollment
    Events Stream
    Listener Service
    Daemons Service
    Executor Service
    Notification Events
    Stream
    Notification
    Service
    Manhattan
    Macaw

    View Slide

  13. Feral Concurrency
    Control

    View Slide

  14. Service Service
    Service
    Monoliths

    View Slide

  15. The Rise of NoSQL

    View Slide

  16. View Slide

  17. Microservices

    View Slide

  18. State of Affairs

    View Slide

  19. Linearizable
    Sequential
    Causal
    Pipelined Random
    Access Memory
    Read Your
    Write
    Monotonic
    Read
    Monotonic
    Write
    Write From
    Read
    Consistency
    Models

    View Slide

  20. View Slide

  21. View Slide

  22. View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. Can We Do
    Better?

    View Slide

  27. Finance & Accounting

    View Slide

  28. VisiCalc
    1979

    View Slide

  29. 1983 Lotus 123

    View Slide

  30. View Slide

  31. 1987
    Excel

    View Slide

  32. View Slide

  33. &
    Standardization
    Computer Aided
    Computation

    View Slide

  34. Standardization
    for Consistency in Distributed Systems

    View Slide

  35. 1988

    View Slide

  36. 1988
    “We believe the form of
    communication that is needed is
    remote procedure call with at-
    most-once semantics”

    View Slide

  37. 1988
    “An adequate language must
    provide a modular, reasonably
    automatic method for achieving
    consistency ”

    View Slide

  38. Branch B
    Account 789: $250
    Branch A
    Account 123 : $100
    Account 456: $50
    SubAction: Deposit (123, 50)
    Transfer Action
    SubAction: Withdraw(789, 50)
    Transfer
    Deposit Withdraw
    enter topaction
    coenter
    action
    branchA.Deposit(123, 50)
    action
    branchB.Withdraw(789, 50)
    end
    end

    View Slide

  39. What about
    Spanner?

    View Slide

  40. 2015

    View Slide

  41. 2015
    “The biggest barrier…is that
    consistency mechanisms must
    integrate across many
    stateful services”

    View Slide

  42. Microservices

    View Slide

  43. CRDTs
    * Stolen from Chris Meiklejohn
    in practice

    View Slide

  44. CRDTs
    * Stolen from Chris Meiklejohn
    in practice

    View Slide

  45. There Is No One
    Size Fits All
    Consistency Model

    View Slide

  46. Mixed Consistency Data Stores
    Manhattan

    View Slide

  47. View Slide

  48. Computer Aided
    Computation
    for Consistency in Distributed Systems

    View Slide

  49. 2016

    View Slide

  50. Bank Application
    Bank Account must be > 0
    Deposit Money
    Withdrawal Money

    View Slide

  51. ‘Cause I’m Strong Enough: Reasoning About Consistency Choices in Distributed Systems

    View Slide

  52. Define Invariants
    & Actions
    Deposit Money
    Withdrawal Money
    Determine
    Consistency
    Required
    Bank Account > 0
    Eventual Consistency
    Strong Consistency
    Code
    Generation?

    View Slide

  53. &
    Standardization
    Computer Aided
    Computation

    View Slide

  54. Thank you
    @caitie

    View Slide