News for hackers. Stuff that matters.
Re:Give me /events, not webhooks by z3t4 on Tuesday July 13, 2021 @03:03PM (#27824862)
Something that is underestimated in messaging systems are incremental numbers, eg. add + 1 for each message, so the receiving end get 1,2,3,4,5,6 etc, and if it then get 8 it knows it missed the 7th message. And it will know if the messages are out of order. And it can pick up if it goes down by requesting the missing messages.
Re:Give me /events, not webhooks by Redsquare on Tuesday July 13, 2021 @06:47PM (#27827179)
Or put simply, a sequence number!
Re:Give me /events, not webhooks by the_linux_lich on Wednesday July 14, 2021 @10:06AM (#27833139)
Dude, just use a timestamp.
Re:Give me /events, not webhooks by z3t4 on Wednesday July 14, 2021 @12:53PM (#27835224)
no... time is relative! (no pun intended) - sending messages to the space station or a satellite in orbit would be off, or a moving,train, or a tall building... Did you know there are leap-seconds, just like there are leap-year? and atomic clocks are not yet standard on server/PC's, what is standard though is a time-client that will change the computers clock at some random intervals depending how much drift it has. A sequence number is also easier to parse.