In general, you should use GWT RPC; it is pretty good for most use cases.
You can always optimize later if needed.

*Comparing various methods*
GWT RPC is also a HTTP call. The only difference is in the (de)serialization
mechanisms employed by each method. There really isn't a single good
solution, you have to choose what is best for your use case.

The regular RPC and the experimental deRPC both allow you to send java
serializable objects to the client side. The regular RPC method has custom
serializers and deserializers written in javascript, which can get expensive
if you have deep object hierarchies. The experimental deRPC tries to
eliminate custom serialization code, but increases the size of the RPC
payload.

You can use RequestBuilder to download JSON/JSONP data. This is useful if
you have a non-java backend, or if you have existing JSON services that
you'd like to reuse. Its also necessary if you need to make cross-domain
requests. The flip side is that you need to use Javascript Overlays on the
client side if you want maintainability and good performance.

You can also use XML - but that is not recommended. JSON is always a better
option than XML, since browsers natively understand JSON.

*Measuring Performance*
Tools like firebug/charles etc. will only tell you the time taken to
transport the payload. In addition to this, the browser also has to
deserialize the response, and then execute the callback, and these steps do
take time. GWT's lightweight metrics
system<http://code.google.com/webtoolkit/doc/latest/DevGuideLightweightMetrics.html>
lets
you accurately measure the time taken by each step.

--Sri


On 2 June 2010 10:28, Nirmal <[email protected]> wrote:

> Hi,
>
> I am evaluating if there is a performance variation between calls made
> using GWT-RPC and HTTP Call.
>
> My appln services are hosted as Java servlets and I am currently using
> HTTPProxy connections to fetch data from them. I am looking to convert
> them to GWT-RPC calls if that brings in performance improvement.
>
> I would like to know about pros/cons of each...
>
> Also any suggestions on tools to measure performance of Async calls...
>
> Regards,
> Nirmal
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to