10,000,000 users
1 meeting created per day per user
2 meetings accepted per day per user
Each persons calendar has 2 meetings per day on average
So 10,000,000 meetings created per day or ~100 meetings per second, ~200 meetings accepted per second
User APIs
view_calendar(user_id, granularity)
granularity may be day/week/month - Returns calendar with available and busy time slots
available_meeting_rooms(office_id, start_time, end_time, num_attendees)
Returns list of available rooms (room_name, room_id)
reserve_room(room_id)
If a room cannot be reserved return 400 error, else return 200 and reservation_id
create_meeting(reservation_id, start_date, end_date, List
Return meeting ID
create_recurring_meeting(reservation_id, meeting_schedule, List
cancel_meeting(reservation_id, meeting_id)
Remove meeting from calendars of all attendees and free up the meeting room reservation
accept_meeting(meeting_id)
decline_meeting(meeting_id)
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Request flows from the Load balancer that does user based partitioning so requests from same user goes to same API server.
To view a calendar for specified user, we use calendar manager, which talks to the calendar DB
To reserve meeting room, we ask the reservation manager which talks to the reservation DB.
Accept/decline meeting talks to calendar manager
Create and Cancel meeting APIs talk to both calendar manager and reservation manager since in both we need to update the calendar table and the meeting reservation table.
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?