Design Patterns You Actually Use, and the Ones You Should Not Reach For
The pattern books list twenty-three. You reach for about six. Here are those six, the problem each solves, and why naming a pattern is a tool, not a trophy.
Building Backends01
Series · 8 parts · 2,019–2,023
The plumbing that turns a prototype into a service, written between 2019 and 2023: the handful of design patterns you actually use, choosing between Django and FastAPI, what a database transaction really guarantees, when to reach past SQL and when not to, REST APIs that age well, the real-time spectrum from polling to WebSocket to WebRTC, gRPC between services, and the small tricks that keep a backend boring. Problems, solutions, and the reason behind each.
The pattern books list twenty-three. You reach for about six. Here are those six, the problem each solves, and why naming a pattern is a tool, not a trophy.
Building Backends01
One gives you everything and an opinion; the other gives you speed and a blank page. The choice is about how much you want the framework to decide for you.
Building Backends02
A transaction is a promise the database makes when two things happen at once. What ACID guarantees, the anomalies it prevents, and the race it does not.
Building Backends03
NoSQL was sold as the future and is really a specialised tool. What each kind buys, why relational is the right default, and the real cases for reaching past it.
Building Backends04
An API is a contract you have to keep. Resources and verbs, the status codes that matter, idempotency, pagination, versioning, and errors that a client can act on.
Building Backends05
HTTP is a client asking and a server answering. Real-time is the server needing to speak first. Here is the ladder of ways to do that, and what to pick when.
Building Backends06
REST is built for the browser. When both ends are your own servers, a typed binary contract with generated code is often faster and safer. That is gRPC.
Building Backends07
Boring is the highest compliment a backend can earn. The layering, config, jobs, and observability habits that stop the phone call at three in the morning.
Building Backends08