4 ms·
Yes but how would you implement this on a low level? How would a system know something had happened without some kind of polling lurking below?
by beebeepka 5y ago
Yes but how would you implement this on a low level? How would a system know something had happened without some kind of polling lurking below?
- pengaru 5y agoWhether the web server in question polls files in a posix filesystem for mtimes/ENOENT, employs inotify, or has a higher-level CMS type deal to trigger events when the CMS modifies/adds/deletes resources kept in an RDBMS is an irrelevant server implementation detail. I think the real challenge to implementing this kind of thing is preventing abuse. If servers were to accept subscriptions on resources under their purview in the form of an arbitrary URL to poke when there's an event, it's ripe for abuse without some additional steps. But I think something along the lines of what letsencrypt does would be sufficient; make the subscriber prove control over the domain to be poked by asking it to reply with some gibberish at a specific url under its purview before accepting the subscription at that domain, and you'd throttle/limit those operations, just like letsencrypt does. At least that way you're not turning subscriptions into DDoS attacks via notification events sent to unsuspecting domains...