RPC version mismatch on client & server

230 views
Skip to first unread message

notcourage

unread,
Nov 8, 2010, 11:09:33 AM11/8/10
to Google Web Toolkit
Scenario: A user is running version n-1 of a gwt app. Meanwhile,
version n is deployed. I assume the client will get RPC serialization
exceptions. The user gets frustrated.

What's the best way to address this?

Stephen Haberman

unread,
Nov 8, 2010, 12:06:32 PM11/8/10
to google-we...@googlegroups.com

If you use IsSerializable (and no type name elision), and don't have
any actual API changes, you'll be okay, you user shouldn't notice.

Otherwise you'll have to catch IncompatibleRemoteServiceException and
ask your user to reload the app.

I was mulling over this scenario awhile ago and wrote a blog post about
it:

http://www.draconianoverlord.com/2010/07/07/gwt-seamless-upgrades.html

- Stephen

notcourage

unread,
Nov 9, 2010, 7:27:45 PM11/9/10
to Google Web Toolkit
Thx for the reply & your blog post taught me more about gwt. Here's
another idea: assign the app a version#. Assign this value to a
variable in the client & server. Every rpc passes the client's
variable. When there is a mismatch, the server throws
AppVersionException. To minimize the chance the user submits a big
form only to be asked to reload the app: if the app hasn't been used
in awhile, the app calls an rpc which checks for a version mismatch.

On Nov 8, 1:06 pm, Stephen Haberman <stephen.haber...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages