The idempotent consumer pattern implemented (processed-message table in the same transaction), dedup identity for events, Kafka's exactly-once machinery taken apart honestly, offset-commit ordering, and the series-capstone retrofit checklist.
Hi, I'm Mustafa. Software engineer building reliable systems.
I design and ship distributed systems, data pipelines, and AI-augmented tooling. I write about the engineering tradeoffs behind them, what works, what breaks, and why.
Recent writing
All posts →Brandur Leach's Stripe-style Postgres key store walked end to end in Kotlin: the schema, atomic claim via ON CONFLICT, recovery points so a crashed request resumes instead of double-executing, the Redis variant compared honestly, and the window you can't close.
Why exactly-once delivery is impossible, the at-most-once vs at-least-once dichotomy, idempotency keys (who mints them, where they live, when they expire), and a taxonomy of operations by natural idempotency.
Hybrid logical clocks walked by hand, CockroachDB's uncertainty intervals and read restarts, Spanner's TrueTime and commit-wait, Cassandra's last-write-wins as a cautionary tale, and a decision sketch for choosing a clock.
Lamport clocks, vector clocks, the version-vector distinction almost every article gets wrong, the sibling-explosion failure that motivated dotted version vectors, and interval tree clocks for dynamic membership.