Start by clarifying functional and non-functional requirements, then sketch a high-level architecture covering problem storage, submission pipeline, sandboxed execution, and results storage. Dive deep into the most critical components like the sandbox and queuing system, discussing trade-offs and scalability.
Pro tip: Emphasize security and isolation in the sandbox, as it's the most challenging part; mention using containers with seccomp and cgroups, and consider pre-warming sandboxes to reduce latency.
Ask about scale (users, submissions per day), supported languages, latency expectations, and features like contests/leaderboards. Define functional and non-functional requirements.
Outline main components: API gateway, problem service, submission service, judge workers, result store, and optional leaderboard service. Sketch data flow from submission to verdict.
Explain how to run untrusted code securely: use containers (Docker) with resource limits (CPU, memory, time), network isolation, and seccomp. Discuss multi-language support via pre-built images.
Discuss queuing (e.g., Kafka, RabbitMQ) to handle bursts, auto-scaling judge workers, and ensuring fault tolerance. Address result storage (e.g., NoSQL for submissions, SQL for problems).
Talk about trade-offs: synchronous vs asynchronous judging, caching, and consistency. Mention optional features like leaderboards (using Redis sorted sets) and contest handling.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.