Showcase concept Studio showcase — a concept build demonstrating our approach.

Northwind Atlas

A whole fleet, live, on one map.

Discipline
Platform · Web · Real-time data
Stack
Next.js, Rust (Tokio + Axum), NATS JetStream, ClickHouse
Timeline
18 weeks (concept plan)
Role
Architecture, backend, frontend, SRE
01 — The brief

Every truck, every pallet, right now.

Northwind is a fictional freight operator running 1,200+ vehicles across eight depots. The concept brief: replace six dashboards and a wall of spreadsheets with one live operations view that a dispatcher can trust at 3am.

Telematics, scans, ETAs and exceptions all arrive as events. The ops floor needs to see the fleet move in real time, spot the one late load that matters, and act on it — without the browser falling over.

Users
Dispatchers, depot leads, customer ops
Throughput
50k events/sec peak, 4B/month
Must-haves
Live map, exception queue, replay
Uptime
24/7 — no maintenance windows
02 — The challenge

A firehose, and one signal.

Fifty thousand events a second is easy to store and impossible to look at. A browser can't apply 50k DOM updates a second, and a dispatcher can't read them. The job is turning a firehose into a calm map with the right thing glowing.

  1. C/01

    Ingest-to-glass under 120ms

    p99 from a vehicle's telemetry ping to the pixel moving on the dispatcher's screen.

  2. C/02

    Send deltas, not data

    Each browser subscribes to its viewport. The server aggregates, quantises and ships binary diffs.

  3. C/03

    Zero-downtime everything

    Rolling deploys, replayable streams and backpressure that degrades gracefully instead of dropping events.

03 — Approach

Contract, pipe, pixel.

We built from the event schema outward — so every layer agrees on what a "truck" is.

  1. 01
    wk 1–3

    Event contract

    Protobuf schemas for 14 event types, versioned and code-generated for Rust and TypeScript. Breaking changes fail CI.

  2. 02
    wk 3–9

    Rust ingest

    Tokio services consume NATS JetStream, batch by 5ms windows, fold into per-vehicle state and fan out to ClickHouse for history.

  3. 03
    wk 7–14

    Viewport streaming

    WebSocket subscriptions keyed by map tiles. Binary frames carry only what changed in the area you're looking at.

  4. 04
    wk 10–18

    Canvas renderer

    Positions interpolate between frames on the GPU-friendly canvas path, so 2,000 vehicles glide at 60fps on an ops laptop.

04 — Interactive

The ops floor, live.

A simulated slice of the Atlas renderer: vehicles interpolating along routes, a rolling event rate and the raw stream. All data is generated in your browser.

atlas://live-ops — region: northwind · simulated
LIVE
05 — Engineering highlights

Where the craft lives.

E/01

5ms windows, bounded memory

Ingest folds raw pings into per-vehicle state in short windows. Bounded channels give us backpressure for free: if a consumer slows, producers wait instead of OOM-ing.

ingest/src/fold.rs
pub async fn fold_loop(mut rx: Receiver<Ping>, tx: Sender<TileDelta>) -> Result<()> {
    let mut state: HashMap<VehicleId, VehicleState> = HashMap::with_capacity(4096);
    let mut tick = tokio::time::interval(Duration::from_millis(5));

    loop {
        tokio::select! {
            Some(ping) = rx.recv() => {
                state.entry(ping.vehicle).or_default().apply(&ping);
            }
            _ = tick.tick() => {
                // Only vehicles that moved this window become a delta.
                let deltas = drain_dirty(&mut state).group_by_tile(ZOOM_LEVELS);
                for d in deltas { tx.send(d).await?; } // bounded: backpressure
            }
        }
    }
}
E/02

Binary frames, interpolated

Positions arrive as quantised Int16 pairs in an ArrayBuffer — 6 bytes per vehicle. The renderer eases between the last two frames, so motion stays smooth even when the network hiccups.

web/lib/stream.ts
socket.binaryType = "arraybuffer";
socket.onmessage = ({ data }: MessageEvent<ArrayBuffer>) => {
  const view = new DataView(data);
  const count = view.getUint16(0);
  for (let i = 0, o = 2; i < count; i++, o += 6) {
    const id = view.getUint16(o);
    const v = fleet.get(id) ?? fleet.spawn(id);
    v.prev.set(v.next);                           // keep last frame
    v.next.set(dequant(view.getInt16(o + 2)), dequant(view.getInt16(o + 4)));
    v.t0 = performance.now();
  }
};

export const position = (v: Vehicle, now: number) =>
  lerp2(v.prev, v.next, Math.min(1, (now - v.t0) / FRAME_MS));
E/03

History without the wait

A ClickHouse materialised view pre-aggregates the stream into one-minute buckets, so replaying a whole night shift is a sub-second query.

clickhouse/views/fleet_minute.sql
CREATE MATERIALIZED VIEW fleet_minute
ENGINE = AggregatingMergeTree
ORDER BY (depot, vehicle_id, minute)
AS SELECT
    depot,
    vehicle_id,
    toStartOfMinute(ts)            AS minute,
    argMaxState(lat, ts)           AS last_lat,
    argMaxState(lon, ts)           AS last_lon,
    avgState(speed_kmh)            AS avg_speed,
    countIfState(kind = 'DELAY')   AS delays
FROM events
GROUP BY depot, vehicle_id, minute;
06 — Targets & results

Numbers we build to.

Load-test benchmarks and SLO targets for this concept — the budgets we'd contract on a real engagement.

  • Benchmark · sustained50k/sEvents ingested
  • Target · p99<120msIngest to glass
  • Benchmark · M2 Air2,000Vehicles at 60fps
  • SLO target99.95%Monthly availability
07 — Stack

The toolkit.

Frontend

  • Next.js
  • TypeScript
  • Canvas 2D / WebGL
  • TanStack Query

Backend

  • Rust
  • Tokio
  • Axum
  • Protobuf

Data

  • NATS JetStream
  • ClickHouse
  • Postgres + PostGIS
  • Redis

Ops

  • Kubernetes
  • OpenTelemetry
  • Grafana
  • k6
Next project — 01 / 03 Aurum Luxury commerce · Hydrogen + WebGL