There are following components:
- Frontend (
frontend_server
) serves HTML/JS/CSS for users - Backend (
backend_service
) serves main database with users, contests, assignment and solutions- Backend provides JSON REST API used by Frontend
- Backend monitors "BuildFinished" events from RabbitMQ and updated database for the finished build
- Builder (
builder_service
) builds solutions and runs assignment input/output tests- Builder provides JSON REST API used by both Frontend and Backend
- user - any user of service, can be admin, judge or student
- contest - either long term course or short contest with a set of assignments
- assignment - one problem (i.e. task) in contest problem set
- solution - student user's solution of the given assignment
- commit - one version of solution commited by student
- Builder builds each commit, and solution score is the score of the best commit
- review - judge user's review of the solution commit source code
- build - commit build made by Builder, includes 3 steps: compile, stylecheck and tests run
- testcase - one program input/output test case used by Builder when running tests for the build
- Student wants to see assignment - it opens assignment and reads it's description
- After that, student writes program in any editor, copies source code and pastes into solution form
- Frontend accepts source code and asks Backend to add solution commit
- Backend creates commit in database and asks Builder to build it
- Builder runs compiler, style checker, and tests
- When build finished (either with success or with failure) builder emits BuildFinished event
- Backend listens BuildFinished event, re-calculates solution score and updates database
Following diagram shows how student solutions served by judge: