~learn.
0:00 / 1:06
W06 · Presence and chat

One lost acknowledgement. Arjun paid twice.

transcript

Arjun paid his friend twice. For one request. No hacker. No payments bug. Just a lift with bad Wi-Fi.

Priya posts a split request. 8,000 rupees each, please. The server stores it. Message 412. But the acknowledgement dies on lift Wi-Fi. So her app does the sensible thing. It retries after 5 seconds.

The server sees a brand new message. It becomes 413. The request shows up twice. Arjun pays twice.

Here's the thing. Every hop retries. Sends, pushes, sync. Exactly-once delivery doesn't exist on a flaky network.

So the phone tags each message with its own ID. The retry carries the same ID. The server checks it, and answers: 412. And phones drop any sequence number they already hold.

Why not just compare the text? Two okay messages, a second apart. Both real.

Deliver at least once. Check duplicates on both ends. Show it exactly once.

Full breakdown in the lecture.