Re:REST Hooks - Stop the polling madness
by amenod on Tuesday September 10, 2013 @02:27PM
(#6362062)
This is definitely better, but what I would expect is a short explanation of what happens to REST requests - why are there fewer of them? Are you caching the responses, serving them to clients (who are still polling, but they are polling you instead of the REST server) and waiting for PUSH request from server to invalidate the cache? Or is this a client-side solution too which allows a client to trigger a REST request only when data is available?
[ Parent
| on HN ]
Re:REST Hooks - Stop the polling madness
by bryanh on Tuesday September 10, 2013 @03:08PM
(#6362510)
There is no middle intermediary, its just two servers. For example, Facebook & your app.
Instead of polling `facebook.com/api/posts` every 2/5/15/60 minutes, you'd set up a subscription for Facebook to ping you at `yoursite.com/hook.php`. The subscription would be managed under `facebook.com/api/subscriptions`.