Distributed Simjava - A simple work farm
This example is the distributed version of the app_task_farm example of the
Simjava package -- a simulation of a simple work farm. The farmer sends out
jobs to the three worker CPUs. When a CPU is busy with a job its work router
(seen above it) passes new jobs on to the next CPU instead. If all
the CPUs are busy then job will pass through all the routers and into
the waste bucket. After a CPU finishes processing a job, it passes the
result down to the work bucket, and signals its work router that it
is free for more work. This example is composed of the following Java
source files:
To Run:
- Download and
install
the Distributed Simjava Software.
- Start the rmiregistry on the machine where the Main applet will be run.
- Ensure that the http daemon is running on the machine that contains
the html files.
- Start the Main applet by executing the command
appletviewer http://url
where url is the location of the file
main.html
- Start Applet1 by executing the command
appletviewer http://url
where url is the location of the file
applet1.html
- Start Applet2 by executing the command
appletviewer http://url
where url is the location of the file
applet2.html