engineering
Dispatch
The choice between polling and webhooks looks like a technical decision but is actually about who bears the cost of latency and reliability. The patterns that hold up are the ones that match the cost-bearer to the party with the most leverage.
engineering
Dispatch
Deadlocks are the concurrency failure mode that most teams discover the hard way: under load, in production, with the database log filling up with deadlock-victim notices. The good news is that deadlocks are well-understood and largely preventable through a small set of disciplines.
engineering
Dispatch
PostgreSQL has had a real-time pub/sub mechanism since the 1990s and most application code does not know it exists. LISTEN/NOTIFY is a quiet, reliable, and load-appropriate alternative to running Redis or Kafka for many real-time use cases that small SaaS teams encounter.
culture
Dispatch
Steel is so foundational to the modern world that we rarely think about how it came to be cheap. The five-thousand-year story of how iron-with-just-enough-carbon went from precious sword material to ubiquitous building substance is mostly a story of fuel chemistry, with one decisive ninete...
engineering
Dispatch
Foreign keys get the attention but they are only one of several constraint types that databases enforce. CHECK constraints encode invariants directly into the schema. EXCLUDE constraints handle the cases where uniqueness is conditional or interval-based. Both are underused, and both repay
engineering
Dispatch
Every system that stores events accumulates them faster than the team expects. The retention question is not just how long to keep events but which events, what to keep about them, and how to age the storage so the recent events stay fast to query while the old events stay cheap to keep.
engineering
Dispatch
Foreign keys enforce referential integrity at the database layer, which means the rule holds regardless of which application writes to the table. The trade-offs come from the constraint check itself, the lock granularity it requires, and the cascade options that look helpful but often crea
engineering
Dispatch
Job queues with priorities sound straightforward. The naive implementation works fine until a flood of high-priority jobs causes low-priority jobs to wait indefinitely. The patterns that survive production traffic share a structural property: priority changes which queue runs next, not whi
engineering
Dispatch
PostgreSQL does not update rows in place. Every UPDATE writes a new row version and leaves the old one behind, and VACUUM is the background process that cleans up. Most teams discover this when autovacuum falls behind and the database starts getting slower without an obvious cause.
engineering
Dispatch
Every HTTP request that opens a new TCP connection pays for the three-way handshake plus the TLS handshake, which on a typical internet path is 100-200 milliseconds. Keep-alive amortizes that cost across many requests on the same connection, but only if every layer of your stack actually r
engineering
Dispatch
The choice of primary-key strategy is one of the earliest schema decisions and one of the hardest to reverse. Auto-increment integers, UUIDs, ULIDs, and Snowflake-style IDs each have specific structural costs and benefits that compound across the lifetime of the system.
engineering
Dispatch
Tests that hit real third-party APIs are flaky and slow. Tests that mock them by hand drift from reality and miss real bugs. The patterns that work in between are fixture-based recording, contract testing against the vendor's spec, and a small set of disciplines that keep the mocks honest.