Design an online coding contest platform
Company: Meta
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design a platform to host timed programming contests (similar to weekly/biweekly coding contests).
## Core scenario
- Users register for a contest, read problems, submit solutions during a fixed time window.
- The system judges submissions, computes per-problem results (AC/WA/TLE/etc.), and produces a live leaderboard.
## Requirements
### Functional
- Contest lifecycle: create contest, schedule start/end, publish problems.
- User participation: registration/eligibility, start contest, view problems.
- Submissions: accept code, compile/run, return verdict + runtime/memory.
- Scoring & ranking: points/penalties, tie-break rules, frozen board near end (optional).
- Live updates: near-real-time leaderboard.
- Anti-cheat basics: rate limiting, plagiarism signals (high-level).
### Non-functional
- High concurrency at start and near deadlines.
- Strong isolation/security for running untrusted code.
- Reliability: submissions must not be lost; judge results must be auditable.
- Low latency for submission acknowledgment; judging latency can be seconds.
## Deliverables
Explain your high-level architecture, key services, data storage choices, queueing/judging pipeline, and how you scale and keep the leaderboard correct.
Quick Answer: This question evaluates a candidate's ability to design scalable, reliable, and secure distributed systems for real-time, event-driven workloads, covering competencies such as concurrency control, scoring and ranking logic, live updates, and sandboxed execution of untrusted code.