Skip to content
All workCASE STUDY · 01 / 03
Open sourceDistributed code judge engine

goComp

A distributed online judge in Go that runs untrusted submissions in isolated Docker containers across concurrent worker pools.

STACK
GoDockerRedisREST APIsWorker pools
goComp logo: the Go gopher at a laptop above AC, WA, TLE and RE verdicts
01 — The problem

An online judge has to run code it can't trust, in several languages, quickly and fairly. Every submission needs the same limits, the same inputs and a deterministic verdict, and one bad program must never affect another or the host.

02 — Approach
  1. 01Submissions enter a Redis-backed queue through a REST API, so accepting work is decoupled from running it.
  2. 02A pool of Go workers pulls jobs concurrently. Each job runs in its own Docker container with CPU, memory and wall-clock limits.
  3. 03The runner captures stdout and stderr, compares output against test cases one by one, and reports a verdict such as accepted, wrong answer, time limit or runtime error.
Architecture
  1. 1APIREST endpoint validates and enqueues submissions
  2. 2QueueRedis holds pending jobs and results
  3. 3WorkersConcurrent Go worker pool pulls jobs
  4. 4SandboxPer-run Docker container with resource limits
  5. 5VerdictOutput diffed per test case, result stored
03 — Highlights
  • Isolated, containerized execution environments for secure multi-language evaluation.
  • Concurrent worker pipelines and execution queues with timeout and resource-limit enforcement.
  • Sandboxed runtime orchestration with Docker process isolation, stdout/stderr capture and deterministic test execution.
NEXT PROJECTVithos