Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.

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

COS 461 Fall 1997 Group Communication u communicate to a group of processes rather than point-to-point u uses –replicated service –efficient dissemination.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo.
CS542 Topics in Distributed Systems Diganta Goswami.
Failure Detection The ping-ack failure detector in a synchronous system satisfies – A: completeness – B: accuracy – C: neither – D: both.
Lab 2 Group Communication Andreas Larsson
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
CS 582 / CMPE 481 Distributed Systems
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Distributed Systems Fall 2009 Coordination and agreement, Multicast, and Message ordering.
Group Communication Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 24 th, 2004.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Distributed Systems 2006 Group Membership * *With material adapted from Ken Birman.
Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation 5: Reliable.
Lab 1 Bulletin Board System Farnaz Moradi Based on slides by Andreas Larsson 2012.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Multicast routing.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
ECE291 Computer Engineering II Lecture 23 Dr. Zbigniew Kalbarczyk University of Illinois at Urbana- Champaign.
SPREAD TOOLKIT High performance messaging middleware Presented by Sayantam Dey Vipin Mehta.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo.
Reliable Communication in the Presence of Failures Based on the paper by: Kenneth Birman and Thomas A. Joseph Cesar Talledo COEN 317 Fall 05.
(Business) Process Centric Exchanges
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Replication with View Synchronous Group Communication Steve Ko Computer Sciences and Engineering.
7/26/ Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
November 2005Distributed systems: distributed algorithms 1 Distributed Systems: Distributed algorithms.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Dealing with open groups The view of a process is its current knowledge of the membership. It is important that all processes have identical views. Inconsistent.
Dealing with open groups The view of a process is its current knowledge of the membership. It is important that all processes have identical views. Inconsistent.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
November NC state university Group Communication Specifications Gregory V Chockler, Idit Keidar, Roman Vitenberg Presented by – Jyothish S Varma.
Totally Ordered Broadcast in the face of Network Partitions [Keidar and Dolev,2000] INF5360 Student Presentation 4/3-08 Miran Damjanovic
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.
Exercises for Chapter 15: COORDINATION AND AGREEMENT From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Reliable Communication Smita Hiremath CSC Reliable Client-Server Communication Point-to-Point communication Established by TCP Masks omission failure,
Replication and Group Communication. Management of Replicated Data FE Requests and replies C Replica C Service Clients Front ends managers RM FE RM Instructor’s.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 6 Multicast/Group Communication and Mutual Exclusion Section &12.2.
Lecture 10: Coordination and Agreement (Chap 12) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section.
PROCESS RESILIENCE By Ravalika Pola. outline: Process Resilience  Design Issues  Failure Masking and Replication  Agreement in Faulty Systems  Failure.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Fault Tolerance (2). Topics r Reliable Group Communication.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Indirect Communication Indirect Communication is defined as communication between entities in DS through intermediary with no direct coupling b/w sender.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
Distributed Systems Lecture 7 Multicast 1. Previous lecture Global states – Cuts – Collecting state – Algorithms 2.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Chapter 8 Fault Tolerance. Outline Introductions –Concepts –Failure models –Redundancy Process resilience –Groups and failure masking –Distributed agreement.
Distributed Computing Systems Replication Dr. Sunny Jeong. Mr. Colin Zhang With Thanks to Prof. G. Coulouris,
Replication Chapter Katherine Dawicki. Motivations Performance enhancement Increased availability Fault Tolerance.
Reliable multicast Tolerates process crashes. The additional requirements are: Only correct processes will receive multicasts from all correct processes.
Exercises for Chapter 11: COORDINATION AND AGREEMENT
Coordination and Agreement
Replication & Fault Tolerance CONARD JAMES B. FARAON
Coordination and Agreement
Active replication for fault tolerance
EEC 688/788 Secure and Dependable Computing
Indirect Communication
Indirect Communication Paradigms (or Messaging Methods)
Indirect Communication Paradigms (or Messaging Methods)
Presentation transcript:

Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012

Overview Introduction to group communication Desired group communication Multicast communication Group membership service DSII: Group Comm. 2

Coordination in distributed systems Coordination is needed by distributed systems but hard to achieve: Events happen concurrently Communication links are not reliable Computers can crash New nodes can join the systems Asynchronous environments  Need of an efficient way to coordinate a group of processes DSII: Group Comm. 3

A Distributed System in war: Synchronous Example DSII: Group Comm. 4 Friendly fighter Radar Missile Commander Enemy missile Friend Ready to Fire Cancel AskPrepare Friendly fighter

A Distributed System in war: Reality DSII: Group Comm. 5 Radar Missile Commander Enemy missile Friend Ready to Fire Fire AskPrepare Friendly fighter Friendly fighter

Group communication What is a group? A number of processes which cooperate to provide a service. An abstract identity to name a collection of processes. Group Communication For coordination among processes of a group. DSII: Group Comm. 6

Who Needs Group Communication? Highly available servers (client-server) Database Replication Multimedia Conferencing Online Games Cluster management … DSII: Group Comm. 7

8 Distributed Web Server High availability

Online Game Fault-tolerance, Order DSII: Group Comm. 9

Different Communication Methods Unicast Point-to-Point Communication Multiple copies are sent. Broadcast One-to-All Communication Abuse of Network Bandwidth Multicast One-to-multiple Communication DSII: Group Comm. 10

Overview Introduction to group communication Desired group communication Multicast communication Group membership service DSII: Group Comm. 11

Desired Group Communication Name Abstraction Efficiency Delivery Guarantees Dynamic Membership DSII: Group Comm. 12  Multicast  Reliability, Ordering  Group membership service

Properties of Communication Ordering Total ordering, causal ordering Failure behavior Reliability Validity, integrity, agreement DSII: Group Comm. 13

Properties of Group Name of group Addresses of group members Dynamic group membership Options: Peer group or client-server group Closed or Open Group DSII: Group Comm. 14

Peer Group All the members are equal. All the members send messages to the group. All the members receive all the messages. DSII: Group Comm. 15

Client-Server Group Replicated servers. Clients do not care which server answers. DSII: Group Comm. 16

Overview Introduction to group communication Desired group communication Multicast communication Group membership service DSII: Group Comm. 17

Multicast communication Use network hardware support for broadcast or multicast when it is available. Send messages over a distribution tree. Minimize the time and bandwidth utilization DSII: Group Comm. 18

Reliability Correct processes: those that never fail. Integrity A correct process delivers a message at most once. Validity A message from a correct process will be delivered by the process eventually. Agreement A message delivered by a correct process will be delivered by all other correct processes in the group.  Validity + Agreement = Liveness DSII: Group Comm. 19

Ordering Assumptions: a process belongs to at most one group. FIFO if m p  m’ p, all correct processes that deliver m’ p will deliver m p (that is from the same sender) before m’ p. Causal if m  m’, all correct processes that deliver m’ will deliver m before m’. Total if a correct process delivers m before m’, all other correct processes that deliver m’ will deliver m before m’. DSII: Group Comm. 20 p1p1 p2p2 p3p3 p1p1 p2p2 p3p3 p1p1 p2p2 p3p3

Examples Assumption: Reliable one-to-one send operation (e.g. TCP) Basic multicast Requirement: All correct processes will eventually deliver the message from a correct sender. Implementation: B-multicast( g, m):  p  g: send( p, m); On receive( m) at p: B-deliver( m) at p.  Properties: integrity, validity. DSII: Group Comm. 21

Basic multicast: Agreement? DSII: Group Comm Agreement X crash

Examples (cont.) Reliable multicast Requirements: integrity, validity, agreement Implementation: Received := {}; R-multicast( g, m) at process p: B-multicast( g, m); On B-deliver( m) at process p from process q if( m  Received) Received := Received  {m}; if( q  p) B-multicast( g, m); R-deliver( m); end if  Inefficient: each message is sent O(|g|) times to each process DSII: Group Comm. 23

Reliable multicast DSII: Group Comm crash

Examples (cont.) FIFO-ordered multicast: Assumption: a process belongs to at most one group. Implementation: Local variables at p: S p = 1, R p [ |g| ]={0}; FO-multicast( g, m) at p: B-multicast( g, ); S p ++; On B-deliver( ) at p from q: if( S = R p [q] + 1) FO-deliver( m); R p [q] := S; else if( S > R p [q] + 1) place in the queue until S = R p [q] + 1; FO-deliver( m); R p [q] := S; end if Your task: totally ordered multicasts. DSII: Group Comm. 25

Overview Introduction to group communication Desired group communication Multicast communication Group membership service DSII: Group Comm. 26

Group membership service Four tasks: Interface for group membership changes Failure detector Membership change notification Group address expansion DSII: Group Comm. 27 Group address expansion Multicast Communication Group membership management Group partition: –Primary-partition – one partition only –Partitionable – many partiations at once

Group views Group views: Lists of the current ordered group members A new one is generated when processes join or leave/fail. View delivery When a member is notified of a membership change Requirements Order if p delivers v(g)  v’(g), no other process delivers v’(g)  v(g). Integrity if p delivers v(g), p  v(g). Non-triviality if q joins a group and becomes indefinitely reachable from p, eventually q is always in the view p delivers. DSII: Group Comm. 28

View-synchronous group comm. Extend the reliable multicast semantics with group views. Agreement Correct processes deliver the same set of messages in any given view Validity Correct processes always deliver the messages they send. p  v 0 (g) does not deliver m in v 0 (g)  p  v 1 (g) for processes that deliver m. Integrity DSII: Group Comm. 29 p q r (p,q,r) (q,r) X crash

Example Ensemble: reliable group communication toolkit Previous talk DSII: Group Comm. 30

IP-multicast Multicast: Yes: efficiency No: Reliability Ordering Group membership service: Yes: Interface for group membership change Group address expansion No: Failure detector Membership change notification DSII: Group Comm. 31 IP:

References Distributed Systems: Concepts and Design by G. Coulouris et al., ISBN Section 4.5 Group Communication Section 11.4 Multicast Communication Section Group Communication … DSII: Group Comm. 32

Lab 2: Construct a reliable and ordered multicast Reliable Integrity, Validity, Agreement Ordered All processes should agree on the order of all received messages. Total and causal order. No membership service Processes can still crash though! Use the mcgui package DSII: Group Comm. 33

The GUI DSII: Group Comm. 34 Message display Debug message display Time for stress test 24-hour time format # of messages for stress test

The interface Provide: cast basicreceive basicpeerdown Use: deliver debug basicsend DSII: Group Comm. 35

Implementation Cope with process crashs, not just normal leave Don’t change the mcgui package Your code will be checked using the original package Use the stress test to test your program Don’t add waits to your code to mask problems in the code The logic of your program will be checked Don’t start threads Java synchronization is handled in the package Don’t use IP multicast extend the Multicaster class DSII: Group Comm. 36

Lab Report How does the protocol satisfy Integrity including when processes can crash How does the protocol satisfy Validity including when processes can crash How does the protocol satisfy Agreement including when processes can crash How does the protocol satisfy the ordering requirements? Describe any used algorithms. How does the protocol deal with crashing processes? Describe any used algorithms. DSII: Group Comm. 37