-
Notifications
You must be signed in to change notification settings - Fork 1
New Architecture - Pipeline & Sandbox Pool & Database #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ArthurCRodrigues
wants to merge
52
commits into
main
Choose a base branch
from
pipeline-architecture
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config grading WIP
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…twork/autograder into pipeline-architecture # Conflicts: # autograder/autograder.py
…simplifying imports
This reverts commit d0b30f8.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'll add some bullet points and quick explanations here, so for more details, check #151
Context
We were running into some nasty problems when trying to run the project as a web API. Static variables, state and speed were being a major concern and it was simply impossible to run it as a service.
Also, the previous architecture relied in an orchestrated grading workflow that was causing the orchestration file (
autograder_facade.py) to be extremely coupled. Adding a new step meant adding orchestration logic to the grading process.When it comes to executing student code remotely, we were spinning containers for every request with no proper control. And spinning containers was taking most of the request time.
Finally, we had the goal of being able to store grading packages so that teachers could only send them once and for every submission keep only a reference of the assignment configuration.
Solution
So, in this PR, we introduce an architecture that follows a pipeline pattern: Each step knows that it takes place in a grading process, they're not simple service providers anymore (they are
choreographed, notorchestrated). Which makes it way easier to include more steps or adjust the order of which steps are executed within the pipeline.Secondarily, we introduce a really robust sandbox management sub-system that's responsible for handling all sandbox containers. It uses an optmization technique that starts containers upon application startup and keep them "warm" and ready to receive code. By doing this, we manage to keep control of container usage within the system and also solve the problem of container startup time for requests since they'll be already up.
Pipeline Architecture
An
AutograderPipelineis an instance of a grading recipe based on the grading configuration. It contains all the necessary steps (and associated data) to grade the assignment configured by the teacher. One pipeline can have the setup step for checking for required files while another may not, it all depends on what the teachers configured.And what's cool about the
AutograderPipelineis that it's really about the recipe. You cancooksubmissions with it as much as you want. It is a stateless representation of an specific grading workflow, that can be executed for any submission. As you can see, it is highly compatible with the goal of storing grading packages and simply having their references for further grading.Finally, we fixed the problems of static variables by following proper coding practices and not using static member variables anymore.
Sandbox Management
Since this is a draft PR, I haven't yet implemented this one. But I'm doing the research and the key points here is:
Gvisorfor enhanced isolation