Gossip and its application Presented by Anna Kaplun.

Slides:



Advertisements
Similar presentations
ON THE COMPLEXITY OF ASYNCHRONOUS GOSSIP Presented by: Tamar Aizikowitz, Spring 2009 C. Georgiou, S. Gilbert, R. Guerraoui, D. R. Kowalski.
Advertisements

Fault Tolerance. Basic System Concept Basic Definitions Failure: deviation of a system from behaviour described in its specification. Error: part of.
Leader Election Breaking the symmetry in a system.
Global States.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Chapter 6 - Convergence in the Presence of Faults1-1 Chapter 6 Self-Stabilization Self-Stabilization Shlomi Dolev MIT Press, 2000 Shlomi Dolev, All Rights.
Lecture 8: Asynchronous Network Algorithms
BASIC BUILDING BLOCKS -Harit Desai. Byzantine Generals Problem If a computer fails, –it behaves in a well defined manner A component always shows a zero.
Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services Authored by: Seth Gilbert and Nancy Lynch Presented by:
Service Models Example Server has 50 movies, 100 min. each Request rate: 1 movie/min Max. capacity: 20 streams Random Access Model –Case 1: after 20 movies,
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Is 1 different from 12? Eli Gafni UCLA Eli Gafni UCLA.
Clock Synchronization. Problem 5:33 5:57 5:20 4:53 6:01.
Computer Science 425 Distributed Systems CS 425 / ECE 428 Consensus
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Gossip Algorithms and Implementing a Cluster/Grid Information service MsSys Course Amar Lior and Barak Amnon.
Distributed Programming for Dummies A Shifting Transformation Technique Carole Delporte-Hallet, Hugues Fauconnier, Rachid Guerraoui, Bastian Pochon.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Byzantine Generals Problem Anthony Soo Kaim Ryan Chu Stephen Wu.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
Josef WidderBooting Clock Synchronization1 The  - Model, and how to Boot Clock Synchronization in it Josef Widder Embedded Computing Systems Group
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Chapter Resynchsonous Stabilizer Chapter 5.1 Resynchsonous Stabilizer Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of Jan 2004, Shlomi.
Knight’s Tour Distributed Problem Solving Knight’s Tour Yoav Kasorla Izhaq Shohat.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Lecture 6: Introduction to Distributed Computing.
Distributed Computing 5. Synchronization Shmuel Zaks ©
Evaluating the Running Time of a Communication Round over the Internet Omar Bakr Idit Keidar MIT MIT/Technion PODC 2002.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
“Revisiting Fault Diagnosis Agreement in a New Territory” S. C. Wang and K. Q. Yan Operating Systems Review, April 2004, p. 41– 61. An extension of the.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Ch11 Distributed Agreement. Outline Distributed Agreement Adversaries Byzantine Agreement Impossibility of Consensus Randomized Distributed Agreement.
1 Lectures on Parallel and Distributed Algorithms COMP 523: Advanced Algorithmic Techniques Lecturer: Dariusz Kowalski Lectures on Parallel and Distributed.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Bulk Synchronous Processing (BSP) Model Course: CSC 8350 Instructor: Dr. Sushil Prasad Presented by: Chris Moultrie.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 8 Instructor: Haifeng YU.
1 Chapter 12 Consensus ( Fault Tolerance). 2 Reliable Systems Distributed processing creates faster systems by exploiting parallelism but also improve.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
Leader Election. Leader Election: the idea We study Leader Election in rings.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
CIS825 Lecture 2. Model Processors Communication medium.
Pipelining and Retiming
Chap 15. Agreement. Problem Processes need to agree on a single bit No link failures A process can fail by crashing (no malicious behavior) Messages take.
Reaching Agreement in the Presence of Faults M. Pease, R. Shotak and L. Lamport Sanjana Patel Dec 3, 2003.
Iterative Byzantine Vector Consensus in Incomplete Graphs Nitin Vaidya University of Illinois at Urbana-Champaign ICDCN presentation by Srikanth Sastry.
Distributed Systems Topic 5: Time, Coordination and Agreement
Agreement in Distributed Systems n definition of agreement problems n impossibility of consensus with a single crash n solvable problems u consensus with.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Doc.:IEEE /0129r1 January 2012 S.Abraham, Qualcomm Inc Short Beacon Slide 1 Authors:
Distributed Algorithms for Network Diameter David Peleg, Liam Roditty and Elad Tal.
1 AGREEMENT PROTOCOLS. 2 Introduction Processes/Sites in distributed systems often compete as well as cooperate to achieve a common goal. Mutual Trust/agreement.
Distributed Algorithms (22903)
Alternating Bit Protocol
Distributed Algorithms (22903)
Key Distribution Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, /18/2019 Ref: Pfleeger96, Ch.4.
Performance Evaluation of a Communication Round over the Internet
Evaluating the Running Time of a Communication Round over the Internet
Presentation transcript:

Gossip and its application Presented by Anna Kaplun

Agenda Technical preliminaries Gossip algorithms ◦ Randomized unbalanced gossip ◦ unbalanced gossip Consensus Distributed computing

Technical preliminaries The system is synchronous There are n processors, each with unique integer name in interval {1,..,n}. n is known to all processors. Each processor can send a message to any subset of processors in one round. The size of the message assumed to be sufficiently large to carry a complete local state.

Technical preliminaries – Performance metrics Communication denotes the total number of point-to-point messages sent Time is measured as number of rounds. The round is such number of clock cycles that is sufficient to complete: ◦ receive messages delivered in previous round ◦ Local computations ◦ Send messages to arbitrary set of processors and deliver them.

Gossip In the beginning each processor has an input value called rumor. The goal: every non faulty processor p ◦ knows the rumor of any other processor q OR ◦ p knows that q has crushed

Randomized unbalanced gossip Processors are partitioned into m groups of balanced size. m=min{n,2t} ◦ n – number of processors ◦ t – maximum number of faulty processors Every group has a leader Only leaders send messages while regular nodes may only answer leaders’ requests

Randomized unbalanced gossip Processors are partitioned into w chunks of balanced size. w is: ◦ if 2t < n than w=2t ◦ else w=n-t Note: If 2t<n then chunks and groups are the same

Communication graph Every node is connected to appropriate leader Leaders form a graph Is a graph which consists of m nodes and has the following properties: For each subgraph of size at least m-t,there is a subgraph P(R) such that: Is a graph which consists of m nodes and has the following properties: For each subgraph of size at least m-t,there is a subgraph P(R) such that: its degree is its degree is

Communication graph (m=2t<n) m groupsm leaders connect nodes to leaders Leaders form, graph Chunks and groups are the same

Communication graph (m=n≤2t) m groupsm leaders connect nodes to leaders Leaders form, graph n-t chunks

Randomized unbalanced gossip - local view Rumors – all known rumors initialized: Rumors p [p]=myRumor Active – list of crashed processors initialized: Active p [q]=nill (for every q) Pending – list of fully informed processors initialized: Pending p [q]=nill (for every q)

Randomized unbalanced gossip - messages – carrying the whole local state, sent along communication graph – requests a local state from specific node – carrying the whole local state, sent when the sender knows all rumors (or knows that a certain processor crushed) – carrying the whole local state, sent as reply to inquiry message. graph inquiry notification reply

Randomized unbalanced gossip – the algorithm Only leaders send messages, regular nodes only answer queries Leader starts as collector, when it knows about all nodes it becomes disseminator Algorithm consists of phases: 1.Regular phase – executed T times 2.Ending phase – executed 4 times

a.Update the local arrays b.If p is a collector that has already heard about all nodes than become disseminator For each processor q: a.If q is active and q is my neighbor in communication graph than send a graph message to q b.If I’m collector and q is in the first chunk with a processor about which I haven't heard yet, then send inquiring message c.I I’m disseminator and q is in the first chunk with a processor that need to be notified, then send notifying message. d.If q is a collector from which an inquiry message was received then send a reply message to q Randomized unbalanced gossip – the algorithm (regular phase,executed T times ) graph inquiry notification reply Chunks are ordered according to permutation π p

Randomized unbalanced gossip - the algorithm (regular phase) For some leader p Send graph messages Take first unknown chunk from π p, send query Answer queries

Randomized unbalanced gossip - the algorithm (regular phase) For some leader p That collected all rumors Send graph messages Take first uninformed chunk from π p, send notification Answer queries

for 4 times a.Update the local arrays b.If p is a collector that has already heard about all nodes than become disseminator For each processor q: a.If I’m collector and I don’t know about q, then send inquiring message b.I I’m disseminator and q need to be notified, then send notifying message. c.If q is a collector from which an inquiry message was received then send a reply message to q Randomized unbalanced gossip - the algorithm (ending phase) inquiry notification reply

Randomized unbalanced gossip – updating lists Rumors – when some message received, new rumors are merged to the local list of known rumors r0 r2 r4 r0 r2 r4

Randomized unbalanced gossip – updating lists (cont) Active – q can be marked as faulty if: 1.Received a message where q is marked as faulty 2.q is my neighbor in communication graph and I didn’t receive a graph message from it 3.I sent a query to q and didn’t receive a reply in two rounds.

Randomized unbalanced gossip – updating lists (cont) Pending – q can be marked as fully informed if: 1.Received a message where q is marked as fully informed 2.Received a notification message from q 3.I’m a disseminator and I sent a notification to q notification

Randomized unbalanced gossip - correctness Claim: there is at least one leader that never fails if t<n ◦ If 2t<n than m=2t hence at least half of the leaders won’t fail ◦ If 2t>n than m=n hence at least one leader won’t fail Conclusion: at least one leader will run an ending phase. During the phase it will learn about all processors and will disseminate this knowledge

Randomized unbalanced gossip - complexity Rp – is a conceptual list of chunks that has at least one node that p has not hear about r k (i) – let K be subgraph of Sp – is a conceptual list of chunks that has at least one node that p has to notify s k (i) – let K be subgraph of

Randomized unbalanced gossip - complexity Look on the graph formed by m leaders. At least m-t leaders never fail there are at least (m-t)/7 nodes in connected component with radius 2+30ln(m). Let call this subgraph K

Randomized unbalanced gossip - complexity (cont) Lemma: if a stage takes phases then With probability that at least Proof: If chunk is not in all Rp lists it will be removed from all other lists in one stage. The worst case is when all chunks are in all lists

Randomized unbalanced gossip - complexity (cont) Let us consider the choices of chunks made by the processors in K as occurring sequentially. Consider a sequence of 30*|K|*ln(m) consecutive trials X1,X2,..., which represents the case of c = 1

Randomized unbalanced gossip - complexity (cont) Case |K|ln(m)>r(i-1)/2 Let us consider it to be a success in trial Xi if either a new chunk is selected or the number of chunks selected already by this trial is at least r(i − 1)/2. The probability of success in a trial is at least 1/2

Randomized unbalanced gossip - complexity (cont) Case |K|ln(m) ≤ r(i-1)/2 Let us consider it to be a success in trial Xi if either a new chunk is selected or the number of chunks selected already by this trial is at least |K|ln(m). The probability of success in a trial is at least 1/2

Randomized unbalanced gossip - complexity (cont) In both cases we have 30*|K|*ln(m) Bernouli trials with probability at least ½ for success With probability that at least

Randomized unbalanced gossip - complexity (cont) Lemma For each, there is such that gossiping is successfully completed by regular phase, while communication is by this phase, with probability that is at least

Randomized unbalanced gossip - complexity (cont) Proof: Let L be a fixed subgraph of induced by m − t vertices. There are O(1) stages that There is at most 1+log(w) stages that Other states are called useless

Randomized unbalanced gossip - complexity (cont) there is a constant β > 0 that if there is no useless stage among the first even β +lg(w) ones, then r( β +lg(w)) = 0. The probability that there is a useless stages is: There are at most subgraphs L

Randomized unbalanced gossip - complexity (cont) Hence the probability that there is a useless stage among the first even β + lg(w) ones, for an arbitrary subgraph L This is a probability that some collector didn’t become a disseminator

Randomized unbalanced gossip - complexity (cont) We have the same probability that if after β + lg(w) even stages all leaders became a collectors, but in following β + lg(w) even stages there is some uninformed node. The probability that there is a disseminator after 4 ( β + lg(w)) stages is

Randomized unbalanced gossip - time complexity stages Each stage takes phases phases

Randomized unbalanced gossip - message complexity Number of graph messages Number of inquiry messages Message complexity

From random to deterministic - unbalanced gossip Take number such that. Let α > 0 be the corresponding number that there exists a family of local permutations Π such that termination threshold T = α lgwln(m) = guarantees completion of gossiping without invoking ending phases. Make this threshold value T and such family Π a part of code of algorithm UNBALANCED-GOSSIP UNBALANCED-GOSSIP has time complexity, and message complexity If then we get : time complexity, and message complexity ∏ is only proved to exist If a=0 then message complexity

Consensus Every process starts with some initial value {0,1} Processor decides on its decision value Termination: Each processor eventually chooses a decision value, unless it crushes Agreement: No two processors choose different decision values Validity: Only a value among the initial ones may be chosen as a decision values

Consensus gossip consensus Let gossip and than decide on the maximum value…… What if some processor has crushed and its input value may be known only to subset of processors? Gossip can be solved in O(1) time while consensus with failures can’t be solved in less than t+1 rounds. ?

Consensus The algorithm is designed for t failures If Time complexity: Communication complexity:

Consensus – White knights consensus Leaders reach a consensus and then tell their decision to regular nodes. Leaders send messages along a communication graph In order to handle partition of,in case of failure, nodes run gossip algorithm

Consensus – White knights consensus 1) Set to initial value 2) Repeat times a) if then send message to every neighbor b)Repeat m times a)Receive short messages b)If and received message than set c)If was set to1 in this round, send message to all neighbors c)Repeat 2+30log(m) times a)Receive compactness messages b)Merge Nearby lists c)Send compactness messages to all neighbors d)If Nearby list containing less than (m-t)/7 nodes, set e)Perform gossiping 3) Decide on value

Consensus – White knights consensus Send your preference Check compactness Gossip

White knights consensus – intuition In every round If nodes preference value is 1 it sends it to its neighbors. If it received new preference value 1 it sends it to its neighbors This is done for m rounds to ensure that ‘1‘ propagates to all nodes in the connected component All nodes in connected component has the same rumor value after step 2.b.b

White knights consensus – intuition why so many phases? Let look on some node that before gossiping has rumor = 1 According to the algorithm it’s connected component contains at least (m-t)/7 nods and they should have rumor = 1too. What if they all crash while gossiping? after gossiping some nodes may have rumor = 1 but others don’t

White knights consensus – intuition why so many phases? (cont) If this scenario happens every iteration than nodes won’t reach consensus. every iteration at least (m-t)/7 nodes should fail It is impossible that all m nodes crush

White knights consensus - correctness A processor is said to be a white knight in an iteration, if it starts gossiping in this iteration with the rumor equal to 1.

White knights consensus - correctness(cont) The decision value is among input values all inputs are“0” - no “1“ ever appear all inputs are“1” – At least one processor that never fails will stay compact through all iterations and it will spread its “1” value at the last gossiping step

White knights consensus - correctness(cont) All processors decide on the same value There is an iteration without white knight all nodes have rumor “0” There is an iteration with white knight and it survives gossiping – every processor learns its rumor and next iteration all processors will start with rumor=1. At least one processor will stay compact through all iterations and it will spread its “1” value at the last gossiping step.

White knights consensus - correctness(cont) There are white knights in each iteration, but no white knight survives gossiping in any iteration We have shown that it can’t happen since there are “to many” iterations

White knights consensus – time complexity Phases number

White knights consensus – time complexity 1) Set to initial value 2) Repeat times a) if then send message to every neighbor b)Repeat m times a)Receive short messages b)If and received message than set c)If was set to1 in this round, send message to all neighbors c)Repeat 2+30log(m) times a)Receive compactness messages b)Merge Nearby lists c)Send compactness messages to all neighbors d)If Nearby list containing less than (m-t)/7 nodes, set e)Perform gossiping 3) Decide on value O(1) O(m)=O(t)

White knights consensus – communication complexity 1) Set to initial value 2) Repeat times a) if then send message to every neighbor b)Repeat m times a)Receive short messages b)If and received message than set c)If was set to1 in this round, send message to all neighbors c)Repeat 2+30log(m) times a)Receive compactness messages b)Merge Nearby lists c)Send compactness messages to all neighbors d)If Nearby list containing less than (m-t)/7 nodes, set e)Perform gossiping 3) Decide on value O(1) O(m)=O(t) Every processor sends message at least once Graph ' s degree is constant Every processor sends message at least once Graph ' s degree is constant

Distributed computation The DO-ALL problem There are n processors At most t processors may crush. t<n There are j jobs to perform ◦ jobs are idempotent, i.e., executing task many times and/or concurrently has the same effect as executing the task ones

Distributed computation The DO-ALL problem The goal is to perform all the jobs, every job should be executed at least once by some processor. The algorithm terminates when all non faulty processors are aware that all tasks are done Trivial solution: every processor executes all the jobs.

The DO-ALL problem Performance metrics Message complexity – number of point to point messages sent during the execution Work complexity – we assume that a processor performs a unit of work per unit of time. Note that the idling processors consume a unit of work per step. For a n-processor, j-task computation subject to a failure pattern F denote by Pi(j, n, F) the number of processors that survive step i of the computation.

The DO-ALL problem trivial approach every processor executes all the jobs No message complexity Work complexity To achieve better work complexity we trade messages for communication steps

The DO-ALL problem The algorithm Complexity: If we have: Can be implemented with other gossiping algorithm achieving

The DO-ALL problem The algorithm Task v – list of j tasks ordered according to some permutation π v Proc v – list of processors v believes are non faulty Done v – variable indicating whether all jobs are done according to v

The DO-ALL problem The algorithm 1. done=false 2. task={ π (1), π (2),…, π (j)} 3. proc={1,2,…,n} 4. Repeat Repeat ßlog(n)+1 times 1. Repeat times If task not empty Perform task whose id is first in task and remove it from task else set done to true 1.Run gossip with rumor=(task,proc,done) 2.If done=true AND done is true for all received rumors TERMINATE else update task,proc

The DO-ALL problem The algorithm 1,2,3,4,5,6,7,8 Work 1,2,3,4,5,6,7,8 Gossip 1,4,5,8 workgossip Done work

The DO-ALL problem The algorithm correctness If some job removed from some of the task lists it means that it was executed The progression in each node is insured by the algorithm Every node will finally terminate and all jobs will be executed

The DO-ALL problem The algorithm Complexity: If we have: Can be implemented with other gossiping algorithm achieving

summary Gossip algorithms time complexity= Communication complexity= ◦ Randomized unbalanced gossip will have the above complexity with high probability ◦ unbalanced gossip will have the above complexity, but it is not constructive Consensus time complexity= message complexity= Distributed computing – the DO-ALL problem Work complexity= Message complexity=

References Bogdan S. Chlebus, Dariusz R. Kowalski: Robust gossiping with an application to consensus. J. Comput. Syst. Sci. (JCSS) 72(8): (2006) Chryssis Georgiou, Dariusz R. Kowalski, and Alexander A. Shvartsman: Efficient gossip and robust distributed computation Theoretical Computer Science, Vol. 347(1-2), November 2005, pp