@ -71,34 +71,19 @@ Broker gets done message from worker and basically only mark submission as done
## Web API
## Web API
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:
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:
- job ended with status "OK"
1. job arrived with successful evaluation status
- if submission was evaluation of reference solution
1. results of evaluation are downloaded from fileserver where it was uploaded by worker and then unzipped
- results of evaluation are loaded from fileserver and unzipped
2. result yaml file is loaded and actual time and memory consumption are retrieved
- actual time and memmory consumption and other suitable results are retrieved
3. overall results are computed and stored into database
- solution evaluation database entity is created and persisted
2. job arrived as failed
- if evaluation of results failed report to administrator is sent
1. job failure is saved into database alongside other reported errors
- if submission was normal student evaluation
2 email is sent to ReCodEx administrator that job failed and cannot be properly executed
- 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
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:
Web Application has only a simple work to do. It has to obtain results from Web API. More detailed description follows:
- if results of submission are not prepared yet evaluate API endpoint is called
1. Web Application sends request for results of particular submission
- after this results should be present and can be shown to user
2. if results are available than they are sent back to Web Application and displayed to user