hermod

2026 · A ride-dispatch engine in Go on Manhattan's road graph: it replays 76,312 real 2010 taxi requests, and matching in 10-second batches serves 49% more riders than greedy when drivers are short.

hermod decides which driver picks up which rider. It works on Manhattan's real road network, a 36,108-node graph of its drivable roads from OpenStreetMap, one-way streets included, so every choice is made on time by road rather than straight-line distance. To see how a matcher would really do, it replays a 2010 weekday rush hour from New York's taxi records through a simulator that gives the same result for the same seed, byte for byte.

It's built from scratch in Go, with a core that imports only the standard library: shortest-path routing, a spatial index of drivers, compare-and-swap driver claims, a Hungarian solver for batch matching, and an invariant checker that reads every run's event log. It also runs live behind an HTTP API under load. The site replays a simulated morning, greedy and batched side by side, with every result and the run that measured it.

  • Go
  • Python
  • PostgreSQL
  • Docker
  • GitHub Actions
  • Next.js
  • TypeScript

Highlights

  • A standard-library-only Go core routes on a 36,108-node OpenStreetMap graph of Manhattan: Dijkstra, A* and a bounded reverse one-to-many search that times a request's 20 nearest drivers by road in 0.79 ms, with route lengths within 0.04% of OSRM's in the median.
  • An in-process uniform-grid index with per-cell locks and per-driver compare-and-swap claims, so concurrent matchers never double-book a driver, finds the 20 nearest idle drivers in 1.69 µs: 62× faster than Valkey GEOSEARCH over loopback, 16× on Valkey's own command time. Re-ranking them by road time changes about half of all picks.
  • A seeded discrete-event simulator replays 76,312 NYC taxi requests from a 2010 rush hour with byte-identical reruns, its travel times calibrated to the taxis' recorded durations by hour (median ratio 0.995–1.02). Matching in 10-second batches with a rectangular Hungarian solver, fuzzed against brute force on 3.8M matrices, served 49% more riders than greedy at 2,000 drivers and cut the median pickup ETA from 6.0 to 0.8 min.
  • Runs live behind an HTTP API with a Server-Sent Events stream: under k6 at Manhattan's busiest hour with 10,000 drivers, a ride request takes 0.64 ms at p50 and 3.6 ms at p99 with greedy matching, and five load runs, 8.1 million requests, ended with 0 invariant violations.
  • Every run, simulated or live, goes through an invariant checker that reads only the event log: one driver per trip, no offers to offline drivers, every request ending exactly once. It held over 150 seeded runs, alongside fuzz oracles and the race detector, and caught all 39 planted bugs; it also traced an implausibly large batching gain to minute-rounded timestamps in half of the taxi data.

Links