4 ms·
Could you not timestamp your message and then let the client do the ordering. Granted they might get messages out of order, but I never promised them their webh
by dalore 3y ago
Could you not timestamp your message and then let the client do the ordering. Granted they might get messages out of order, but I never promised them their webhooks would be in order.
- devoutsalsa 3y agoRegular timestamps can only be used reliably for ordering if all the timestamps come from a single system. Different systems have different clocks, so they'll never be precisely in sync. You can also have timestamp collisions, which makes ordering ambiguous.
- chrsig 3y agoThis is assuming the use of a monotonic clock. the system wall clock may jump backwards in time. Itt also assumes that only one id can be generated per millisecond (or whatever clock resolution). In the case of multiple threads or processes on multiple cores, it becomes more likely that there will be a collision. Timestamps don't make for a great ordering key.
- paulddraper 3y agoYes, you can push the problem to your users.
- skeeter2020 3y agoTimestamps from where? There is not necessarily going to be a central authority or processor who can guarantee these are in sync across distributed systems