Slide 1

Slide 1 text

The Path Towards Simplifying Consistency in Distributed Systems

Slide 2

Slide 2 text

Caitie McCaffrey Distributed Systems Engineer caitiem.com @caitie

Slide 3

Slide 3 text

Distributed Systems Engineer Feral Concurrency Control Programmer Caitie McCaffrey

Slide 4

Slide 4 text

2015

Slide 5

Slide 5 text

2015 “Application-level Mechanisms for maintaining database integrity”

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Halo 4 Statistics Service

Slide 8

Slide 8 text

Observability at Twitter Make Dashboards & Alerts Always Available

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

Notify Users When We Receive Abuse Reports

Slide 11

Slide 11 text

Notify Users If An Action is Taken

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Feral Concurrency Control

Slide 14

Slide 14 text

Service Service Service Monoliths

Slide 15

Slide 15 text

The Rise of NoSQL

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Microservices

Slide 18

Slide 18 text

State of Affairs

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Can We Do Better?

Slide 27

Slide 27 text

Finance & Accounting

Slide 28

Slide 28 text

VisiCalc 1979

Slide 29

Slide 29 text

1983 Lotus 123

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

1987 Excel

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

& Standardization Computer Aided Computation

Slide 34

Slide 34 text

Standardization for Consistency in Distributed Systems

Slide 35

Slide 35 text

1988

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

What about Spanner?

Slide 40

Slide 40 text

2015

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

Microservices

Slide 43

Slide 43 text

CRDTs * Stolen from Chris Meiklejohn in practice

Slide 44

Slide 44 text

CRDTs * Stolen from Chris Meiklejohn in practice

Slide 45

Slide 45 text

There Is No One Size Fits All Consistency Model

Slide 46

Slide 46 text

Mixed Consistency Data Stores Manhattan

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Computer Aided Computation for Consistency in Distributed Systems

Slide 49

Slide 49 text

2016

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

& Standardization Computer Aided Computation

Slide 54

Slide 54 text

Thank you @caitie