💁🏻♂️ System Design: Online Judge for coding contests.
The above video is pretty scant on details and rigor. Would like further resources to validate my solution to this problem.
1. Problem definition: use cases and constraints
Gather requirements and scope the problem. Ask questions to clarify use cases and constraints. Discuss assumptions.
Take code from users across the world, and test whether their submitted code is passing all test cases or failing some test cases.
👋 Without an interviewer to address clarifying questions, we'll define some use cases and constraints.
We'll scope the problem to handle only the following use cases
Out of scope
- User registers for an account
- User logs into a registered account
- System management of question bank.
Constraints and assumptions
- The Youtube video provide no clear constraints, so I’ll make them up.
- Traffic is not evenly distributed. Some customers are heavy users, some aren’t. During a competition, traffic will be highest.
- Website has 1 million active users
- 100 code submissions per active user per month → 100 million
- 100 code submissions per second, at peak
- API must be high-availability during competitions, at peak load.