Design an Online Coding Practice Platform
Design a versioned programming-problem catalog and a safe asynchronous judge that produces reproducible submission verdicts.
Problem statement
For this exercise, assume learners browse published programming problems, open one immutable problem version, submit source code in one supported language, and receive a durable verdict after the code runs against the testcase version bound at acceptance.
Submitted programs are untrusted and execute with bounded CPU, memory, wall time, output, filesystem, and network access inside disposable isolation. A stable submission identity makes client retries return the original accepted run instead of scheduling another logical submission.
Results expose queued, running, and terminal states plus bounded compilation, testcase-category, runtime, and memory information without revealing protected testcase content.
The report supplies no numeric problem count, submission rate, language count, latency target, availability target, resource limits, or retention period, so choose bounded assumptions and show how they drive catalog storage, queueing, worker pools, admission control, and result retention.
Contests, social discussion, recommendations, interviews, payments, collaborative editing, and problem-authoring tools are outside scope.
What to build
- A learner can browse published problems and read one immutable problem version with supported languages and visible examples.
- A learner can idempotently submit bounded source code for one exact problem, testcase, and runtime version and receive a durable submission identity.
- The platform can compile and execute untrusted code under enforced resource and access limits and converge each logical submission on one terminal verdict.
- A learner can reconnect, inspect queued or running state, and retrieve bounded compilation, verdict, runtime, and memory results without receiving protected testcase content.
At scale
- The report identifies an online coding-practice platform but supplies no numeric catalog size, submission rate, language count, latency, availability, execution limit, or retention period; state bounded assumptions before sizing the system.
- Submission traffic can be bursty and runtime demand is skewed by language and program behavior, so the design must explain admission control, fair queueing, and capacity isolation under the candidate's bounds.
- Every accepted submission remains bound to immutable problem, testcase, runtime, and resource-policy versions even if those definitions change later.
- Worker and message delivery may fail or repeat, but one stable submission identity must converge on one durable terminal outcome without trusting submitted code.