Distributed Simjava - Example1

This example is the distributed version of example1 of the Simjava package. A simple source and sink example. The source sends 100 messages to the sink and waits for acknowledgements. This example is composed of 3 Java source files:

Note: to run any of the distributed simjava examples you must be running JDK 1.1.1 and the values for JAVAHOME and CLASSPATH nust be set as appropriate for your system.

To Run:

  1. Download and install the Distributed Simjava Software.

  2. Make sure your CLASSPATH variable contains the class files for distributed Simjava. For example, on a UNIX system, you could enter the command:

    setenv CLASSPATH <target directory>/distSimjava1.0/classes:<target directory>/distSimjav1.0/examples/example1:$CLASSPATH

    These values must be set for each machine hosting a distributed Simjava component.

  3. Start the RMI registry on the machine where the Master program will be run. For example, on a UNIX system,

    rmiregistry &

  4. Start the Master program (on the same host as the RMI registry) by executing the command

    java Master registryHost registryPort #Entities

    where

    Note: the default port for RMI is 1099.

  5. Start the SourceSlave program be executing the command

    java SourceSlave registryHost registryPort

  6. Start the SinkSlave program be executing the command

    java SinkSlave registryHost registryPort