1 / 26

Efficient Solutions to the Replicated Log and Dictionary Problems

Efficient Solutions to the Replicated Log and Dictionary Problems. By Gene T J Wuu and Arthur J Bernstein Sunita Gupta, COEN 317, Spring 05. Outline. Introduction The model of the environment The Log Problem and its Application The Log Problem The Dictionary Problem Efficient Solutions

chessa
Download Presentation

Efficient Solutions to the Replicated Log and Dictionary Problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Efficient Solutions to the Replicated Log and Dictionary Problems By Gene T J Wuu and Arthur J Bernstein Sunita Gupta, COEN 317, Spring 05

  2. Outline • Introduction • The model of the environment • The Log Problem and its Application • The Log Problem • The Dictionary Problem • Efficient Solutions • A New Solution to the Log Problem • A Efficient Solution to the Dictionary Problem • Comparison with other work • Some Applications

  3. Introduction • In this paper, authors propose efficient algorithms to maintain a replicated dictionary in an unreliable distributed system using log. • Replicated log is used to achieve mutual consistency of replicated data in an unreliable network.

  4. Introduction (cont’) • Data replication In many application, data objects are highly shared & reliability and fast access are very important. • Logs Useful in achieving distributed synchronization and in gathering information about the state of the network

  5. The model of the environment • An n node connected Network with nodes N1, N2,.., Nn. • A node id – an integer in [n] denote set {1,2,..n} • Two kinds of operations – the communication operation send and receive, and non communication operations • Events are locally atomic ( i.e. if a node crashes during the execution of an operation, there will be not effect on local data) • Events are distinguished by the time and place at which they occur.

  6. The model of the environment(Cont’) • There is local clock at each node • time(e) – time of event e • Node(e) – node at which event e occurred • Op(e) – invoked operations and its parameters • <E, → > a partial ordering relation on E • Partial ordering relation – events occurring at the same node are totally ordered and e1→ e2 – e1 send event and e2 – corresponding receive event

  7. The model of the environment(Cont’) • The unreliable behaviors covered by this model – lost messages, broken communication links, network partition, and failed nodes • Message in transmit not allowed to change in arbitrary ways.

  8. The Log Problem and its application • Each Node maintains its own view of the log • a distribution algorithm is employed to keep the view up to date.

  9. The Log Problem • Problem of finding an algorithm to maintain the log such that, given an execution < E, → >, for every event e, f → e iff fR є L(e)

  10. The Log Problem (Cont’) f → e iff fR є L(e) --- P1 • Event f happened before event e iff event record describing event f is propagated to local copy of log of Node(e) immediately after event e completes. • event record – contains operation type, time type and Node Id.

  11. The Log Problem (Cont’) • To achieve P1, node exchange messages containing appropriate portion of the log. E.g. • Consider Node N1 and N2 • N1 only sends records to those events which have occurred at N1 since it last sent a message to N2 (updated one) • Cannot achieve P1 – message delivery is not guaranteed.

  12. The Log Problem (Cont’) • Trivial solution: • At each non-communication event, e, occurring at Ni, Ni inserts eR into Li, and at each send event Ni includes Li in the message.

  13. The Dictionary Problem • Dictionary – an abstraction of data objects (file directory), a data base dictionary, a recourse management table • Two non-communication operations on dictionary x – • delete(x) • insert(x) • For Uniquness of each entry – tag each item to be inserted with time stamp.

  14. The Dictionary Problem (Cont’) • Problem of finding an algorithm for maintaining the dictionary such that, given an execution < E, →>, for every event e, x є V(e) iff Cx → e and there does not exist an x-delete event g, such that g → e.

  15. The Dictionary Problem (Cont’) x є V(e) iff Cx → e and there does not exist an x-delete event g, such that g → e --- P2 • Dictionary entry x is a part of local copy of dictionary at Node(e) iff the unique event Cx which inserts x happened before event e and there is no x-delete event g before event e occurred.

  16. The Dictionary Problem (Cont’) • Obvious solution: • At each event, e, such that node(e) = i, Ni computed V(e) in the following way:

  17. Efficient solutions • Problem with previous solution: • Excessive communication cost • Excessive computational cost • Excessive storage cost

  18. A New Solution to the Log Problem • 2-Dimension Time Table(2DTT) • Used by each node • Each Node Ni keeps a two-dimensional time-table Ti , which corresponds to Ni's most recent knowledge of the vector clocks. • Can tell how up to date other nodes are about events occurring in the network

  19. A New Solution to the Log Problem (Cont’) • Node maintains following information: • A service called clocki – each reference to clocki returns an integer number greater than that returned by the last reference. • 2-Dimension time table Ti – Each time-table ensures the following time- table property • Ti[k, u] = t, Ni node knows that Nk node has received the records of all events which have occurred at Nu up to t.

  20. A New Solution to the Log Problem (Cont’) • To reduce communication it is desirable for a Node to know which node have received the record of a particular event. To this end a predicate HasRec, is defined as follows : HasRec(Ti;eR;k) = Ti[k;eR.node] >= eR.time. where if hasrec function is true at Ni then Nk has learned about event e. • The protocol ensures that whenever a site is aware of an event (insert or delete in the dictionary), it is aware of all causally proceeding events.

  21. An efficient Solution to the Dictionary Problem • Developed to overcome excessive computational costs and excessive storage cost • Each node separately maintains its view of the dictionary as well as partial log which records some events which have happened in the network. • Only partial log is kept at each node.

  22. An efficient Solution to the Dictionary Problem (Cont’) • If the communication link between two node breaks or message is lost, node can still learn indirectly, of a new event using information passed through other nodes. • We assume that the state of node is maintained in stable storage and data is not lost when a crash occurs.

  23. Comparison with Other Work 1. Fishers and Michael – Solution requires a node to send its entire copy of the dictionary in each message. Solution is expensive. 2. 1- dimension time table – Each node maintains synchronization set and node sends event record to other node even though node learnt about the event. Thus SS grows unboundedly.

  24. Comparison with Other Work • 2-DTT – Deficient of approach - it is sent as a part of message => has size O(n^2) excessive storage and communication overhead. • Modified algorithm: • Each node stores the complete 2DTT but sends only its own row. • Each node stores only its own row and a row for each of its neighbors; it sends only those rows which correspond to neighbors of the target node. • Each node stores only its neighbors rows and neighbors columns; it sends only those rows to node which correspond to neighbors of that node.

  25. Some applications uses Log solution • Replicated numeric data with add-to and subtract-from operations. • Detection of failure – Log is used to collect records of communication events occuring in the network.

  26. References • Partial Database Replication using Epidemic Communication by J Holliday, D Agrawal, A Abbadi • Class Notes

More Related