how does Google gmail, docs, etc. get its push-notification of changes?
I would assume that there is an AJAX request on the client side that polls for updates, but it is amazingly tight response. Can someone provide more insight into any tricks that they may be doing in the protocol?
Two methods generally used in this case
Persistent connection: the XMLHttpRequest request is performed by the client, and the server keeps the connection until there is some news (replies data to client in this case), or if a given time-out is reached - then the client tries again and so on.
Google probably uses the 2nd option, which is replying and updating faster.