beyond replicated storage eventually consistent
play

Beyond Replicated Storage: Eventually-Consistent Distributed Data - PowerPoint PPT Presentation

Beyond Replicated Storage: Eventually-Consistent Distributed Data Structures Konrad Iwanicki University of Warsaw PaPEC 2014, Amsterdam, the Netherlands, April 13th, 2014 What we do Extreme distributed systems What we do Extreme


  1. Beyond Replicated Storage: Eventually-Consistent Distributed Data Structures Konrad Iwanicki University of Warsaw PaPEC 2014, Amsterdam, the Netherlands, April 13th, 2014

  2. What we do ● Extreme distributed systems

  3. What we do ● Extreme distributed systems ● Based on wireless sensor networks

  4. What we do ● Extreme distributed systems ● Based on wireless sensor networks: – Hundreds or even thousands of nodes in a network – A single node is severely constrained in resources

  5. Extreme distributed systems ● More complex than sense-and-send: ● Sensing ● Analyzing and deciding ● Actuating

  6. Extreme distributed systems ● More complex than sense-and-send: ● Sensing ● Analyzing and deciding collaborative ● Actuating

  7. Extreme distributed systems ● More complex than sense-and-send: ● Sensing ● Analyzing and deciding collaborative ● Actuating ● Subject to various challenges: ● Resource constraints ● Unreliable communication ● Interactions with the surrounding environment

  8. Extreme distributed systems ● More complex than sense-and-send: ● Sensing ● Analyzing and deciding collaborative ● Actuating ● Subject to various challenges: ● Resource constraints ● Unreliable communication ● Interactions with the surrounding environment ● Distributed algorithms are increasingly complex ➔ e.g., employ specific organizations.

  9. Cluster hierarchy Wireless connectivity between nodes.

  10. Cluster hierarchy M D H J P A O N E L F R B G Q C K Each node forms a level-0 cluster of which it becomes the head .

  11. Cluster hierarchy I.H M.H D.D H.H J.D P.L A.L O.H N.H E.G L.L F.H R.G B.G G.G Q.G C.G K.G Proximate level-0 clusters are grouped into level-1 clusters.

  12. Cluster hierarchy I.H.G M.H.G D.D.G H.H.G J.D.G P.L.G A.L.G O.H.G N.H.G E.G.G L.L.G F.H.G R.G.G B.G.G G.G.G Q.G.G C.G.G K.G.G And so on at higher levels, typically until a single cluster remains.

  13. Cluster hierarchy I.H.G M.H.G D.D.G H.H.G J.D.G P.L.G A.L.G O.H.G N.H.G E.G.G L.L.G F.H.G R.G.G B.G.G G.G.G Q.G.G C.G.G K.G.G The membership of a node in the hierarchy is reflected in the node’s label .

  14. Cluster hierarchy I.H.G M.H.G D.D.G H.H.G J.D.G P.L.G A.L.G O.H.G N.H.G E.G.G L.L.G F.H.G R.G.G B.G.G G.G.G Q.G.G C.G.G K.G.G Each node also maintains information for each sibling cluster in the hierarchy (e.g., a routing entry ).

  15. The problem ● Using the hierarchy is relatively easy: ● Routing ● Aggregation ● In-network storage ● Maintaining it is a different story. ● Connectivity changes ● Node failures & arrivals ● Nodes should be autonomous

  16. General scheme – gossiping ● Each node maintains its state which it occasionally updates. ● For communication: ● Each node operates in rounds. ● In each round, it broadcasts its state to its neighbors. ● It also receives the neighbors' states, which it merges with its own one. Tx Rx time a round

  17. Observation ● Gossiping can be efficient

  18. Observation ● Gossiping can be efficient, but... ● … it makes it difficult to control when a bit of information reaches a particular node.

  19. Observation ● Gossiping can be efficient, but... ● … it makes it difficult to control when a bit of information reaches a particular node. ● We have: ● Updates done by nodes ● Lazy update propagation

  20. Observation ● Gossiping can be efficient, but... ● … it makes it difficult to control when a bit of information reaches a particular node. ● We have: ● Updates done by nodes Resemblance to eventually-consistent ● Lazy update propagation replicated storage systems.

  21. Observation ● Gossiping can be efficient, but... ● … it makes it difficult to control when a bit of information reaches a particular node. ● We have: ● Updates done by nodes Resemblance to eventually-consistent ● Lazy update propagation replicated storage systems. Let's thus take a look at the problem of cluster hierarchy maintenance from the eventual consistency perspective.

  22. EC perspective ● We treat the cluster hierarchy as a distributed structure. ● The sate of each node ● label ● routing table is a part of this structure. ● Each node can autonomously update its local state: ● Locally altering the structure. ● The updates propagate through gossiping: ● Eventually the structure becomes consistent globally.

  23. EC perspective I.H.G M.H.G D.D.G H.H.G J.D.G P.L.G A.L.G O.H.G N.H.G E.G.G L.L.G F.H.G R.G.G B.G.G G.G.G Q.G.G C.G.G K.G.G Consider node labels.

  24. EC perspective G L G D H A L P B C E G K Q R D J F H I M N O They can be viewed as a distributed tree.

  25. EC perspective ● What is different from the “traditional” model? ● The state of each node is not a replica . ● On the contrary: – Some of its parts are unique. – Some are replicated at other nodes (to a varying degree). ● On the global scale the states of all nodes should form a coherent structure.

  26. EC perspective Logical view: G L G D H A L P B C E G K Q R D J F H I M N O

  27. EC perspective Physical view: G G G G G G G G G G G G G G G G G G L L L G G G G G G G D D H H H H H H A L P E G K Q C R B D J F H I M N O A L P B C E G K Q R D J F H I M N O

  28. EC perspective Physical view: G G G G G G G G G G G G G G G G G G L L L G G G G G G G D D H H H H H H A L P E G K Q C R B D J F H I M N O unique A L P B C E G K Q R D J F H I M N O information

  29. EC perspective Physical view: replicated information G G G G G G G G G G G G G G G G G G L L L G G G G G G G D D H H H H H H A L P E G K Q C R B D J F H I M N O unique A L P B C E G K Q R D J F H I M N O information

  30. EC perspective Physical view: When this changes at one node, the other nodes must update their state accordingly replicated information G G G G G G G G G G G G G G G G G G L L L G G G G G G G D D H H H H H H A L P E G K Q C R B D J F H I M N O unique A L P B C E G K Q R D J F H I M N O information

  31. EC perspective Physical view: When this changes at one node, the other nodes must update their state accordingly, but ● Updates can be concurrent ● They are often not independent ● Propagate lazily ● (Think of also about all the limitations of the nodes) replicated information G G G G G G G G G G G G G G G G G G L L L G G G G G G G D D H H H H H H A L P E G K Q C R B D J F H I M N O unique A L P B C E G K Q R D J F H I M N O information

  32. EC-related challenges ● How to decide that a given piece of the distributed structure should be updated? ● How such updates should be performed and which node(s) should do them? ● How can other nodes detect and merge the updates to their corresponding pieces of the distributed structure? ● (How to do this under constrained resources?)

  33. Our solution ● Details, for instance, in: ● K. Iwanicki and M. van Steen. “Gossip-based self- management of a recursive area hierarchy for large wireless sensornets.” IEEE Transactions on Parallel and Distributed Systems , 21(4):562–576, April 2010. or ● K. Iwanicki. “Hierarchical Routing in Low-Power Wireless Networks.” PhD thesis , Vrije Universiteit Amsterdam, Amsterdam, the Netherlands, June 2010.

  34. Our solution – overview ● Formalize the properties of a hierarchy as invariants, e.g.: 1. Level-0 clusters correspond to individual nodes. 2. There exists a single top-level cluster. 3. Level-i+1 clusters are composed out of level-i clusters. 4. Each level-i+1 cluster has a central subcluster that is adjacent to all other subclusters of the cluster. ● Maintaining a hierarchy = detecting and eliminating violations of the invariants .

  35. Our solution – overview ● The invariants are global ➔ Have to maintained collaboratively by the nodes. ● A node's state is local ➔ Each node is concerned only with those invariants that are relevant to its part of the distributed structure. ● Eliminating a violation: = local update operation ● Propagating the update: = eventually-consistent gossiping.

  36. Our solution - example Y Y Y Y Y X Y X Y X Y X C i C i C i C i C i C i C i C i X Y X X Y Y X Y label extension label cut Local operations for maintaining labels.

  37. Our solution - example ● Our label: ● P.L.G

  38. Our solution - example ● Our label: ● P.L.G ● The label received in a gossip message: ● A.L.D

  39. Our solution - example ● Our label: ● P.L.G ● The label received in a gossip message: ● A.L.D ● What should we do?

  40. Our solution - example ● Our label: ● P.L.G ● The label received in a gossip message: ● A.L.D ● What should we do: ● leave our label as is, or ● change it to P.L.D?

  41. Take-home message ● Eventual consistency can offer lots of benefits to extreme distributed systems. ● Distributed data structures appear also in other fields. ● Eventually-consistent distributed data structures are poorly understood.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend