Groupcast Echoes Sample Application

Author: Pablo Chacin

Version. 1.0

Created: March 07, 2006

(c) Technical University of Catalonya 2006

Overview

This sample application presents the utilization and programming model for the Groupcast mechanisms provided by the Grid Market Middleware.

The application shows two agents, EchoesServer and EchoesClient, which commnicate in a send/reply model to implement a sort of "ping" command, as provided for TCPIP in most platforms. The EchoClient sends the "ping" messages using a groupcast to all the EchoServers in the neiborghood and registers the response time from each server.

EchoClient and EchoServer agents can be started in different JVMs as they communicate using P2P communication mechanisms.

This application can be considered a version of the Echoes Sample Application

Throught this example we can show how the following functionalities are implemented:

Components

Executing the application

The Echoes application components are contained in the EchoesSample project. This project contains the following directories:
Also in the project's root directory there is a configuration file HostingConfig.properties.

In Eclipse

  1. Import the Echoes project
  2. Be sure that under the project's main directory there is a subdirectory called EchoClient and another called EchoServer. If not, create them. If you plan to run more than one instance of the EchoServerMainApp, create one additional subdirectory for each of them (for example, 'EchoServer2', 'EchoServer3' ...)
  3. run the class EchoServerMainApp, passing the following command line parameters:
    config.node EchoServer config.port 8051. config.workdirectory ./EchoServer
  4. If you plan to execute more than one instance of this class, change these parameters accordingly. Be sure the config.port is unique on the machine and that config.workdirectory maches the name of the working directory you created for each instance.
  5. run the class EchoClientMainApp, passing the following command line parameters:
    config.node EchoServer config.port 8059 config.workdirectory ./EchoClient

Execution Results