2 ms·
> As far as I know; in communication; you can only have at-least-once (1..N) or at-most-once (0..1). If you hash-chain all of your messages, you can trivially
by erichocean 4y ago
> As far as I know; in communication; you can only have at-least-once (1..N) or at-most-once (0..1).
If you hash-chain all of your messages, you can trivially and reliably have exactly-once semantics.
Just like a blockchain.
Each message includes its predecessor hash, so if you get a message that you don't have the predecessor for, you can just request it. ACKs become "this is the latest message hash for which I have all of the predecessors" and can be done lazily, i.e. every nth message, or after not receiving a message in awhile.
Source: Me, built a system that worked like this in 2014 (over UDP). Worked great, it had some similarities to how QUIC is designed (including the crypto).