lab 2 group communication
play

Lab 2 Group Communication Desired group communication Multicast - PDF document

Overview Introduction to group communication Lab 2 Group Communication Desired group communication Multicast communication Andreas Larsson Group membership service 2009-02-04 DSII: Group Comm. 2 A Distributed System in


  1. Overview • Introduction to group communication Lab 2 Group Communication • Desired group communication • Multicast communication Andreas Larsson • Group membership service 2009-02-04 DSII: Group Comm. 2 A Distributed System in WAR: Coordination in distributed systems Synchronous Example • Coordination is needed by distributed systems Friend Allied fighter but hard to achieve: – Events happen concurrently Enemy missile Allied fighter – Communication links are not reliable Radar – Computers can crash – New nodes can join the systems – Asynchronous environments Missile Ready Cancel to Fire � Need of an efficient way to coordinate a group Commander of processes Ask Prepare DSII: Group Comm. 3 DSII: Group Comm. 4 A Distributed System in WAR: Group communication Reality Friend • What is a group? Allied fighter – A number of processes which cooperate to provide a service. Enemy missile Allied fighter Radar – An abstract identity to name a collection of processes. Missile Ready Fire • Group Communication to Fire – For coordination among processes of a group. Commander Ask Prepare DSII: Group Comm. 5 DSII: Group Comm. 6 1

  2. Distributed Web Server Who Needs Group Communication? • Highly available servers (client-server) • Database Replication • Multimedia Conferencing • Online Games • Cluster management • … • High availability DSII: Group Comm. 7 DSII: Group Comm. 8 Online Game Different Comm. Methods • Unicast – Point-to-Point Communication – Multiple copies are sent. • Broadcast – One-to-All Communication – Abuse of Network Bandwidth • Multicast – One-to-multiple Communication • Fault-tolerance, Order DSII: Group Comm. 9 DSII: Group Comm. 10 Overview Desired Group Communication • Introduction to group communication • Name Abstraction � Multicast • Efficiency • Desired group communication � Reliability, Ordering • Delivery Guarantees • Multicast communication � Group membership service • Dynamic Membership • Group membership service DSII: Group Comm. 11 DSII: Group Comm. 12 2

  3. Properties of Communication Properties of Group • Ordering • Name of group – Total ordering, causal ordering • Addresses of group members • Failure behavior • Dynamic group membership • Reliability – Validity, integrity, agreement • Options: – Peer group or client-server group – Closed or Open Group DSII: Group Comm. 13 DSII: Group Comm. 14 Peer Group Client-Server Group • All the members are • Replicated servers. equal. • Clients do not care • All the members send which server messages to the answers. group. • All the members receive all the messages. DSII: Group Comm. 15 DSII: Group Comm. 16 Overview Multicast communication • Introduction to group communication • Use network hardware support for broadcast or multicast when it is available. • Desired group communication • Send message over a distribution tree. • Minimize the time and bandwidth • Multicast communication utilization • Group membership service DSII: Group Comm. 17 DSII: Group Comm. 18 3

  4. Ordering Reliability Assumptions: a process belongs to p 1 Correct processes: those that never fail. at most one group. p 2 • Integrity • FIFO p 3 – if m p → m’ p , all correct A correct process delivers a message at most once. processes that deliver m’ p will • Validity deliver m p (that is from the p 1 same sender) before m’ p . A message from a correct process will be delivered by • Causal the process eventually. p 2 – if m → m’ , all correct • Agreement p 3 processes that deliver m’ will deliver m before m’. A message delivered by a correct process will be • Total delivered by all other correct processes in the group. p 1 – if a correct process delivers m before m’ , all other correct � Validity + Agreement = Liveness p 2 processes that deliver m’ will deliver m before m’ . p 3 DSII: Group Comm. 19 DSII: Group Comm. 20 Examples Basic multicast: Agreement? • Assumption: – Reliable one-to-one send operation (e.g. TCP) 2 • Basic multicast 1 crash 3 – Requirement: X Agreement • All correct processes will eventually deliver the message 4 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 DSII: Group Comm. 22 Examples (cont.) Examples (cont.) • FIFO-ordered multicast: • Reliable multicast – Assumption: – Requirements: integrity, validity, agreement • a process belongs to at most one group. – Implementation: – Implementation: • Local variables at p : S p = 1, R p [ |g| ]={0}; • Received := {}; • FO-multicast( g, m) at p: • R-multicast( g, m) at process p: B-multicast ( g, m); B-multicast ( g, <m, S p >); • On B-deliver ( m) at process p from process q S p ++; • On B-deliver ( <m, S>) at p from q: if( m ∉ Received) if( S = R p [q] + 1) Received := Received ∪ {m}; FO-deliver( m) ; if( q ≠ p) B-multicast ( g, m); R p [q] := S; R-deliver( m) ; else if( S > R p [q] + 1) end if place <m, S> in the queue until S = R p [q] + 1; FO-deliver( m) ; R p [q] := S; � Inefficient: each message is sent |g| times to each process end if – You are encouraged to implement in more efficient ways – Your task: totally ordered multicasts. DSII: Group Comm. 23 DSII: Group Comm. 24 4

  5. Overview Group membership service • Four tasks: • Introduction to group communication Group address – Interface for group expansion membership changes – Failure detector • Desired group communication – Membership change Group Multicast membership notification Communication management – Group address • Multicast communication expansion • Group partition: • Group membership service – Primary-partition – one partition only – Partitionable – many partiations at once DSII: Group Comm. 25 DSII: Group Comm. 26 Group views View-synchronous group comm. • Group views: – Lists of the current ordered group members • Extend the reliable multicast – A new one is generated when processes join or semantics with group views. crash leave/fail. p X – Agreement • View delivery • Correct processes deliver the same q – When a member is notified of a membership change set of messages in any given view – Requirements – Validity (closed group) r • Order • Correct processes always deliver – if p delivers v(g) → v’(g) , no other process delivers v’(g) → v(g) . (q,r) (p,q,r) • Integrity the messages they send. – if p delivers v(g) , p ∈ v(g) . • p ∈ v 0 (g) does not deliver m in v 0 (g) • Non-triviality � p ∉ v 1 (g) for processes that – if q joins a group and becomes indefinitely reachable from p , deliver m. eventually q is always in the view p delivers. – Integrity DSII: Group Comm. 27 DSII: Group Comm. 28 IP-multicast Examples • IP: 224.0.0.1 - 239.255.255.255 • Ensemble: reliable group communication • Multicast: • Group membership toolkit service: – Previous talk – Yes: – Yes: • efficiency • Interface for group membership change • Group address expansion – No: – No: • Reliability • Failure detector • Ordering • Membership change notification DSII: Group Comm. 29 DSII: Group Comm. 30 5

  6. Lab 2: Construct a reliable and References ordered multicast • Reliable • Distributed Systems: Concepts and – Integrity, Validity, Agreement Design by G. Coulouris et al., ISBN 0-201- • Ordered 61918-0 – All machines should agree on the order of all – Section 4.5 Group Communication received messages. – Section 11.4 Multicast Communication – Total and causal order. – Section 14.2.2 Group Communication • No membership service • … – Processes can still crash though! DSII: Group Comm. 31 DSII: Group Comm. 32 The GUI The interface • Provide • Use – cast – deliver # of messages for stress test – debug Time for stress test Message display – setCallback – enableSending Debug message display DSII: Group Comm. 33 DSII: Group Comm. 34 6

Recommend


More recommend