master
Martin Polanka 8 years ago
parent 1e2252a5ce
commit 4a15256229

@ -23,15 +23,15 @@ After user submits solution then web application has to hand over all needed inf
## Broker ## Broker
Broker gets information about new submission from Web API. 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 api. 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:
1. broker gets message from Web API about new submission 1. broker gets message from web api about new submission
2. based on information from Web API, broker has to choose suitable worker which matches all submission criteria 2. based on information from web api, broker has to choose suitable worker which matches all submission criteria
1. if suitable worker is not found then broker notices Web API about this information and all execution stops 1. if suitable worker is not found then broker notices Web API about this information and all execution stops
2. suitable worker is found 2. suitable worker is found
1. worker has no jobs at the moment, broker immediatelly sends job evaluation request to it 1. worker has no jobs at the moment, broker immediately sends job evaluation request to it
2. otherwise evaluation request is queued to this particular worker and waits until all previous jobs are done 2. otherwise evaluation request is queued to this particular worker and waits until all previous jobs are done
3. broker sends prepared evaluation request to worker with all information which was obtained from Web API 3. broker sends prepared evaluation request to worker with all information which was obtained from web api
## Worker ## Worker
@ -46,7 +46,7 @@ Worker gets request from broker to evaluate particular submission. Next step is
2. external tasks have defined limits in configuration and are executed in sandbox 2. external tasks have defined limits in configuration and are executed in sandbox
6. last step of initializing of job is to topologically sort tasks and prepare queue with right execution order 6. last step of initializing of job is to topologically sort tasks and prepare queue with right execution order
7. after that topologically sorted execution queue is processed 7. after that topologically sorted execution queue is processed
1. if execution of `inner` task fails worker will immediatelly stop execution and send back to broker 'internal error during execution' message 1. if execution of `inner` task fails worker will immediately stop execution and send back to broker 'internal error during execution' message
2. execution of `execution` or `evaluation` task fails then worker stops and send back to broker 'execution failed' message 2. execution of `execution` or `evaluation` task fails then worker stops and send back to broker 'execution failed' message
8. when execution successfully ends results are collected from all executed tasks and written into yaml file 8. when execution successfully ends results are collected from all executed tasks and written into yaml file
9. results yaml file alongside with content of job result folder is sent back to fileserver in compressed form 9. results yaml file alongside with content of job result folder is sent back to fileserver in compressed form
@ -71,7 +71,7 @@ Broker gets done message from worker and basically only mark submission as done
## Web API ## Web API
Web API is notified about job status from broker. After that API is deciding if evaluated submission will be evaluated immediatelly or on demand. But for the sake of simplicity we will consider only immediatelly evaluated results. More detailed description follows: Web api is notified about job status from broker. After that api is deciding if evaluated submission will be evaluated immediately or on demand. But for the sake of simplicity we will consider only immediately evaluated results. More detailed description follows:
1. job arrived with successful evaluation status 1. job arrived with successful evaluation status
1. results of evaluation are downloaded from fileserver where it was uploaded by worker and then unzipped 1. results of evaluation are downloaded from fileserver where it was uploaded by worker and then unzipped
@ -83,7 +83,7 @@ Web API is notified about job status from broker. After that API is deciding if
## Web Application ## Web Application
Web Application has only a simple work to do. It has to obtain results from Web API. More detailed description follows: Web application has only a simple work to do. It has to obtain results from web api. More detailed description follows:
1. Web Application sends request for results of particular submission 1. web application sends request for results of particular submission
2. if results are available than they are sent back to Web Application and displayed to user 2. if results are available than they are sent back to web application and displayed to user
Loading…
Cancel
Save