Papers we Love PDX

Papers we Love PDX

Detection of Mutual Inconsistency in Distributed Systems

9128d500301ae51524e887bb680f471d?s=128

Caitie McCaffrey

June 28, 2016
Tweet

Transcript

  1. Detection of Mutual Inconsistency in Distributed Systems Papers We Love

    PDX - June 2016
  2. Caitie McCaffrey @caitie Distributed Systems Engineer caitiem.com

  3. 1983

  4. None
  5. None
  6. None
  7. None
  8. Replication for Availability

  9. “In some environments it is desirable or necessary to permit

    users to continue modifying resources such as files when the network is partitioned”
  10. “Files are not stored redundantly but are kept on removable

    storage media which can be carried around during prolonged partitions. Thus availability & consistency are simultaneously achieved” Disk Toting
  11. The Partitioning Problem

  12. The Partitioning Problem

  13. The Partitioning Problem

  14. The Partitioning Problem

  15. How Do We Detect Inconsistencies? The Partitioning Problem

  16. Paper Goals Do Not Restrict Availability of Systems during Partition

    Effectively Detect Mutual Inconsistencies
  17. Origin Points Version Vectors &

  18. Origin Points • System wide unique identifier generated when the

    file is created • Immutable attribute of the file • Suggested: Creation Time & Creation Site Pair • Detect Name Conflicts
  19. Name Conflicts B A

  20. Name Conflicts B A

  21. Name Conflicts B A Conflict!

  22. Version Conflicts C C

  23. Version Conflicts C C

  24. Version Conflicts C C

  25. Version Conflicts C C Origin Points are Not Enough

  26. What about TimeStamps?

  27. Version Conflicts T0 T0

  28. Version Conflicts T0 T0

  29. Version Conflicts T0 T0 No Conflict!

  30. Version Conflicts T0 T0

  31. Version Conflicts T0 T1

  32. Version Conflicts T0 T1

  33. Version Conflicts T1 T1 No Conflict!

  34. “Each partition can break into sub partitions and/or merge with

    other partitions many times before the entire network finally becomes connected” The Partition Problem
  35. ABCD Partition Graph T0

  36. ABCD AB CD Partition Graph T0 T0 T0

  37. ABCD AB CD Partition Graph T0 T0 T1 T2

  38. ABCD AB CD D BC A Partition Graph T0 T0

    T0 T1 T1
  39. ABCD AB CD D BC A Partition Graph T0 T0

    T0 T1 T1 No Conflict! T1
  40. ABCD AB CD D BC A Partition Graph T0 T0

    T0 T1 T1 T2
  41. ABCD AB CD D BC A BCD Partition Graph T0

    T0 T0 T1 T1 T2
  42. ABCD AB CD D BC A BCD Partition Graph T0

    T0 T0 T1 T1 T2 Conflict!
  43. ABCD AB CD D BC A BCD Partition Graph T0

    T0 T0 T2 T1 T3 T2
  44. ABCD AB CD D BC A BCD ABCD Partition Graph

    T0 T0 T0 T2 T1 T3 T2 T2
  45. ABCD AB CD D BC A BCD ABCD Partition Graph

    T0 T0 T0 T2 T1 T3 T2 T2 Conflict!
  46. “What is more difficult is to find a mechanism which

    detects version conflicts only when they are real”
  47. Version Vectors “A Version Vector for a file f is

    a sequence of n pairs, where n is the number of sites at which f is stored … the ith vector entry counts the number Vi of updates to f made at site Si” <A:9, B:7, C:22, D:3>
  48. Compatible Version Vectors <A:1, B:2, C:4, D:3> <A:0, B:2, C:2,

    D:3>
  49. Incompatible Version Vectors <A:1, B:2, C:4, D:3> <A:1, B:2, C:3,

    D:4>
  50. Version Vectors • For each update of f on site

    Si we increment the Sith component of the version vector • When conflicts are reconciled the Max Sith entry is set in the version vector • Version vectors encode the partial order defined by the partition graph
  51. ABCD Partition Graph <A:0, B:0, C:0, D:0>

  52. ABCD AB CD Partition Graph <A:0, B:0, C:0, D:0> <A:0,

    B:0, C:0, D:0> <A:0, B:0, C:0, D:0>
  53. ABCD AB CD Partition Graph <A:0, B:0, C:0, D:0> <A:0,

    B:0, C:0, D:0> <A:1, B:0, C:0, D:0>
  54. ABCD AB CD D BC A Partition Graph T2 <A:0,

    B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:1, B:0, C:0, D:0>
  55. ABCD AB CD D BC A Partition Graph T2 <A:0,

    B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> No Conflict!
  56. ABCD AB CD D BC A Partition Graph T2 <A:0,

    B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:1, B:0, C:0, D:0>
  57. ABCD AB CD D BC A Partition Graph T2 <A:0,

    B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0>
  58. ABCD AB CD D BC A BCD Partition Graph T2

    <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0>
  59. ABCD AB CD D BC A BCD Partition Graph T2

    <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0> No Conflict!
  60. ABCD AB CD D BC A BCD Partition Graph T2

    <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0> <A:1, B:0, C:1, D:0>
  61. ABCD AB CD D BC A BCD Partition Graph T2

    <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0> <A:1, B:0, C:1, D:0> ABCD
  62. ABCD AB CD D BC A BCD ABCD Partition Graph

    T2 <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:0, B:0, C:0, D:0> <A:1, B:0, C:0, D:0> <A:2, B:0, C:0, D:0> <A:1, B:0, C:1, D:0> <A:1, B:0, C:1, D:0> Conflict!
  63. Conflict Resolution “A conflict detection mechanism, while valuable, has increased

    effect if there is also a method for reconciling conflicts automatically”
  64. Conflict Resolution “Clearly, conflict reconciliation must take into account the

    semantics of the operations which were done to the data object in conflict”
  65. 1995

  66. 2011

  67. Thank You! @caitie

  68. Image Credits • https://thenounproject.com/search/?q=laptop +user&i=512528 • https://thenounproject.com/term/user/512525/ • https://thenounproject.com/search/? q=database&i=9658