• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

doubts in old thread about reverse ajax

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, it will close and you will have to make another request on the server.

This is what you want to research: http://en.wikipedia.org/wiki/Comet_%28programming%29

Eric
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:Yeah, it will close and you will have to make another request on the server.

This is what you want to research: http://en.wikipedia.org/wiki/Comet_%28programming%29

Eric



Thanks Eric.

I get the point but gmail's chat doesn't seem to be doing it this way. I mean, I don't see a new ajax request goes to server when browser receives a chat response. I'll check again using FireBug but last time I checked it, if correctly, it didn't make multiple ajax calls while chatting...

Thanks again.

 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe they are doing it through Flash

Eric
 
straws are for suckers. tiny ads are for attractive people.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic