Comment by two_handfuls

Comment by two_handfuls 10 months ago

7 replies

The question was for the general case, so yes that is exactly what you are claiming in this thread.

Here is the question again: "Well pretty confused. You can't get exactly once delivery using proposed solution in general case because you can not have infinite memory for dedupe."

lisper 10 months ago

Only a naive implementation requires infinite memory. (And even then it's unbounded, not infinite.)

  • qaq 10 months ago

    You are going in circles so you claim you do have a solution for general case. It would be interesting to learn about details of such solution beyond it has different constraints compared to naive solution.

    • two_handfuls 10 months ago

      Don't bother, it's clear we have a "doesn't fit in the margin" situation here.

      • lisper 10 months ago

        It's true that a complete solution doesn't fit easily into an HN comment. But one possibility is to send only one message at a time, and keep re-sending it until you receive an acknowledgement. Then send the next message. On the receiving side, deliver the first instance of the multiple copies you receive and discard the rest. (Send acknowledgements for all received instances of course.) This guarantees not only exactly-once delivery with only constant storage required at the receiver, but also in-order delivery. It's not particularly efficient, and it's not what you would want to do in real life, but it would work.