Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Conflict resolution with guns - Mark Nadal

643 Aufrufe

Veröffentlicht am

How do you survive failure? You distribute. But distributed systems are distressingly complicated, everything from PAXOS to RAFT. Can we do better? Can we simplify things while still achieving reasonable results? This talk will explore a new method for conflict resolution that has been in the works for 5 years of R&D, and promises to mathematically ease the pain. All work is open source and has been implemented in the GUN database, a VC backed startup. We'll demonstrate some amazing recoveries from harsh failures and go into detail about how the fully peer-to-peer distributed algorithm works. We'll also discuss its weaknesses, where it fits in the CAP Theorem, and how it can be used as a building block for higher level consistency guarantees. You'll come out of the talk with a fresh perspective on concurrency that will help you make better decisions for your company's tough distributed problems. Ones based on mathematics and science, not hype of buzz words and marketing.

Veröffentlicht in: Daten & Analysen
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Conflict resolution with guns - Mark Nadal

  1. 1. Conflict Resolution with guns
  2. 2. Controversy
  3. 3. What is distributed? time & space
  4. 4. Time
  5. 5. Space
  6. 6. Coordination
  7. 7. Failure
  8. 8. Master-Slave
  9. 9. Failure?
  10. 10. Leader-Election
  11. 11. or just not responding? Dead?
  12. 12. CAP Theorem Consistency, Availability, Partition tolerance
  13. 13. Can we do better? PAXOS! RAFT!
  14. 14. Complexity
  15. 15. Challenge Consistency
  16. 16. Challenge Centralization
  17. 17. Conflict Resolution with guns
  18. 18. In Space!
  19. 19. :( or on the metro
  20. 20. Cause we Can’t Beat Light
  21. 21. 5
  22. 22. 2
  23. 23. -3
  24. 24. a quantifiable difference Where “Quantum” Mechanics Comes From
  25. 25. The Universe is not Strongly Consistent
  26. 26. Who Wins? Hello: “Mars” Hello: “Earth”
  27. 27. Divergence Hello: “Mars” Hello: “Earth”
  28. 28. Terrible Timestamps I’m from the future `yo!
  29. 29. Villainous Vectors I catch your drift, but you lost me.
  30. 30. Alice says “Hello World” at 1 Alice says “Hello Mars” at 2 Bob says “Hello Jupiter” at 5 Alice says “Hello Pluto” at 6
  31. 31. I’m Carl and I want to be your friend!
  32. 32. c No.
  33. 33. Can we do better? or back to strong consistency?
  34. 34. Boundary Function
  35. 35. Operating State
  36. 36. Historical State
  37. 37. Deferred State
  38. 38. ? ?
  39. 39. state 8 state 4
  40. 40. Hello: “Mars” state 9 state 8 state 4
  41. 41. Hello: “Mars” state 9 state 8 state 4 ✖ Process Later
  42. 42. Hello: “Sun” state 3 state 8 state 4
  43. 43. Hello: “Sun” state 3 state 8 state 4 ✖ Record & Discard
  44. 44. Hello: “Venus” state 5 state 8 state 4
  45. 45. Hello: “Venus” state 5 state 8 state 4 ✔ Process
  46. 46. state 8 state 5
  47. 47. state 9 state 5
  48. 48. state 9 state 5 Hello: “Earth” state 9 ✔ Process
  49. 49. state 9
  50. 50. state 9
  51. 51. Hello: “Mars” state 9 state 9 state 12
  52. 52. State 9 === State 9 Conflict!
  53. 53. ? value === value
  54. 54. Earth vs Mars current value compared to incoming value
  55. 55. Naïve lexical alphanumeric sort
  56. 56. Hello: “Mars” state 9 state 12 Hello: “Earth” state 9
  57. 57. Convergence Hello: “Mars” Hello: “Mars”
  58. 58. Eventually
  59. 59. What Could Go Wrong?
  60. 60. function HAM(machineState, incomingState, currentState, incomingValue, currentValue){ if(machineState < incomingState){ return {amnesiaQuarantine: true}; } if(incomingState < currentState){ return {quarantineState: true}; } if(currentState < incomingState){ return {converge: true, incoming: true}; } if(incomingState === currentState){ if(incomingValue === currentValue){ return {state: true}; } if(String(incomingValue) < String(currentValue)){ return {converge: true, current: true}; } if(String(currentValue) < String(incomingValue)){ return {converge: true, incoming: true}; } } return {err: "Invalid recursion"}; }
  61. 61. NTP
  62. 62. Linked Lists & Directed Acyclic Graphs Causality
  63. 63. Conflict-free Replicated Data Types X + Y - Z * A / B ^ C
  64. 64. Vulnerable to the Double Spending Problem Math → Banking
  65. 65. Proof of Work Blockchain Ledger
  66. 66. Extensible Batteries Not Included
  67. 67. Your Business
  68. 68. Distributed Matters
  69. 69. Decentralized Matters
  70. 70. Math Matters
  71. 71. Science Matters CRDTs, DAGs, Blockchains
  72. 72. c Hey!
  73. 73. Will you be my friend?
  74. 74. People Matter mark@gunDB.io

×