4 ms·
Yes, it uses polling. The only problem is the standard one for polling: it's either expensive or slow. > The function app hosts the scheduled process that at t
by ben509 6y ago
Yes, it uses polling. The only problem is the standard one for polling: it's either expensive or slow.
> The function app hosts the scheduled process that at the specified time retrieves the list of files from the storage account (1), iterates through them, for each (2) one checks if it changed and sends a notification if it did (3). If the file has changed, the function app also updates the file hash in the storage account (4).
The cheaper way to do it would be to set up a webhook listening for push events [1]. You do have to handle missed webhook notifications, but you can usually just do that by polling very infrequently.
[1]: https://docs.github.com/en/developers/webhooks-and-events/github-event-types#pushevent https://docs.github.com/en/developers/webhooks-and-events/gi...
- sli 6y agoYou can't setup webhooks in someone else's project, though. Polling (or the atom solution in the comment section[0]) lets you react to changes in any project. 0: https://news.ycombinator.com/item?id=25903821 https://news.ycombinator.com/item?id=25903821
- ben509 6y agoFair point re webhooks, though you could ask the owners for it. The atom solution is nicer, and I'd probably do it even if I owned the project, but it's still just polling. It always bugs me that everything distributed inevitably devolves into polling...
- amelius 6y ago> The only problem is the standard one for polling: it's either expensive or slow. How about the problem of being banned by the service which is being polled?
- ben509 6y agoGood call out, though I'd put it under the umbrella of expensive, since someone banning or throttling you is a symptom of it.