Lab 2: Implementing a reliable and ordered multicast protocol

Students should write a module that provides reliable and ordered multicast. The module is driven by a provided graphical user interface and uses pre-setup TCP connections. The module needs to cope with crashing processes, but not joining processes.

Getting started

The task is to create a class (with any number of helping classes of course) that implements a reliable and ordered multicast module by extending the Multicaster class and using the MulticasterUI interface to communicate with the provided graphical interface and the BasicCommunicator interface to send point-to-point messages to the other processes. All these can be found in the mcgui package. See below.

System requirements

The protocol

The multicast protocol needs to satisfy the following requirements:

The lecture slides on group communication (pdf, pptx) gives the details of the properties listed in the requirement section.

Group membership

You do need to cope with processes that crashes, but you do not need to have a membership service. The system is set up with a group of processes connected according to a setup file. We assume that processes that crashes never come back.

The implementation

You will use the mcgui package (see the documentation here) that is installed on the student system at /chalmers/groups/cse-ds2/ or can be downloaded here. An example on how to use the package can be found in lab2example.tar.gz.

Set CLASSPATH to "/chalmers/groups/cse-ds2/javapackages:.". In bash you can do
   export CLASSPATH="/chalmers/groups/cse-ds2/javapackages:."

No files in the mcgui package shoul be changed. Your submissions will be tested using the original package. Communication between processes should only use the provided BasicCommunication interface. No outside communication channels are allowed.

No synchronization should be used for the methods in the class extending Multicaster. No calls to your module will be simultaneous and any added synchronization could lead to deadlocks.

Running the program

Your program should be started in the following manner:
   java mcgui.Main X id setupfile
where X is your class that extends Multicaster, ID is a numerical ID (starting from 0) of the client and setupfile is a valid setup file. All clients needs to be started within 2 seconds time.

The setup file contains one line stating the number of clients in the setup file followed by that number of lines containing a hostname followed by ':' followed by a port number. A setup file for running three clients on localhost can be found mcgui/localhostsetup and one for running on remote1 to remote3.student.chalmers.se can be found in mcgui/remotesetup. Be sure to start with the right ID on the right machine. For example using mcgui/remotesetup the client on remote1 should use ID 0, the one on remote2 should use ID 1 and the one on remote3 should use 2.

A list of the delivered messages are output in deliveredbyID.txt for the different ID:s of the processes. The diff program can be used to check that clients delivered the same messages in the same order.

Lab groups

You are supposed to do this in groups of two.

Submission

Deadline: February 20, 2012

The labs will be reported using the Fire system. It can be found at: https://fire.cs.chalmers.se:8039/cgi/Fire-ds2. Make sure that both members of the group are added before submitting.

You are supposed to submit one zip, tar or tar.gz archive file that when extracted creates a directory with all your files in them. This is the "top" directory mentioned below. Your archive contains:
  1. Source code for a working module that satisfies the aforementioned requirements.
  2. A report that shows: