diff --git a/Submission-flow.md b/Submission-flow.md index 56d5e52..0fb9ba9 100644 --- a/Submission-flow.md +++ b/Submission-flow.md @@ -71,34 +71,19 @@ Broker gets done message from worker and basically only mark submission as done ## 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: - -- 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 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: + +1. job arrived with successful evaluation status + 1. results of evaluation are downloaded from fileserver where it was uploaded by worker and then unzipped + 2. result yaml file is loaded and actual time and memory consumption are retrieved + 3. overall results are computed and stored into database +2. job arrived as failed + 1. job failure is saved into database alongside other reported errors + 2 email is sent to ReCodEx administrator that job failed and cannot be properly executed ## 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 -- after this results should be present and can be shown to user \ No newline at end of file +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 \ No newline at end of file