Distributed Simjava Tutorial

For a tutorial on Simjava, see the tutorial in the Simjava documentation.

In addition to basic Simjava knowledge, the following steps are required to distribute a Simjava application using the extended Simjava package.

  1. Establish a distributed architecture for the Simjava simulation, assigning entities to the machines that will be used.

  2. The constructors for the simulation's entities must receive a reference to the Sim_system. The reference must be passed to the entity's superclass. The constructor must also throw the exception java.rmi.RemoteException.

  3. All calls to remote objects must be wrapped with try-catch blocks and must catch the exception java.rmi.RemoteException.

  4. Any user-defined object passed as data in Sim_event objects must have a remote interface if remote access to the data is required.

  5. Create a "Master" program that:

  6. Create a number of "slave" programs that:

See Example1 to further illustrate the construction of a distributed Simjava simulation.