Lab 1 Bulletin Board System 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.
CS425/CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Prof R. Guerraoui Distributed Programming Laboratory
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.
The Ensemble system Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 31st, 2004.
Ensemble Group Communication Middleware. 2 Group Communication - Overview Ensemble – a group communications implementation for research
Algorithm for Virtually Synchronous Group Communication Idit Keidar, Roger Khazan MIT Lab for Computer Science Theory of Distributed Systems Group.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
Computer Science Lecture 17, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Group Communication Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 24 th, 2004.
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
Group Communication using Ensemble Part II. 2 Introduction From previous tutorial: Ensemble’s application interface: Concepts of Group Membership, View,
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 13 Wenbing Zhao Department of Electrical and Computer Engineering.
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.
Process-to-Process Delivery:
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
Presentation on Osi & TCP/IP MODEL
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
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.
COP 4930 Computer Network Projects Summer C 2004 Prof. Roy B. Levow Lecture 3.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Group Communication Group oriented activities are steadily increasing. There are many types of groups:  Open and Closed groups  Peer-to-peer and hierarchical.
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.
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.
Hwajung Lee. A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types of groups:
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
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
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Fault Tolerant Services
The Totem Single-Ring Ordering and Membership Protocol Y. Amir, L. E. Moser, P. M Melliar-Smith, D. A. Agarwal, P. Ciarfella.
Reliable Communication Smita Hiremath CSC Reliable Client-Server Communication Point-to-Point communication Established by TCP Masks omission failure,
Building Dependable Distributed Systems, Copyright Wenbing Zhao
Lecture 10: Coordination and Agreement (Chap 12) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Group Communication Theresa Nguyen ICS243f Spring 2001.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Relying on Safe Distance to Achieve Strong Partitionable Group Membership in Ad Hoc Networks Authors: Q. Huang, C. Julien, G. Roman Presented By: Jeff.
Fault Tolerance (2). Topics r Reliable Group Communication.
UDP: User Datagram Protocol Chapter 12. Introduction Multiple application programs can execute simultaneously on a given computer and can send and receive.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
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.
Replication Chapter Katherine Dawicki. Motivations Performance enhancement Increased availability Fault Tolerance.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Reliable multicast Tolerates process crashes. The additional requirements are: Only correct processes will receive multicasts from all correct processes.
Replication & Fault Tolerance CONARD JAMES B. FARAON
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
Process-to-Process Delivery:
Active replication for fault tolerance
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Process-to-Process Delivery: UDP, TCP
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Presentation transcript:

Lab 1 Bulletin Board System Farnaz Moradi Based on slides by Andreas Larsson 2012

Schedule The Ensemble system Introduction Architecture and Protocols How does Ensemble achieve the group communication properties ? The Bulletin Board System Lab 1 - Bulletin Board System 2

The Ensemble System A library of protocols that support group communication. Ensemble Provides Group membership service Reliable communication Failure detector Secure communication Lab 1 - Bulletin Board System 3

Terminology Deliver a message Send it upwards in the stack From ensemble to the program that uses Ensemble Between layers within ensemble Lab 1 - Bulletin Board System 4

Group membership service Endpoints Abstraction for a communicating entity Normally one per process Groups Corresponds to a set of endpoints that communicates Just a name for endpoints to use Views A snapshot of the group membership at a specified point May change from time to time Maintaining membership Lab 1 - Bulletin Board System 5

Reliable communication Multicast communication Messages are delivered by all group members in the current view of the sender. Possibly based on IP-multicast Point-to-Point communication Properties: Virtual synchrony Stability Ordering Lab 1 - Bulletin Board System 6

Virtual synchrony AKA: View-synchronous group communication Integrity A correct process delivers a message at most once. Validity A message from a correct process will be delivered eventually by that process Agreement A message delivered by one correct process will be delivered by all correct processes Lab 1 - Bulletin Board System 7

Virtual Synchrony Examples of trouble Lab 1 - Bulletin Board System 8 crash V 0 ={a,b,c} V 1 ={a,b,c,d} V 2 ={b,c,d} V 3 ={b,c,d,e} abcdeabcde d want to join e want to join

Schedule The Ensemble system Introduction Architecture & Protocols How does Ensemble achieve the group communication properties ? The Bulletin Board System Lab 1 - Bulletin Board System 9

Infrastructure Lab 1 - Bulletin Board System 10 Layered protocol architecture All features are implemented as micro- protocols/layers A stack/combination ~ a high-level protocol A new stack is created for a new configuration at each endpoint Ability to change the group protocol on the fly

Layers Layers are implemented as a set of callbacks that handle events passed to them. Each layer gives the system 2 callbacks to handle events from its adjacent layers Layers use 2 callbacks of its adjacent layers for passing events. Each instance of a layer maintain a private local state. Lab 1 - Bulletin Board System 11

Stacks Combinations of layers that work together to provide high-level protocols Stack creation: A new protocol stack is created at each endpoint of a group whenever the configuration (e.g. the view) of the group changes. All endpoint in the same partition receive the same ViewState record to create their stack: select appropriate layers according to the ViewState create a new local state for each layer compose the protocol layers connect to the network Lab 1 - Bulletin Board System 12

Schedule The Ensemble system Introduction Architecture & Protocols How does Ensemble achieve the group communication properties ? The Bulletin Board System Lab 1 - Bulletin Board System 13

