@ -21,13 +21,12 @@ First thing user has to submit his/her solution to web application. Generally we
Broker gets information about new submission from web application. At this point broker has to find suitable worker for execution of this particular submission. When worker is found and is jobless, then broker send detailed submission to worker to evaluation. More detailed description follows:
Broker gets information about new submission from web application. At this point broker has to find suitable worker for execution of this particular submission. When worker is found and is jobless, then broker send detailed submission to worker to evaluation. More detailed description follows:
- T
- broker gets multipart "eval" message from web application with job identification, source archive URL, result URL and appropriate worker headers
- O
- headers are parsed and worker which matches all of them is chosen as the one which will execute incoming submission
- D
- whole execution request is saved into `worker` structure to waiting queue
- O
- if chosen worker is not working right now then incoming request is forwarded directly from waiting queue to worker through multipart message
- .
- if worker queue is not empty then nothing is done right now
- .
- execution of this particular request is suspended until worker complete all previous requests
- .
## Worker
## Worker
@ -68,7 +67,7 @@ Broker gets done message from worker and basically only mark submission as done
- broker gets "done" message from worker after successfull execution of job
- broker gets "done" message from worker after successfull execution of job
- appropriate `worker` structure is found based on its identification
- appropriate `worker` structure is found based on its identification
- some checks of invariants (current job identification, right amount of arguments) are executed right now
- some checks of invariants (current job identification, right amount of arguments) are executed
- deletion of current execution request in `worker` structure follows and appropriate worker is now considered free
- deletion of current execution request in `worker` structure follows and appropriate worker is now considered free
- if worker execution queue is not empty than next waiting request is taken and given as current one
- if worker execution queue is not empty than next waiting request is taken and given as current one
- after that only missing thing is to send that request to worker and loop back to worker execution
- after that only missing thing is to send that request to worker and loop back to worker execution