I was going through all "reverse ajax" posts & found this one which is very interesting.
https://coderanch.com/t/120495/HTML-JavaScript/Author-Book-Reverse-AJAX
Some doubts in what Eric explained:
You need to look at comet as a thread that sleeps. In reality it is just a http post that is taking a very very very very LONG LONG LONG LONG LONG time to get data back to the client.
This part is okay. You somehow keep the request open for really long period of time say by using Thread.sleep(x) in method which is handling the request.
That other user makes a post to the server, the server detects this post, and fires off a process on the server. That process is picked up by the "listening" Ajax call, and sent back to the client.
Here
the "listening" Ajax call means the request we didn't respond (the one which is still open)?
If yes, then when you say
sent back to the client, does this mean, responding the request? If yes then it'll no longer be open?