The Desi Architect
Notes / Messaging and Correctness
Track 4

Messaging and Correctness

Logs, queues, outboxes and sagas. How to move data between services without losing it or doing it twice.

guide

Kafka, Explained With Sliders

How partitions, consumer groups, offsets and replication really behave under load. Sized for salary-day UPI traffic with zero magic numbers.

22 min read
lab

Kafka Hands-on Lab

Bring up a three-broker Kafka cluster on your laptop and break it on purpose. Keys, consumer groups, offset resets, retention, killing a leader, and a write that a healthy broker refuses.

40 min read
guide

Transactional Outbox

Saving to your database and telling the broker are two separate writes, and one of them will eventually fail alone. The outbox turns "tell the broker" into a row that commits with your data, so the event can be late but never lost.

20 min read
guide

Distributed Transactions and Sagas

One business action, three databases, and no single COMMIT that covers them. This page shows how two-phase commit and sagas each handle that, what each one breaks, and how to pick.

20 min read
guide

Optimistic vs Pessimistic Locking

Two requests read the same row, both decide it is safe, both write. Row locks make the second one wait. Version checks make the second one fail and retry. Which one you pick depends on how often people collide and how long you hold the lock.

20 min read
guide

Idempotency in Practice

The network will lose responses, clients will retry, brokers will redeliver. Idempotency is how you make sure the second attempt does not charge, book or send a second time. Keys, Postgres, Redis, consumers and webhooks, with the failure cases.

22 min read
case file

Design Live Comments (Hotstar / JioCinema Match Chat)

Two crore people are watching an IPL final and the chat panel is open on every phone. You cannot show every comment to every viewer, and you should not try. The design is about choosing what to drop, how to push the rest, and how to replay it later against the video timeline.

28 min read
demo

Chat Message Flow, Step by Step

One Diwali wish, a family group, and one cousin stuck in a train tunnel. Walk through send, persist, publish and deliver, and see which step saves you when the network misbehaves.

12 min read