2010-01-29 16:45:42 +00:00
|
|
|
Master
|
|
|
|
boot up workers
|
|
|
|
listen for worker messages
|
|
|
|
add worker messages to message queue
|
|
|
|
process message queue
|
|
|
|
"reply" to a message allows sending a message back down to worker
|
2010-01-27 16:38:11 +00:00
|
|
|
|
2010-01-29 16:45:42 +00:00
|
|
|
When worker asks for file but no files left, send shutdown message to worker
|
|
|
|
when worker connection breaks, end thread
|
|
|
|
wait on all threads
|
|
|
|
when all threads are done, all workers must be done
|
2010-01-27 16:38:11 +00:00
|
|
|
|
2010-01-29 16:45:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
when a runner asks for file but master responds with shutdown, mark self
|
|
|
|
as terminated, shut down runners. Any runner that asks for a file is
|
|
|
|
auto-terminated
|
|
|
|
wait for runner threads to finish
|
|
|
|
then exit, breaking master connection
|
|
|
|
|
|
|
|
Test individual messages? Ensure they handle the right method? May not be worth it.
|