Cricinfo (officially ESPNcricinfo) is a comprehensive online platform dedicated to cricket. It provides live scores, ball-by-ball commentary, match schedules, team and player statistics, and news related to cricket matches.
In this chapter, we will explore the low-level design of cricinfo like service.
Let's start by clarifying the requirements:
Before starting the design, it's important to ask thoughtful questions to uncover hidden assumptions, clarify ambiguities, and define the system's scope more precisely.
Here is an example of how a conversation between the candidate and the interviewer might unfold:
Candidate: What level of detail are we talking about? Should the system just show the overall score, or should it provide detailed ball-by-ball commentary?
Interviewer: It should be detailed. Users should be able to follow a match ball-by-ball. This includes the score, which batsman is on strike, who the bowler is, and a short text description of what happened on that ball (e.g., '4 runs', 'Wicket', 'No run').
Candidate: "Okay, that clarifies the core feature. How does this live data get into our system? Should we design an admin interface for scorers to input data, or can we assume we are consuming a feed from a third-party provider?"
Interviewer: "Excellent point. Let's assume there is a reliable, official third-party API that pushes ball-by-ball data to our system. We don't need to design the data entry part, but we must design the system to receive and process these updates efficiently."
Candidate: Should we support different match formats like ODI, T20, and Test?
Interviewer: Yes, the system should support multiple match formats.
Candidate: Should the system maintain historical data like past matches, player stats, and records?
Interviewer: Yes, users should be able to browse historical data for players, teams, and matches.
Candidate: Should the system display ball-by-ball commentary and real-time score updates?
Interviewer: Yes, real-time updates and ball-by-ball commentary are essential features of the system.
Candidate: Should the system support multiple concurrent matches across different venues?
Interviewer: Yes, multiple matches can run in parallel.
Candidate: should users be able to receive notifications for key match events like wickets, boundaries, or player milestones?"
Interviewer: Yes, that's a key feature for user engagement. The system should allow users to subscribe to a match and receive notifications for important events.
After gathering the details, we can summarize the key system requirements.