3
votes

Folks,

I have GWT-RPC services (on Appengine) supporting a GWT Web client. All is well.

Now, when I am developing an Android Client for this, do I need a stripped down Servlet to serve this client? Meaning, Now instead of Serialized Java objects sent back and forth (as in GWT), I will need to send XML using Android's packaged HttpClient to a new Servlet (which can possibly reuse the GWT-RPC services within the AppEngine).

Am I on track here? Does Android allow for GWT-RPC service backends directly?

I am trying to be succinct from a code perspective..

1

1 Answers

1
votes

GWT-RPC is an opaque, non-standard protocol, designed for use in GWT apps only. AFAIK there is no mechanism for communicating in GWT-RPC in any other environment (e.g., Android) or language (e.g., Python, PHP).

GWT-RPC is not optimal as a reusable multi-platform RPC mechanism because of this.

For communicating with an Android client I suggest Protocol Buffers, which are designed to be compact and multi-platform. Unfortunately there is not currently support for sending PBs to GWT clients.

You could also use regular JSON, in either REST or RPC flavors, which can be consumed by either GWT or Android clients, and is fairly compact, at least compared to XML.