Based on DistributedWorkers with the following changes:
- Incorporates a web frontend using Spray
- Introduces a service concept in addition to a work item
- Uses Publish, Subscribe to ask a set of workers to execute a service
- sbt clean assembly
- Prerequisites: curl and node
- Edit src/main/resources/application.conf and change masterHost to be the FQDN or IP of the master host. For example:
masterHost = "192.168.1.12"
- Now run the command './run_test.sh' to get usage.
$ ./run_test.sh Usage: ./run_test.sh command num command: start|status|config num: number of agents
- Running run_test.sh with a number of agents will return the time each agent took to run a service (start|config|status) and the time when all agents were done reporting their status to the master.
$ ./run_test.sh status 4
{ "service": { "id": "3949eb18-1c7e-459a-aea2-91c82e807af3", "timesPerWorker": [24, 24, 25, 26], "completionTime": 26}}
- Prerequisites: Modern browser like Chrome or Firefox (I used Chrome 29 and Firefox 24)
- Edit src/main/resources/application.conf and change masterHost to be the FQDN or IP of the master host. For example:
masterHost = "192.168.1.12"
- Open new terminal window
$ ./run_master.sh
- Open as many new terminal windows as you would like agents
$ ./run_agent.sh
- Point your browser to localhost:8090. Click on start or status or config. An alert will display the completionTime.