Table of Contents

Summary

  1. Introduction to the development of group communication applications based on the Generic Communication Service API for Java (jGCS).
  2. Motivation for the need of group communication in real-world distributed applications.
  3. Introduction to the jGCS API.
  4. Tutorial on the configuration and compilation of the source code distribution for the jGCS implementation.
  5. Running and modifying a jGCS example.

Context

Explaining what is appia

Appia is an open source layered communication toolkit implemented in Java and providing extended configuration and programming possibilities. The Appia toolkit is composed by (1) a core that is used to compose protocols and (2) a set of protocols that provide group communication, ordering garanties, atomic broadcast, among other properties.

http://appia.di.fc.ul.pt/

Explaining what is jgcs

The jGCS library provides a generic interface for Group Communication. This interface can be used by applications that need primitives from simple IP Multicast group communication to virtual synchrony or atomic broadcast. Its a common interface to several existing toolkits that provide different APIs.

http://jgcs.sourceforge.net/

Objectives

  1. Introduction to APPIA
  2. Introduction to jGCS
  3. Introduction to ant
  4. Run simple communication between client and server.
  5. Change the code to include parameters in the messages.

Running

This example shows how to use and configure Appia with jGCS using an open group, where there is a group of servers that accept Messages from external members. The example only shows how to configure and use, and it only sends dummy messages. It does not intend to implement any algorithm.

The example is composed by a server and a client. For this example to work, a gossip server must be used. To run the examples, use the following commands:

Note that before running this example, the address of the gossip must be properly set in the server.xml and client.xml files. Note that localhost address will not work:

<channel name="rrpc" template="tcp" initialized="no">
    <memorymanagement size="40000000" up_threshold="15000000" down_threshold="7000000" />
    <chsession name="remoteview">
        <parameter name="gossip">**change_here**:10000</parameter>
    </chsession>
    <chsession name="remoteaddr">
        <parameter name="group">group</parameter>
    </chsession>
</channel>

Gossip Server

The Gossip Server is a service provided by Appia to help the Group Communication protocols to discover new elements. When an element is started, it first connects to a gossip server that provides an address of an existing group communication member. Using this address, the new member can join the group. This is all transparent for the applications that are built on the top of the Appia group communication protocols. This is the server that needs to be started. The default port is 10000.

Change Message Content

  1. Open the clientMessage file. Observe the strategy pattern with ProtocolMessage class.

  2. Add a new attribute to the Client message.

    ClientMessage myMsg = new ClientMessage(smsg.id, "Hello");

  3. Print the received message new attribute

    System.out.println("Message was " + cliMsg.newAttr);

  4. View the parameters on the client protocol stack

  5. Start the server before connecting the client. Observe the results.

  6. Start various servers and clients simultaneously.


Date:2012-02-14
Version:1