FEATURE REQUEST: timeout for RPC calls

51 views
Skip to first unread message

rzorzorzo

unread,
Jan 9, 2007, 8:36:02 AM1/9/07
to Google Web Toolkit
Hi,

it happens randomly that RPC calls "hang", eg callback methods are not
invoked.
I have not been able to figure out why or under which circumstances
this happens. It does not occur very often.
Is this an error on the client side ? or server ? There are no
exceptions thrown on the server side.

I therefore tend to implement a timeout for RPC calls, to assure that
the application does not get stuck.

However I find that this feature should be part of GWT.
A possible solution could be to add the method
ServiceDefTarget.setTimeout(long) and call
AsyncCallback.onFailure(TimeoutException)


A similar request for HTTPRequest has been mentioned earlier.
http://groups.google.com/group/Google-Web-Toolkit/browse_frm/thread/9b1b04d93893d9ac/7095afe70cf58b29?lnk=st&q=&rnum=40#7095afe70cf58b29

Comments ? Suggestions ?

- Ron
http://ajax4jmx.sourceforge.net/

Olostan

unread,
Jan 9, 2007, 1:34:11 PM1/9/07
to Google Web Toolkit
Hello, Ron.

I've just started working with GWT, but also thought about what happen
if server would be too busy to answer quick. I haven't yet wrote any
workaround, but thought about using Timer: start timer just before
starting async request and stop it on success. And if timer is not
stopped, show some info to user (e.g. "Sorry, server is too busy now,
try later" :)).

This solution is very straight, but should work. Can you describe way
that You tend to implement timeouts for RPC?

WBR, Valentyn Shybanov
http://olostan.org.ua/

rzorzorzo

unread,
Jan 15, 2007, 11:29:02 AM1/15/07
to Google Web Toolkit
Valentyn,

yes, similar to what you propose.

- Ron

Miguel Méndez

unread,
Jan 16, 2007, 8:14:23 AM1/16/07
to Google-We...@googlegroups.com
Hello Olostan and Rzorzorzo,

I just wanted to point out that the HTTP Module supports HTTP requests with timeouts.  See RequestBuilder.setTimeoutMillis(int) for more details. 

We have also discussed changing RPC to use this HTTP module rather than the HTTPRequest.asyncPost method.  These changes would get you what you are looking for.  BTW, our issue tracker contains issue 535 that covers this functionality.
--
Miguel
Reply all
Reply to author
Forward
0 new messages