1 of 94

Conflict Resolution

with guns

2 of 94

Controversy

3 of 94

What is distributed?

time & space

4 of 94

Time

5 of 94

Space

6 of 94

Coordination

7 of 94

Failure

8 of 94

Master-Slave

9 of 94

Failure?

10 of 94

11 of 94

Leader-Election

12 of 94

Dead?

or just not responding?

13 of 94

14 of 94

15 of 94

16 of 94

17 of 94

18 of 94

19 of 94

20 of 94

21 of 94

22 of 94

23 of 94

CAP Theorem

Consistency, Availability, Partition tolerance

24 of 94

25 of 94

26 of 94

Can we do better?

PAXOS! RAFT!

27 of 94

Complexity

28 of 94

Challenge

Consistency

29 of 94

Challenge

Centralization

30 of 94

Conflict Resolution

with guns

31 of 94

In Space!

32 of 94

:(

or on the metro

33 of 94

Cause we Can’t Beat Light

34 of 94

35 of 94

5

36 of 94

2

37 of 94

-3

38 of 94

a quantifiable difference

Where “Quantum” Mechanics Comes From

39 of 94

The Universe

is not Strongly Consistent

40 of 94

41 of 94

Who Wins?

Hello: “Mars”

Hello: “Earth”

42 of 94

Divergence

Hello: “Mars”

Hello: “Earth”

43 of 94

Terrible Timestamps

I’m from the future `yo!

44 of 94

Villainous Vectors

I catch your drift, but you lost me.

45 of 94

Alice says “Hello World” at 1

Alice says “Hello Mars” at 2

Bob says “Hello Jupiter” at 5

Alice says “Hello Pluto” at 6

46 of 94

I’m Carl and

I want to be

your friend!

47 of 94

c

No.

48 of 94

49 of 94

50 of 94

Can we do better?

or back to strong consistency?

51 of 94

Boundary Function

52 of 94

Operating State

53 of 94

Historical State

54 of 94

Deferred State

55 of 94

?

?

56 of 94

state 8

state 4

57 of 94

Hello: “Mars”

state 9

state 8

state 4

58 of 94

Hello: “Mars”

state 9

state 8

state 4

Process Later

59 of 94

Hello: “Sun”

state 3

state 8

state 4

60 of 94

Hello: “Sun”

state 3

state 8

state 4

Record & Discard

61 of 94

Hello: “Venus”

state 5

state 8

state 4

62 of 94

Hello: “Venus”

state 5

state 8

state 4

✔ Process

63 of 94

state 8

state 5

64 of 94

state 9

state 5

65 of 94

state 9

state 5

Hello: “Earth”

state 9

✔ Process

66 of 94

state 9

67 of 94

state 9

68 of 94

Hello: “Mars”

state 9

state 9

state 12

69 of 94

State 9 === State 9

Conflict!

70 of 94

?

value === value

71 of 94

Earth vs Mars

current value compared to incoming value

72 of 94

Naïve

lexical alphanumeric sort

73 of 94

Hello: “Mars”

state 9

state 12

Hello: “Earth”

state 9

74 of 94

Convergence

Hello: “Mars”

Hello: “Mars”

75 of 94

Eventually

76 of 94

What Could Go Wrong?

77 of 94

function HAM(machineState, incomingState, currentState, incomingValue, currentValue){

if(machineState < incomingState){

return {defer: true};

}

if(incomingState < currentState){

return {historical: true};

}

if(currentState < incomingState){

return {converge: true, incoming: true};

}

if(incomingState === currentState){

if(Lexical(incomingValue) === Lexical(currentValue)){

return {state: true};

}

if(Lexical(incomingValue) < Lexical(currentValue)){

return {converge: true, current: true};

}

if(Lexical(currentValue) < Lexical(incomingValue)){

return {converge: true, incoming: true};

}

}

return {err: "Invalid recursion"};

}

78 of 94

79 of 94

NTP

80 of 94

Causality

Linked Lists & Directed Acyclic Graphs

81 of 94

X + Y - Z * A / B ^ C

Conflict-free Replicated Data Types

82 of 94

Math → Banking

Vulnerable to the Double Spending Problem

83 of 94

Blockchain Ledger

Proof of Work

84 of 94

Batteries Not Included

Extensible

85 of 94

Your Business

86 of 94

Distributed Matters

87 of 94

Decentralized Matters

88 of 94

Math Matters

89 of 94

Science Matters

CRDTs, DAGs, Blockchains

90 of 94

c

Hey!

91 of 94

92 of 94

Will you

be my

friend?

93 of 94

94 of 94

People Matter

mark@gunDB.io