Design a Massive Geospatial Data Visualization Platform
Design a live map that turns more than 100 million geospatial points into zoom-aware heat-map aggregates and final-zoom pins.
Problem statement
For this exercise, assume authorized analysts explore more than 100 million geospatial points in a bounded map viewport. At broader zoom levels the product returns heat-map aggregates; at the finest supported zoom it returns individual pins.
Every accepted point has a stable identifier, coordinate, event time, version, and bounded display attributes. Each viewport response belongs to one versioned spatial snapshot, and the aggregate-to-pin transition occurs only at the declared final zoom.
The client receives viewport- and zoom-bounded tiles or cells, chooses an appropriate SVG, canvas, or WebGL rendering path for the visible object count, and may move heavy decode or transformation work to a web worker. Cached spatial responses carry a snapshot version and freshness.
Live SSE changes carry increasing cursors; when the client detects a gap or a stale cache entry, it reloads a consistent viewport while a coarser zoom remains available as a bounded fallback.
Design point ingestion, spatial indexing and aggregation, viewport APIs, snapshot consistency, caching, live delivery, browser rendering and memory boundaries, failure recovery, capacity planning, and observability.
Point editing, route planning, geocoding, base-map artwork generation, long-term analytical reporting, and public unauthenticated access are outside scope.
What to build
- The platform accepts versioned point updates and makes their latest accepted state available to spatial snapshots without creating duplicate logical points.
- An analyst can pan and zoom a bounded viewport, receiving heat-map aggregates at broad zooms and individual point pins only at the final zoom.
- A viewer can follow ordered live changes for the active viewport and recover a consistent snapshot after a cursor gap or disconnect.
- The browser keeps interaction responsive by bounding returned and rendered objects, selecting an appropriate renderer, caching versioned spatial responses, and using a coarser fallback when needed.
At scale
- For this exercise, assume 100 million retained points and peaks of 50,000 accepted point updates per second.
- For this exercise, assume 20,000 concurrent viewers, each with one active bounded viewport and occasional pan or zoom bursts.
- For this exercise, target a two-second p95 initial viewport response and make healthy live updates visible within five seconds.
- For this exercise, a viewport response must cap both payload bytes and visible objects, while snapshot versions and cursors make cache and stream recovery explicit.