Writing

Notes on building systems

Mostly the things I wish someone had told me before the incident, not after. Distributed systems, event pipelines and AI that has to survive real users.

4 min read

Building custom MCP servers so your agents can use your own tools

Every agent framework needs to call your internal APIs, not just the web. A custom MCP server exposes them safely once, instead of bespoke glue per agent.

AIMCPAgentsLangGraph
Read post
4 min read

LangChain vs LangGraph: choosing the right abstraction for agent workflows

LangChain chains are a pipeline. LangGraph graphs are a state machine. The moment your agent needs to loop or branch on its own output, you've outgrown a chain.

AILangGraphLangChainAgents
Read post
4 min read

RAG is a systems problem, not a prompt problem

The demo works on day one and degrades quietly for six months. Retrieval quality and failure behaviour decide whether RAG survives contact with real users.

AIRAGArchitecture
Read post
3 min read

Designing event pipelines that survive 100K events a day

Throughput is the easy part. The hard part is a consumer restart mid-batch, two replicas double-counting an event, or a slow model call on the ingest path.

KafkaDistributed SystemsArchitecture
Read post
4 min read

The strangler fig pattern: rewriting a system without a rewrite project

A big-bang rewrite bets a new system works before anyone notices the old one stopped. The strangler fig pattern replaces a legacy system piece by piece instead.

ArchitectureLegacy SystemsMigration
Read post
3 min read

Leader election: making sure only one node does the dangerous thing

Cron jobs and reprocessors are trivial with one replica and dangerous with three. Leader election lets multiple replicas run without duplicating one-off work.

Distributed SystemsConsensusSystem Design
Read post
3 min read

CAP theorem, explained the way it actually shows up in production

CAP theorem is usually taught as an abstract triangle. In production it's one question: what should this service return when it can't reach another node?

Distributed SystemsDatabasesSystem Design
Read post
4 min read

Latency vs throughput: you cannot optimise for both at once

Batching helps throughput and hurts latency. Caching helps latency and can hurt consistency. Most performance debates are about which number matters more.

PerformanceSystem DesignDistributed Systems
Read post
4 min read

The sidecar pattern in system design

Attaching a second container to handle logging, mTLS, retries and observability, so your main service doesn't have to. When a sidecar earns its overhead.

System DesignMicroservicesKubernetes
Read post

Have a system to build?

Whether it needs designing from scratch or rescuing from its own success, tell me what you’re building and I’ll tell you how I’d architect it.

Open to remote and hybrid work worldwide