System Design: Room Allocation and Ranking Service
Context and assumptions:
The client sends a meeting request with: (a) time window or fixed start/end, (b) duration, (c) attendee count, (d) required equipment, and (e) preferred location/building.
The service returns a top-N ranked list of candidate rooms (or room-time pairs when a window is provided) that can be immediately reserved.
Hard constraints (capacity, equipment, availability) must be met; remaining factors are optimized via a score.
Requirements
API returns a ranked list of rooms (or room-time suggestions within the window) that satisfy hard constraints.
Propose a scoring function that integrates:
Historical room usage counts
Expected idle-time fragmentation
Attendee walking distance
Equipment match quality
Past no-show rates
Fairness across teams
Describe:
Data sources and freshness (online vs offline features)
Weight tuning strategy (rule-based vs learned model)