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

Does this use polling? And won't this cause problems?


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/gi...


You 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


Fair 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...


> 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?


Good call out, though I'd put it under the umbrella of expensive, since someone banning or throttling you is a symptom of it.




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

Search: