RPC Replacement

60 views
Skip to first unread message

Joe Cole

unread,
Jul 12, 2011, 7:09:07 AM7/12/11
to Google Web Toolkit
We have applications that are installed on mobile devices (i.e.
playbook, ipad) that we can't guarantee will be updated every time we
update our server (appstore delays). This means that if the objects
sent over RPC change, or the RPC format itself changes, then the
mobile clients will no longer be able to connect to the server
(IncompatibleRemoteServiceException).

We'd like to solve this with absolute minimal changes to our web
version, (i.e. keep our current service definitions and rpc objects),
but allows us to add fields to the rpc objects without throwing
errors. The only changes that are ever made to objects that we are
sending are additions (we are prepared to have tests enforcing this),
so this may make our lives easier. We have quite complex objects being
sent over RPC that are used on both client and server, and it would be
ideal if no extra interfaces/annotations have to be added.

I've looked at the following projects/ideas:

- RestyGWT - seems like it could work
- gwt-friendly-protobuf
- protobuf-gwt
- protostuff
- rpc-plus
- DeRPC
- RequestFactory
- Custom json messages (we have our own json serialization framework
which we use for serializing to and from offline databases)
- Custom Field Serializers (http://code.google.com/p/wogwt/wiki/
CustomFieldSerializer)
- Hacking GWT RPC to allow field additions, and update this every time
we upgrade gwt, but still will fail when RPC format changes.
- Enforce no changes to the current classes sent by RPC using MD5's
and rely on no changes to the RPC format (which we realise is a bad
assumption).

Ideally we would be able to plug in a custom "transport" on both the
server and client side so that we can serialise the remote method name
and it's parameters ourselves to json. I know rpc-plus claims to be
able to do this, but it seems like a dormant/dead project.

Does anyone have any suggestions or ideas that might help?

Harald Pehl

unread,
Jul 12, 2011, 2:18:30 PM7/12/11
to google-we...@googlegroups.com
Another project you can take a look at is Piriti: http://code.google.com/p/piriti/ It's a client side XML / JSON mapper. Piriti is able to (de)serialize fairly complex JSON and XML data. See http://code.google.com/p/piriti/wiki/Features for a more detailed description.

- Harald

Reply all
Reply to author
Forward
0 new messages