Design a Superhero Dispatch System
Design a backend system for a superhero rescue marketplace.
Core Functionality
Civilians can report emergencies such as accidents, fires, or crimes. The platform should:
- Create a rescue request.
- Identify appropriate nearby superheroes.
- Notify them.
- Allow one hero to accept the request.
- Track the hero's travel to the incident.
Dispatchers should be able to monitor request status.
System Characteristics
The system is similar to ride-hailing dispatch, but with key differences:
- Request volume is lower than a major ride-sharing platform.
- Reliability is more important than maximizing throughput.
Design Focus Areas
Candidates should focus on system architecture and technical tradeoffs, rather than API endpoint design. Cover the following aspects:
- Core functional requirements and non-functional requirements.
- Main services and data storage choices.
- Data model for users, heroes, incidents, offers, and assignments.
- How to track hero location and availability.
- Matching and dispatch logic.
- Request state transitions from creation to completion.
- Concurrency handling when multiple heroes try to accept the same incident.
- Notifications, retries, timeouts, and failure handling.
- Observability and operational concerns.
- Justification for major technology choices.
AI interview prep
Core dilemma
Ensuring reliable, real-time dispatch and assignment of critical incidents, balancing timely hero notification with robust concurrency control and fault tolerance, especially given the 'reliability over throughput' constraint.
2 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design a Superhero Dispatch System
Design a backend system for a superhero rescue marketplace.
Core Functionality
Civilians can report emergencies such as accidents, fires, or crimes. The platform should:
- Create a rescue request.
- Identify appropriate nearby superheroes.
- Notify them.
- Allow one hero to accept the request.
- Track the hero's travel to the incident.
Dispatchers should be able to monitor request status.
System Characteristics
The system is similar to ride-hailing dispatch, but with key differences:
- Request volume is lower than a major ride-sharing platform.
- Reliability is more important than maximizing throughput.
Design Focus Areas
Candidates should focus on system architecture and technical tradeoffs, rather than API endpoint design. Cover the following aspects:
- Core functional requirements and non-functional requirements.
- Main services and data storage choices.
- Data model for users, heroes, incidents, offers, and assignments.
- How to track hero location and availability.
- Matching and dispatch logic.
- Request state transitions from creation to completion.
- Concurrency handling when multiple heroes try to accept the same incident.
- Notifications, retries, timeouts, and failure handling.
- Observability and operational concerns.
- Justification for major technology choices.