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: Should we support different match formats like ODI, T20, and Test?
Interviewer: Yes, the system should support multiple match formats.
Candidate: 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.
Candidate: How does this live data get into our system? Should we design an admin interface to input match data, or can we assume we are consuming a feed from a third-party provider?
Interviewer: Let's assume there is a reliable, official third-party API that pushes ball-by-ball data to our system. For this version, we can hardcode a series of match events.
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 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 allow tracking multiple matches simultaneously?
Interviewer: Yes, the system should support concurrent matches.
Candidate: Should users be able to receive notifications for key match events like wickets, boundaries, or player milestones?
Interviewer: Yes, 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.