Hacker News new | ask | show | jobs
by topspin 1423 days ago
Would have thought this is self evident. Intermediates exist and they can do essentially anything. Without absolute control over every aspect of the systems involved you have no guarantees about ordering.
1 comments

There's no way to guarantee that the receiver will process the webhooks in order since you have no control over the receiver, but you CAN guarantee you can send them in a given order or at least identify the order of those webhooks and provide ways to identify or discover that order if the receiver so chooses to pay attention to ordering or use order discovery.
> but you CAN guarantee you can send them in a given order

That's not sufficient. Intermediate proxies can reorder your requests however they wish for whatever reason they want, and then change behavior with no notice at any time. In the real world of HTTP you'll get duplicates, false positives and every other conceivable failure mode.

> or at least identify the order of those webhooks and provide ways to identify or discover that order

Sure, you might invent some protocol that incorporates a sequence number or uses some chaining mechanism.

Thing is this; if you find yourself engaging in such gymnastics and you're any good as an engineer it needs to occur to you that you're using the wrong medium, hopefully long before you obligate yourself to the task. "Webhooks" are a pretty fragile thing to use when your requirements involve stuff like "order." If it did fail to occur to you then you're unlikely to get whatever sequencing mechanism you invent working properly either, because that's actually a hard problem that doesn't submit to the sort of muddlers unaware that "You Can't Guarantee Webhook Ordering."