How the interviewer opens it
“Design a service that detects when devices enter or leave geographic boundaries. The service must handle many location updates and limit false transitions from GPS noise.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Scale
- Fence catalog
- Read and write mix
- GPS quality and false transitions
- Transition meaning
- Latency
- Update order
- Consistency and availability
- Durability and delivery
- Scope limits
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Register circles and polygons as geographic fences
- Accept device location updates
- Detect stable enter and exit transitions
- Deliver transition events to consumers
Usually out of scope
- Collect GPS fixes on devices
- Reconstruct routes between location samples
- Support worldwide deployment
- Build a map display
What interviewers ask about
- Which fences apply
- Most fences are irrelevant to each fix. A search must avoid missed matches and still find exits beyond the previous fence.
- Locations near a boundary
- GPS error can place a stationary device on either side of a boundary. Less false activity requires more evidence and adds delay.
- Device history and event delivery
- Late fixes can reverse state incorrectly. Worker failures can separate a state change from its event or create conflicting device histories.
Common mistakes
- A candidate treats each GPS fix as an exact position.
- A candidate ignores prior memberships when the device leaves the spatial search area.
- A candidate changes confirmed state when an older fix arrives.
- A candidate lets duplicate fixes count as independent evidence.
- A candidate changes state without a durable event recovery path.
- A candidate promises continuous movement detection from sparse location samples.
The bar by level
- Senior (L5/E5)
- Meets peak load with bounded candidate work. Handles stale fixes, worker recovery, and atomic state and event commits. Explains noise and delay trade-offs.
- Staff (L6+/E6+)
- Quantifies overlap costs and recovery capacity. Defines ownership guarantees during failures. Sets evidence policies from test traces and adapts guarantees for catalog changes.