Replicated Dictionary and Log

Slides:



Advertisements
Similar presentations
1 Process groups and message ordering If processes belong to groups, certain algorithms can be used that depend on group properties membership create (
Advertisements

Chapter 12 Message Ordering. Causal Ordering A single message should not be overtaken by a sequence of messages Stronger than FIFO Example of FIFO but.
Global States.
Global States and Checkpoints
Last Class: Clock Synchronization
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
Logical Clocks.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 4 Instructor: Haifeng YU.
Uncoordinated Checkpointing The Global State Recording Algorithm.
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
CS542 Topics in Distributed Systems Diganta Goswami.
/ PSWLAB Efficient Decentralized Monitoring of Safety in Distributed System K Sen, A Vardhan, G Agha, G Rosu 20 th July 2007 Presented by.
Transaction.
Efficient Solutions to the Replicated Log and Dictionary Problems
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Issues with Clocks. Problem Lack of global time –Need to compare different events in a distributed system.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Remote Backup Systems.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Data Warehouse View Maintenance Presented By: Katrina Salamon For CS561.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
Chapter 5.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
MUTUAL EXCLUSION AND QUORUMS CS Distributed Mutual Exclusion Given a set of processes and a single resource, develop a protocol to ensure exclusive.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
CS5204 – Operating Systems 1 Checkpointing-Recovery.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
“Virtual Time and Global States of Distributed Systems”
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Distributed Systems Fall 2010 Logical time, global states, and debugging.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
CIS825 Lecture 2. Model Processors Communication medium.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica.
CS603 Clock Synchronization February 4, What is Clock Synchronization? All nodes agree on time What do we mean by time? –Monotonic –Any observation.
CS 3471 CS 347: Parallel and Distributed Data Management Notes13: Time and Clocks.
EFFICIENT SOLUTION TO REPLICATED LOG AND DICTIONARY PROBLEM. (Gene T.J. Wuu & Arthur J. Bernstein.) Presented By : Megha Priyanka.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
Distributed Systems Lecture 6 Global states and snapshots 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Remote Backup Systems.
Consistency and Replication
SYNCHORNIZATION Logical Clocks.
EECS 498 Introduction to Distributed Systems Fall 2017
EECS 498 Introduction to Distributed Systems Fall 2017
Logical Clocks and Casual Ordering
Event Ordering.
Chapter 5 (through section 5.4)
Remote Backup Systems.
Presentation transcript:

Replicated Dictionary and Log CS 271

Replicated dictionary problem Efficient solutions to the replicated log and dictionary problems. Wuu and Bernstein PODC 84. Replication is a fundamental method for fault-tolerance. Replication is also used for performance. Dictionary is a common data structure which is often fully replicated on all sites. CS 271

Basic assumptions Very general: Sites may crash, links may fail, partitioning. Each site maintains a local clock (a counter). Use Lamport’s event execution model and happens-before relation. CS 271

The log problem Each site maintains a copy of the log. The log contains local events, i.e., insert delete The goal of the algorithm is to keep all copies of the log up to date. Li is the copy of the log at site i. L(e) is the contents of log Lnode(e) immediately after event e is executed. CS 271

 events e,f: if f e then f is in L(e) The log problem Log Problem: find an algorithm that maintains the log such that given an execution <E, >,  events e,f: if f e then f is in L(e) General approach: For each local event, insert a record in the local log. Exchange logs to update other sites Main question: when to exchange logs? With application communication to capture the happens before relation. CS 271

Solutions to the log problem A solution: Site i sends to site j all records in the log that were inserted since i last sent a message to j. WHY INCORRECT? Another solution: each site i includes its log Li with each message. On receiving a message, a site j incorporates all new event records. BAD: Entire log sent with each message Entire log kept at each node. CS 271

Efficient solution for log problem Observation 1: Once i “knows” that j “knows” of an event e (which may have occurred on site k), then i does not need to include event e in messages to j. Observation 2: Once i “knows” that all sites “know” about an event e, then i does not need to keep a record of e in its local log. CS 271

2 Dimensional Time-Table TTi[n,n]: if TTi[j,k] = t, then site i knows that site j has learned of all events that occurred at site k up to time t. k j t CS 271

The 2 dimensional timetable site j might actually know about more events, but site i may not be aware of it. TTi[i,i] is the value of clock at site i. TTi[i,k] is the value of clock at site k of the most recent event at site k that site i is aware of. CS 271

Two dimensional timetable Let hasrec(TTi, e, k) be true iff TTi[k,node(e)] >= time(e) The algorithm must guarantee that if hasrec(TTi, e, k) is true, then site k has learned of event e. Note: site i need not send a record of event e to site k if hasrec(TTi, e, k) is true. CS 271

Log maintenance Initialize all entries in TT to 0. For each local operation, insert a copy in the local log. With each send operation from site i to site k: piggyback TT+ the following subset of the local log Li: all records e such that hasrec(TTi, e, k) is not true. On receipt of a message from site k by site i: incorporate all new events into local log update TT: Max of all elements Max of times in local i’th row and remote k’th row. CS 271

⌐ site j such that hasrec(TTi, e, j) is not true Dictionary problem Assume we want to maintain a replicated dictionary with insert, delete and lookup. On receipt of a message with partial log & TT: Update local copy of the dictionary Update local copy of TT as before Garbage collect local log from any records that correspond to events e such that ⌐ site j such that hasrec(TTi, e, j) is not true CS 271

Take home Highlights (Replicated dictionary and log) Causality as a correctness criterion for replication. Capturing transitive knowledge in a matrix Use of a log for maintaining dictionary. Garbage collection. CS 271