what we talk about when we talk about distributed systems
play

WHAT WE TALK ABOUT WHEN WE TALK ABOUT DISTRIBUTED SYSTEMS ALVARO - PowerPoint PPT Presentation

WHAT WE TALK ABOUT WHEN WE TALK ABOUT DISTRIBUTED SYSTEMS ALVARO VIDELA DISTRIBUTED SYSTEMS FOR THE IKEA FAMILY ALVARO VIDELA HTTP://BIT.LY/DIST-SYS101 @HINTJENS DISTRIBUTED SYSTEMS A DISTRIBUTED SYSTEM IS ONE IN WHICH THE FAILURE


  1. WHAT WE TALK ABOUT WHEN WE TALK ABOUT DISTRIBUTED SYSTEMS ALVARO VIDELA

  2. DISTRIBUTED SYSTEMS FOR THE IKEA FAMILY ALVARO VIDELA

  3. HTTP://BIT.LY/DIST-SYS101

  4. @HINTJENS

  5. DISTRIBUTED SYSTEMS

  6. “A DISTRIBUTED SYSTEM IS ONE IN WHICH THE FAILURE OF A COMPUTER YOU DID NOT EVEN KNOW EXISTED CAN RENDER YOUR OWN COMPUTER UNUSABLE” Leslie Lamport

  7. Google: define jargon

  8. DISTRIBUTED SYSTEMS

  9. DISTRIBUTED SYSTEMS • Many entities trying to solve a problem (nodes, processes)

  10. DISTRIBUTED SYSTEMS • Many entities trying to solve a problem (nodes, processes) • Partial Knowledge

  11. DISTRIBUTED SYSTEMS • Many entities trying to solve a problem (nodes, processes) • Partial Knowledge • Uncertainty

  12. DEEP RABBIT HOLE

  13. WHAT TO READ?

  14. WHICH PAPERS?

  15. WHICH BOOKS?

  16. WHY?

  17. http://tobielangel.com

  18. THE PROBLEM

  19. DIFFERENT MODELS

  20. DIFFERENT MODELS • Timing Model

  21. DIFFERENT MODELS • Timing Model • Inter Process Communication Used (IPC method)

  22. DIFFERENT MODELS • Timing Model • Inter Process Communication Used (IPC method) • Failure Modes

  23. TIMING MODEL

  24. TIMING MODEL • Synchronous Model

  25. TIMING MODEL • Synchronous Model • Asynchronous Model

  26. TIMING MODEL • Synchronous Model • Asynchronous Model • Semi-synchronous Model

  27. INTERPROCESS COMMUNICATION

  28. INTERPROCESS COMMUNICATION • Message Passing

  29. INTERPROCESS COMMUNICATION • Message Passing • Shared Memory

  30. FAILURE MODES

  31. FAILURE MODES • Crash-stop

  32. FAILURE MODES • Crash-stop • Crash-recovery

  33. FAILURE MODES • Crash-stop • Crash-recovery • Omission Faults

  34. FAILURE MODES • Crash-stop • Crash-recovery • Omission Faults • Arbitrary Failures Mode (Byzantine)

  35. LIVENESS AND SAFETY

  36. LIVENESS AND SAFETY PROPERTIES OF ALGORITHMS

  37. SAFETY Some “bad” thing does not happens during execution

  38. SAFETY “Communication links should not invent messages out of thin air”

  39. LIVENESS A “good” thing happens during execution

  40. LIVENESS “A destination process eventually delivers the message”

  41. LET’S TAKE A LOOK 1 AT FLP 1 - Fischer, Lynch, Paterson

  42. IMPOSSIBILITY OF DISTRIBUTED CONSENSUS WITH ONE FAULTY PROCESS

  43. IMPOSSIBILITY OF DISTRIBUTED CONSENSUS WITH ONE FAULTY PROCESS

  44. IMPOSSIBILITY OF DISTRIBUTED CONSENSUS WITH ONE FAULTY PROCESS

  45. IMPOSSIBILITY OF DISTRIBUTED CONSENSUS WITH ONE FAULTY PROCESS

  46. IMPOSSIBILITY OF DISTRIBUTED CONSENSUS WITH ONE FAULTY PROCESS

  47. WHAT’S CONSENSUS ANYWAY?

  48. “THE CONSENSUS PROBLEM IS A PARADIGM OF AGREEMENT PROBLEMS” https://dl.acm.org/citation.cfm?id=1052796.1052806

  49. PROPERTIES OF CONSENSUS

  50. PROPERTIES OF CONSENSUS C-Termination : Every correct process eventually decides on some value •

  51. PROPERTIES OF CONSENSUS C-Termination : Every correct process eventually decides on some value • C-Validity : If a process decides v , then v was proposed by some process •

  52. PROPERTIES OF CONSENSUS C-Termination : Every correct process eventually decides on some value • C-Validity : If a process decides v , then v was proposed by some process • C-Agreement : No two correct processes decide differently •

  53. PROPERTIES OF UNIFORM CONSENSUS C-Termination : Every correct process eventually decides on some value • C-Validity : If a process decides v , then v was proposed by some process • C-Agreement : No two correct processes decide differently • C-Uniform Agreement : No two processes (correct or not) decide • differently.

  54. WE NEED CONSENSUS WHEN: A SET OF PROCESSES HAVE TO AGREE TO TAKE A COMMON ACTION

  55. WE NEED CONSENSUS WHEN: A SET OF PROCESSES HAVE TO AGREE TO TAKE A COMMON ACTION Atomic Broadcast

  56. WE NEED CONSENSUS WHEN: A SET OF PROCESSES HAVE TO AGREE TO TAKE A COMMON ACTION Atomic Group Broadcast Membership

  57. ATOMIC BROADCAST “CORRECT PROCESSES DELIVER THE SAME SET OF MESSAGES IN THE SAME ORDER”

  58. FLP TELLS US THAT IF CONSENSUS CANNOT BE ACHIEVED, THEN ATOMIC BROADCAST OR GROUP MEMBERSHIP CANNOT BE ACHIEVED EITHER

  59. SO, WE PACK OUR BAGS AND GO? NOTHING TO SEE HERE?

  60. STUMBLING OVER CONSENSUS RESEARCH: MISUNDERSTANDING AND ISSUES Marcos K. Aguilera

  61. FAILURE DETECTORS

  62. FAILURE DETECTORS

  63. FAILURE DETECTORS • External process

  64. FAILURE DETECTORS • External process • Provides information about suspected processes

  65. FAILURE DETECTORS • External process • Provides information about suspected processes • Completeness property (crashed processes are detected)

  66. FAILURE DETECTORS • External process • Provides information about suspected processes • Completeness property (crashed processes are detected) • Accuracy (correct process are never suspected)

  67. “RUB SOME PERFECT FAILURE DETECTOR ON IT”

  68. PERFECT FAILURE DETECTOR http://www.amazon.com/Introduction-Reliable-Secure- Distributed-Programming/dp/3642152597

  69. EVENTUALLY ACCURATE FAILURE DETECTOR

  70. EVENTUALLY ACCURATE FAILURE DETECTOR • Strong Completeness : Eventually, every process that crashes is permanently suspected by every correct process.

  71. EVENTUALLY ACCURATE FAILURE DETECTOR • Strong Completeness : Eventually, every process that crashes is permanently suspected by every correct process. • Eventual Weak Accuracy : There is a time after which some correct process is never suspected by the correct processes.

  72. EVENTUALLY ACCURATE FAILURE DETECTOR • Strong Completeness : Eventually, every process that crashes is permanently suspected by every correct process. • Eventual Weak Accuracy : There is a time after which some correct process is never suspected by the correct processes. http://dl.acm.org/citation.cfm?id=1052806

  73. QUORUMS

  74. TL;DR: INTERSECTING SETS

  75. QUORUMS “A QUORUM IN A SYSTEM WITH N CRASH-FAULT PROCESS ABSTRACTIONS […] IS ANY MAJORITY OF PROCESSES, I.E., ANY SET OF MORE THAN N/2 PROCESSES”

  76. QUORUMS “IF F < N/2 PROCESSES FAIL BY CRASHING, THERE IS ALWAYS AT LEAST ONE QUORUM OF NONCRASHED PROCESSES IN SUCH SYSTEMS”

  77. QUORUMS A - B - C - D - E

  78. QUORUMS A - B - C - D - E

  79. QUORUMS A - B’ - C - D’ - E

  80. QUORUMS A - B’ - C - D’ - E

  81. QUORUMS A - B’ - C’ - D’ - E’

  82. QUORUMS A - B’ - C’ - D’ - E’

  83. CONSISTENCY

  84. CONCURRENT FIFO QUEUE

  85. CONSISTENCY CONDITIONS

  86. CONSISTENCY CONDITIONS • Atomic Consistency (Linearizabilty)

  87. CONSISTENCY CONDITIONS • Atomic Consistency (Linearizabilty) • Sequential Consistency

  88. CONSISTENCY CONDITIONS • Atomic Consistency (Linearizabilty) • Sequential Consistency • Causal Consistency

Recommend


More recommend