GUIDES & NOTES

Reference writing on systems I've had to get right — message delivery, billing correctness, retry semantics. Written to be useful on a system that isn't mine, with the failure modes that shaped each design.

How to show analytics for a high-throughput system

Instant and fresh at the same time. Materialise the numbers, serve the saved copy first, refresh only what's stale, and tier the recompute by what each screen needs. 20s to 200ms at double the page size.

How to add a fourth channel without building a fourth pipeline

Provider differences are loud and visible. The shared concerns are quiet and abstract. That asymmetry is why messaging systems end up with one pipeline per channel.

How to create a consumer for all your queues

Throughput is workers × batch ÷ cycle — and the three factors cost wildly different amounts. When to raise batch size, when to add workers, and why a webhook forwarder and a fan-out writer must never share a config.

How to bill AI usage without making a loss

Store money, show operations, and never let anyone type a rate into a form. The design I'd build again — rate cards, credit waterfalls, the two clocks — plus the four things that broke on the way.

18:30 UTC is not midnight

A constant that was right once, in one place, for one market — then copied to five call sites. Constants are concepts that never got named.

The model is rented. The memory is yours.

A roadmap from prototype to something usable, written as gates rather than milestones — each phase has one number you must hit before you earn the next.