Skip to content
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

feat: Implement Run Service #76

Closed
wants to merge 5 commits into from
Closed

feat: Implement Run Service #76

wants to merge 5 commits into from

Conversation

georgetayqy
Copy link

Description

We do not have a sandboxed environment where we can execute code right now.

We can integrate Judge0 into our application to ensure that users are able to execute code on the server.

An instance of Judge0 has been deployed onto AWS, and I have shared the IP address privately with you to prevent abuse of the system right now.

Remember to include the API Key with the Headers X-Auth-User and X-Auth-Token to ensure that you are authorized to make calls to the /submissions path on the sandbox to execute your code.

The Schemas for the inputs and outputs have been added into the team's Miro board, but I have included them below for your convenience:

Request

{
  "source_code": "string",
  "language_id": "71", (for Python)
  "stdin": "string",
  "expected_output": "string", (w.r.t stdout, users need to print their answers ~ Kattis)
  "max_processes_and_or_threads": 1,
  ["cpu_time_limit": 10.0 (in seconds)],
  ["cpu_extra_time": 1.0 (in seconds)],
  ["memory_limit": 12800 (in KB)]
}

Note

The [] values represent optional values you may or may not want to set. Defaults have already been set on the server.

Response

{
 "stdout": null, (or string)
  "time": "0.02", [in seconds]
  "memory": 7172, [in KB]
  "stderr": null, (or string)
  "token": uuid,  [used if we are polling]
  "compile_output": null, (or string)
  "message": null, (or string)
  "status": {
    "id": 3,
    "description": "Accepted"
  }
}

Additional information

N/A

@georgetayqy georgetayqy added stack.Backend Backend related issues stack.Cloud Cloud Service Provider related issues chore.Feature Issue related to a general feature labels Oct 14, 2024
@georgetayqy georgetayqy added this to the D6 milestone Oct 14, 2024
@georgetayqy georgetayqy self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore.Feature Issue related to a general feature stack.Backend Backend related issues stack.Cloud Cloud Service Provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant