Case Studies

Deep-dives into hard problems. Implementation secrets omitted by design — the judgment is the point.

Architecture · Security

Beating the Pirates: A Custom Content-Protection Protocol for a Closed Video Platform

Off-the-shelf DRM failed and cost too much. So I designed a custom content-protection protocol — on a standard-cryptography foundation — for a closed video platform. 20,000+ users, 5–10k concurrent, still holds today.

Read case study →
Distributed Systems · Architecture

We Didn't Need a Message Queue — We Needed an Event Bus

The 'microservices' were really a distributed monolith talking over RPC — and when a multi-service call failed halfway, the code manually rolled back the earlier calls. What if the rollback failed? No answer. So I moved the platform to a Kafka event bus.

Read case study →
AI / LLM · Testing · Open Source

How Do You Test an AI Agent? I Open-Sourced a Library for It

An AI agent's reply is different every run, so assert.Equal is useless — but most eval frameworks over-correct and LLM-judge everything. I built a narrow library that judges only what a plain if can't, and open-sourced it (zero dependencies, bring-your-own-model).

Read case study →
AI / LLM · Full-Stack

A Production AI Agent That Runs on $28 a Month

A full multi-tenant SaaS that plugs into businesses' Meta channels — WhatsApp, Messenger, Instagram — so their customers chat with an AI that quotes and books. Everyone builds these in Python with LangGraph; for a low-end box that's bloat. I built it in Go, and it runs the whole thing for about $28 a month.

Read case study →
Systems · Concurrency · First Principles

Building Go's Goroutine Scheduler From Scratch in C

I use goroutines every day but couldn't explain what one really is. So I rebuilt the core of Go's runtime — stackful coroutines on an epoll event loop — from scratch in C, and proved three concurrent I/O tasks overlapping on a single thread.

Read case study →