Estimate the scale of the system. Consider daily active users, read/write ratio, storage requirements, bandwidth, and any relevant QPS calculations...
(RESTful APIs)
SearchAvailableRooms (time-slot, capacity, location, equipment)
POST
URL: rooms/search
RequestBody:
{
required timeslot
optional capacity
optional location
optional equipment
}
ResponseBody:
{
roomList
}
ManageBooking(create, update, cancel)
POST rooms/
RequestBody:
{
users
timeslot
}
Status: 200 / 409 for conflict
ResponseBody: booking object
ManageRoom() <- admin only
POST
URL: rooms
RequestBody:
{
required roomId
required capacity
required location
required equipment
}
ResponseBody: room object
Status: 200
PUT/PATCH
URL: rooms
...
Broken into micro services behind a Gateway (but could be modules in monolith).
Different APIs for
Scheduling does not have an API it's an asynchronous triggered internal service.
RoomSearch has an asynchronous search index populated as it will be the hottest path of the system. It takes events from RoomDB and updates its search index.
UserDB / RoomDB / UserAuth / BookingDB
RoomSearchIndex:
All DBs can be shared by organization.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
(Omitted from HLD) Gateway can defer to LB before micro services. Allowing each stateless micro service to scale up horizontally.
Scheduling can receive async booking events via pub/sub mechanism. At which point it will store the schedule with time and place in its DB. It can either use an external scheduling service, or do its own scheduling logic with daily Cron invocations and scheduledAt db events. Scheduling service can read UserDB for contact information and also store its own user contact preferences.
BookingsDB will enforce transactional behavior.