Backend & AI systems engineer
Deep dives from the systems I build and run
Architecture, protocols, and production postmortems — what broke, why it broke, and the principle worth keeping. Written for engineers who have to operate what they ship.
13 posts · latest 2026-06-30
All writing · 13
- 2026-06-30 · 20 min read traceroutenetworkinggfwdebugging
How traceroute Works, and How I Used It to Catch the GFW
A site on Google Cloud was unreachable from China without a VPN. Here's traceroute from first principles -- packets, hops, gateways, the TTL trick -- and how to read its output to find exactly where a connection dies.
- 2026-06-30 · 14 min read tanstack-startnextjsarchitecturersc
TanStack Start vs Next.js: Opposite Bets on the Boundary
Choosing between TanStack Start and Next.js? They make opposite bets on the client-server boundary -- everything else follows.
- 2026-06-29 · 9 min read llmpipelinestructured-outputpython
Mining a Sitcom for Slang with a Resumable LLM Pipeline
Anki cards in, a curated bilingual deck out — schema-validated LLM calls, MD5 checkpoints, and three passes that each do one job.
- 2026-06-12 · 11 min read fundamentalsarchitectureabstractionindirection
Another Level of Indirection: The Oldest Trick in CS
Pointers, DNS, the AI SDK's intermediate representation, MCP -- one principle underneath. What an extra layer buys, and what it costs.
- 2026-06-12 · 22 min read mcpwordpressdeepseektypescript
Hand-Rolling a WordPress MCP: One Prompt to Published Post
No SDKs. A hand-written MCP server (all three primitives) and a hand-written client wired to DeepSeek, driving WordPress for real -- with actual wire messages and screenshots.
- 2026-06-12 · 12 min read architecturefundamentalsprotocolsabstraction
The M x N Problem: One Pattern Behind USB, LSP, and MCP
Every 'USB-C for X' pitch is the same old trick: insert a standard interface and turn M x N integrations into M + N.
- 2026-06-12 · 22 min read tmuxptyterminalai-agents
Why tmux Became the Control Room for AI Agent Teams
What tmux actually does, built up from terminals, shells, and PTYs — and why agent harnesses all settled on it.
- 2026-06-11 · 14 min read ai-sdkstreamingssedeepseek
AI Streaming Froze for 50 Seconds: A Production Postmortem
A streaming endpoint sat dead for tens of seconds after hitting save. A first-token probe, controlled experiments, and raw SSE frames traced it to thinking mode.
- 2026-06-11 · 24 min read ai-sdkarchitectureprovideragent
Build Your Own Mini Vercel AI SDK
Calling two providers' raw protocols hurts. Feel the pain first, then open the real SDK's layered design, then build a mini version with the same interface.
- 2026-06-11 · 12 min read ai-sdkstructured-outputjsondeepseek
streamObject Deep Dive: Half-Finished JSON and the json_schema Trap
Streamed JSON is invalid until the last byte arrives — so how does the SDK parse it? Plus a full postmortem of response_format blowing up on DeepSeek's official endpoint.
- 2026-06-11 · 19 min read mcpllmagentarchitecture
Why MCP Exists: From Hardwired Tools to a Standard Protocol
Skip the definitions. Starting from "let AI run my WordPress", we derive what MCP actually solves, what it doesn't, and how it really relates to LLMs and Claude Code.
- 2026-04-15 · 11 min read agentllmclaudearchitecture
Build a Mini Agent: Three Truths About Tools, Loops, and Context
Build a working agent in under 50 lines, then discover the real complexity isn't in the loop -- it's in tool boundaries and context management.
- 2026-04-14 · 14 min read nginxvercelnextjsdevops
Reverse-Proxying Vercel: Five Pitfalls, Fully Explained
Vercel is slow from mainland China? Put an Nginx reverse proxy in Hong Kong in front of it. This guide breaks down the five traps along the way -- 522 handshake timeouts, Server Actions CSRF errors, broken static caching, intermittent Code 99 challenges, __resolve-check 404s -- and the mechanics behind each one.