The basic stack Each group has a leader for the membership protocol. Lab 1 - Bulletin Board System 14 Bottom Interface to the network Mnak Reliable fifo Stable Stability detection Sequencer Total ordering Top_appl Interface to the application Synch Block during membership change Gmp Membership algorithm (7 layers) LayersFunctionality Suspect Failure detector Slander Failure suspicion sharing

Failure detector Suspect layer: Regularly ping other members to check for suspected failures Protocol: If (#unacknowledged Ping messages for a member > threshold) send a Suspect event down Slander layer: Share suspicions between members of a partition The leader is informed so that faulty members are removed, even if the leader does not detect the failures. Protocol: The protocol multicasts slander messages to other members whenever receiving a new Suspect event Lab 1 - Bulletin Board System 15

Stability Stable layer: Track the stability of multicast messages Protocol: Maintain Acks[N][N] by unreliable multicast: Acks[s][t]: #(s’ messages) that t has acknowledged Stability vector StblVct = {(minimum of row s):  s} NumCast vector NumCast = {(maximum of row s):  s} Occasionally, recompute StblVct and NumCast, then send them down in a Stable event. Lab 1 - Bulletin Board System 16

Reliable multicast Mnak layer: Implements a reliable FIFO-ordered multicast protocol Messages from live members are delivered reliably Messages from faulty members are retransmitted by live members Protocol: Keep a record of all multicast messages to retransmit on demand Use Stable event from Stable layer: StblVct vector is used for garbage collection NumCast vector gives an indication to lost messages  recover them Lab 1 - Bulletin Board System 17

Ordering property Sequencer layer: Provide total ordering Protocol: Members buffer all messages received from below in a local buffer The leader periodically multicasts an ordering message Members deliver the buffered messages according to the leader’s instructions See Causal layer for causal ordering Lab 1 - Bulletin Board System 18

Maintaining membership (1) Handle Failure by splitting a group into several subgroups: 1 primary and many non-primary (partitionable) Protocol: Each member keeps a list of suspected members via Suspect layer A member shares its suspicions via Slander layer View leader l: collect all suspicions reliably multicast a fail(p i0,…,p ik ) message synchronize the view via Synch layer Install a new view without p i0,…,p ik A new leader is elected for the view without leader If p k in view V 1 suspects that all lower ranked members are faulty, it elects itself as leader and does like l. A member that agrees with p k, continues with p k to the new view V 2 with p k as the leader. A member that disagrees with p k, suspects p k. Lab 1 - Bulletin Board System 19

Maintaining membership (2) Recover failure by merging non-primary subgroups to the primary subgroup Protocol: l: local leader, r: remote leader 1.l synchronizes its view 2.l sends a merge request to r 3.r synchronizes its view 4.r installs a new view with its mergers and sends the view to l 5.l installs the new view in its subgroup Lab 1 - Bulletin Board System 20

Join Group Lab 1 - Bulletin Board System 21 crash V 0 ={a,b,c} V 1 ={a,b,c,d} V 2 ={b,c,d} V 3 ={b,c,d,e} abcdeabcde d want to join e want to join

Virtual synchrony Achieved by a simple leader-based protocol: Idea: Before a membership change from V 1 to V 2 all messages in V 1 must become stable Protocol: before any membership change The leader activates the Synch protocol  the set, M V1, of messages needed to deliver in V 1 is bounded. The leader waits until live members agree on M V1 via sending negative acknowledgements and recovering lost messages (i.e. StblVct = NumCast) Lab 1 - Bulletin Board System 22

Virtual Synchrony Lab 1 - Bulletin Board System 23 crash V 0 ={a,b,c} V 1 ={a,b,c,d} V 2 ={b,c,d} V 3 ={b,c,d,e} abcdeabcde d want to join e want to join

Schedule The Ensemble system Introduction Architecture and Protocols How does Ensemble achieve the group communication properties? The Bulletin Board System Lab 1 - Bulletin Board System 24

The Bulletin Board System Bulletin board with messages Subject, ID, sender, time Arriving messages shall be displayed immediately No agreed order of messages is needed But: Replies should always be after their parent Take advantage of ensemble to do this Peer to peer application The bulletin board is shared No server that keeps the messages Stability while endpoints join and leave The application should be able to stand the loss of any client Except the last one Warn client when it is the only one left Lab 1 - Bulletin Board System 25

Ensembled An ensembled process needs to run at each computer If none is running at your computer run /chalmers/groups/cse-ds2/ensemble/ensembled Already runs on: remote{1,2,3,4,5}.student.chalmers.se Ensembled is providing the ensemble service Ensemble servers are not centralized servers The server serves one host The servers connect to each other and form the network Lab 1 - Bulletin Board System 26

Map over the network Lab 1 - Bulletin Board System 27 Ensembled Network Endpoint Process

Get to know the system Look at the documentation: Ensemble tutorial Chapter 8 for the java interface 5.8 for quick view of properties/layers Ensemble reference manual Chapter 11 for more details on the layers For additional information client/java/ensemble/JoinOps.java Under /chalmers/groups/cse-ds2/ensemble/ To see how to select layers Do not change JoinOps itself. Understand the example program Get the Talk app from the course page Get it to run and figure out how it works Lab 1 - Bulletin Board System 28