Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the point of implementing webhooks once you implemented long polling for the /events endpoint?


I'd argue against long/persistent polling. Webhooks allows for zero resource usage until a message needs to be delivered.


> Webhooks allows for zero resource usage until a message needs to be delivered.

Doesn't that only work in the case where the server treats each webhook delivery as ephemeral? If you're keeping a queue to allow reliable / repeatable delivery, that's definitely not "zero resource usage", right?


On the sender side, sure. On the receiver side? You have to have a service listening 0-24.


I don't think the original comment meant long polling (i.e. keeping the connection alive), they meant periodically call the endpoint to check for events.


The article advocates for long polling of endpoints.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: