aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Live connections for Instant Messenger Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Live connections for Instant Messenger Application" Watch "Live connections for Instant Messenger Application" New topic
Author

Live connections for Instant Messenger Application

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
I have been checking your Instant Messenger Application.
As I noted, you are using GWT-RPC.
What if you want to use HTTP live connections (like GMail built in messenger)?
How to do this in GWT?
Thanks.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

(john can you check to see if you got my email sent to your hotmail account?)
Ryan Dewsbury
author
Greenhorn

Joined: Nov 07, 2007
Posts: 22
I not sure what you mean by HTTP live connections.

One restriction with HTTP is that every response needs a matching request. The server can't just send data to the client when necessary. This is sometimes called server push or HTTP events. I'll assume this is what you're referring to.

The instant messenger application in chapter 9 tackles the issue of server push with Ajax applications. It looks at polling(bad), hanging HTTP calls(better), and then looks at solutions with advanced IO on Tomcat and Continuations on Jetty where hanging waits don't hang threads as well, thereby improving performance dramatically(best).

I hope this answers your question. By using these techniques you can get server push like you see in GMail.


GWT Book - GWT Poker
Ryan Dewsbury
author
Greenhorn

Joined: Nov 07, 2007
Posts: 22
You should also click on the GWT poker link in my signature. It's completely GWT and uses a lot of server push.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Would you please Mr. David check your PM?
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

I not sure what you mean by HTTP live connections.

We were talking here in the ranch (not that old topic), that GMail's built in messenger employs HTTP live connections which makes it very performant.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am not sure where you are getting HTTP Live connections from. If I type it into Google, all I am getting is this thread.

Is that what you are calling COMET or polling?

Eric
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Eeee, sorry.
It is HTTP requests with Keep-Alive header.
I'm really sorry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Live connections for Instant Messenger Application