I want to communicate with information in real time, and there is a fairly standard functionality that I want to duplicate:
This happens here when you are on the same question, typing your answer, and a warning appears that says: "There are 3 news replies, click to show"
This also happens on Twitter. "There are 5 new tweets in this search: click to update"
I am pretty good at server and client code, and what I'm looking for is the main outline (not even psuedo code, but maybe plain English) about how this happens.
Is there a CRON job on a server running every minute that picks up an AJAX bit with a long poll on the page?
Is the server polling page itself?
Any solutions are welcome. Thanks!
source share