Hacker News new | ask | show | jobs
by QuantumNomad_ 19 days ago
But I mean, if each node is grabbing batches of ids from the oracle like the “gapless sequence” call of the OP link provides, then there is no way to know how the items in the batches should interleave.
1 comments

That is what the OP is saying, that their implementation guarantees strictly monotonic timestamps (ie it will tell you how they interleave in your parlance). Gapless sequences is a different (but related) problem. Its not a new problem and there are existing solutions, op is just presenting their Rust implementation with some enhancements. I suggest you read the wikipedia article on Race conditions and then read/skim the article on Lamport timestamps to understand what OP is trying to solve/claiming to do.
I believe Quantum is saying:

  Burger maker is granted seqnos 0..9

  Milkshake maker is granted seqnos 10..19

  They both get busy serving their items as quickly as possible
In what sense can we declare that burger eight (#7) was served before milkshake three (#12) ?
In the sense that a client couldn't have received milkshake 3 before ordering burger 8. But yes, many numberings might satisfy this
Yes, exactly :)