JavaGroups - A Group Communication Toolkit for Java

User's Guide (PS) (HTML) Javadoc Documentation Presentation (HTML) FAQ Download

JavaGroups is a Java-based toolkit for reliable group communication. Its functionality includes sending messages to all members of a group, ensuring that each member receives the same sequence of messages in the same well-defined order. Its basic abstraction is a channel, which is similar to BSD sockets: clients can connect to the channel giving the name of the group they want to join, send and receive messages, retrieve all members currently joined, and receive notifications when members join or leave. All channels with the same name 'find' each other and a message sent via a channel will be received by all channels that have joined the same group (i.e. have the same name).

A number of patterns are available on top of channel, which make programming group applications (or protocols) easier. Examples are PullPushAdapter, converting a pull-style channel into a push-style channel, RemoteMethodCall and MethodInvoker, enabling group RPC, DistributedHashtable, distributing the java.util.Hashtable class and some patterns which encapsulate communication exchanges often used in group communication, such as state transfer. We will focus more and more on behavioral patterns such as primary-backup and flush protocols (not yet implemented).

JavaGroups has its own protocol stack (JChannel) which currently does not yet fully support reliability guarantees. It can also run over iBus and Ensemble. The latter fully supports various types of reliability guarantees.

The JChannel protocol stack consists of a number of layers, each implemented as a Java class. When a new stack is created, each of the layer's name is the name of a corresponding Java class which will be loaded. An instance of that class will then be added to the linked list of protocol layers. Any message traveling up or down the stack has to pass through ever layer, and each layer may perform some computation on a message, e.g. reordering it (for FIFO delivery), encryption/de-encryption, computing and appending a checksum etc.

Each layer has to subclass a protocol interface which governs how messages are passed up and down the stack. Methods of the interface (such as Up() or Down()) are called whenever a message passes through the layer. An implementor may override these methods (and others) to perform layer-specific chores. (The documentation on writing protocol layers will follow shortly)

A collection of layers determines the properties of the protocol stack: a multimedia conferencing application might require a control channel (e.g. for floor control) which has to provide total order and loss-less delivery of all messages, and one or more data channels to disseminate video and audio to all partipants. With the data channels, loss of some video frames/audio packets is tolerable, however, delay (e.g. because of message retransmission) would not be tolerable. The benefit of JChannel is that it can be configured according to the properties required by the application using it.

JavaGroups is an open source project: contributions are welcome and will be integrated into the distribution.