This article will describe in execution flow of submission from the point of submission into web application to the point of evaluation of results from execution. Note that following text is simplified and should only show concepts which are used during execution.
First thing user has to submit his/hers solution to web application which provides interface to upload multiple files and then submit them. More detailed description follows:
After user submits solution then web application has to hand over all needed information about submission to broker. Submit endpoint is extended with support of "cross-submitting" which means that user with high privileges (supervisor, administrator) can submit solution for user with lower privileges (student). 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:
Worker gets request from broker to evaluate particular submission. Next step is to evaluate given submission and upload results to fileserver. After this worker only send broker that submission was evaluated. More detailed description follows:
Broker gets done message from worker and basically only mark submission as done in its internal structures. After that broker has to tell Web API that execution of particular job ended. More detailed description follows:
Web API is notified about job status through simple http calls originated from broker. After that API is deciding if evaluated submission will be evaluated immediatelly or on demand. More detailed description follows:
- job ended with status "OK"
- if submission was evaluation of reference solution
- results of evaluation are loaded from fileserver and unzipped
- actual time and memmory consumption and other suitable results are retrieved
- solution evaluation database entity is created and persisted
- if evaluation of results failed report to administrator is sent
- if submission was normal student evaluation
- if user submitted solution by him/herself then nothing is done here
- administrator or supervisor submitted exercise as particular user
- results of submission are processed as described further in "On demand loading" chapter
- job ended with status "FAILED"
- job failure is saved into database alongside other reported errors
- email is prepared and sent to ReCodEx administrator
### On demand loading
Realised as calling of evaluate API endpoint. Results of submission are loaded from fileserver and then processed. More detailed description follows:
- results of submission are retrived from fileserver
- with job config used for submission results are loaded into internal API structures
- typed results are used to compute overall score of solution
- above detected score with any other suitable information are stored into database as solution evaluation entity
## Web Application
Web Application has only a simple work to do. If results is obtained on demand then proper API call is executed and results are obtained and shown to user. More detailed description follows:
- if results of submission are not prepared yet evaluate API endpoint is called
- after this results should be present and can be shown to user