4 ms·
I feel very strongly that first you should support event polling, and then add webhooks. So your basic method of getting events is to poll for them, and acknowl
by Canada 4y ago
I feel very strongly that first you should support event polling, and then add webhooks. So your basic method of getting events is to poll for them, and acknowledge each one. This must be idempotent in both directions.
Then you can add webhooks. Then you make the polling frequency slow as its job is really just to heal missed events while the webhooks provide real time notification.
As the service user you can use one or the other or both as you see fit. It's easy to get excellent performance and reliability.
Webhooks only is easier for the event provider but makes it hard on the consumer to recover from errors or outages. And pretty much everyone who offers webhooks fails to fire them or retry them sometimes.
- christophilus 4y agoThis is the way. It's the direction a number of projects I follow / help have gone, and it's improved a number of things dramatically. Robustness is the biggest win, but you can also turn off a bunch of noisy webhooks (looking at you, Shopify) and not worry that you'll end up missing things.
- slaymaker1907 4y agoYou technically don't need any acknowledgements for polling. Just make it so you can provide a time range when polling and have each event have a GUID.