A online grading microservice
Grading in this case is:
- Take a given payload (notebooks, code files, url with zip files, etc)
- Run it in a given environment (docker image), with possibly some ancillary files
- Record and 'return' the STDOUT / STDERR to caller
This should be done in a scaleable and secure fashion.
It can support both files passed in as HTTP mutli-part uploads, or a url that provides the payload.
Options would be:
- WebHook notification
- Polling on the caller's side
These are things that are copied into the environment before being executed. These should provide the grading scripts.
Currently these can be pulled in from a git repository.
- Payload content (minio / GCS)
- Grading information (Bunch of files!)
- Webhook metadata (where to send results to + additional metadata)
- In-flight requests (redis?)
- Flask frontend, accepts POSTs: a. URL to get payload from b. environment to run tests in (docker image spec) c. ancillary files to pull in (URL?) d. arbitrary metadata to be associated with this request e. response webhook URL
- Puts in queue
- Worker picks it up, fetches payload + ancillary files if necessary.
- Runs a docker container of environment, mounting ancillary files + payload in it appropriately. Captures stdout / stderr
- Worker fires off webhook to target
- Should be able to completely run locally, with just docker daemon (and possibly redis) as dependency