Authors: Lucas Waye, Christopher Mueller, George Wu, Kat Zhou
There are two types of servers, a WorkerServer and a WorkQueueServer. The WorkerServer performs tasks and the WorkQueueServer delegates tasks to WorkerServers. There is one type of client, WorkClient, that performs AdditionTasks.
A WorkQueueServer accepts tasks to perform and delegates them to registered ComputeServer nodes. The WorkQueueServer keeps track of currently active (working on a WorkTask) workers. When a WorkTask arrives, it will delegate it to the first free worker. If none are available, it will wait until one becomes available. If there is a ConnectException while delegating a task, that worker is removed and the WorkTask is retried with another available worker.
build.sh
-- compiles and jars up the source filesrunwebserver.sh
-- runs the RMI webserver for the jar'd up file created frombuild.sh
runregistry.sh
-- runs the RMI registryrunqueue.sh
-- runs the queued compute serverrunworker.sh
-- runs a worker compute serverrunclient.sh
-- runs an AdditionTask client
- Compile the source:
./build.sh
- Edit the files
myhostname
andrmicodebases
to reflect your node's hostname and the RMI server codebase(s) to use. - Start the codebase webserver; it runs on port 8000:
./runwebserver.sh &
- Start the RMI registry with the codebase server:
./runregistry.sh &
- Start the Queued compute server:
./runqueue.sh
- In a separate window, start a worker:
./runworker.sh localhost
. If registering to a remote Queue server, changelocalhost
to the hostname of the remote Queue server. If the queued server name binded registry name is not "QueuedServer", you must edit the "runworker.sh" script. - In a separate window, start the client:
./runclient.sh localhost
. If connecting to a remote compute server, changelocalhost
to the hostname of the remote server. If the compute server name binded registry name is not "MasterComptueServer", you must edit the "runclient.sh" script.
Note: For the RMI codebases, don't forget the trailing slash if it is not a JAR.