Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Dweet.io – Twitter for machines, now with alerts. Parent comment
1. Client makes a request, somehow indicating that it wants to do long polling (url, header, etc.).
2. Server receives the request, but does not reply, the socket is left open.
3. An event occurs, then the server finally responds to the initial request with information about the event.
4. Go to 1.
So it's basically polling, except the server just seems to take a really long time to respond.
In the end, both ways are completely valid methods, I was just wondering if there was any particular thing that swayed you either way.
There are no comments on this comment yet.
1. Client makes a request, somehow indicating that it wants to do long polling (url, header, etc.).
2. Server receives the request, but does not reply, the socket is left open.
3. An event occurs, then the server finally responds to the initial request with information about the event.
4. Go to 1.
So it's basically polling, except the server just seems to take a really long time to respond.
In the end, both ways are completely valid methods, I was just wondering if there was any particular thing that swayed you either way.