server side socket connections

60 views
Skip to first unread message

Freak.2k

unread,
Aug 14, 2006, 5:12:43 PM8/14/06
to Google Web Toolkit
Hello,

the server side of my gwt app creates a socket connection to a remote
server.
when the user closes its browser, the server holds the connection open
for e very long time....stopped test after 1,5 hours...
is there any property to configure a time out?
but how does the gwt server recognize that the client isn't there
anymore?
Or do I have to implement a "I'm still here" notification in the
client, and if a specific amount of time no "I'm still here"
notification arrives at the server side, the connection should be
closed?

greets from germany

br...@google.com

unread,
Aug 14, 2006, 8:45:12 PM8/14/06
to Google Web Toolkit
GWT doesn't try to associate particular clients with particular
servers. Each RPC call is assumed to be statelss from both the client's
and the server's perspective. This is a little harder to design, but it
is basically a preqrequisite to creating apps that are both scalable
and fault tolerant.

For your specific situation, it seems like the sever-side socket
connection ought to have a timeout, probably implemented using a
separate thread within your serlvet. The socket timeout then could
reset itself whenever an RPC comes in. Unless you have very unusual
circumstances, I'd recommend against sending empty keep-alives from the
client. Just use the natural RPC calls to act as a keep-alive. Trying
to a create very tight binding between a particular client and a
particular server is not a good match for HTTP.

Reply all
Reply to author
Forward
0 new messages