GWT-RPC VS HTTP调用 - 这是更好? [英] GWT-RPC vs HTTP Call - which is better?

查看:325
本文介绍了GWT-RPC VS HTTP调用 - 这是更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估是否有电话之间的性能差异作了使用GWT-RPC和<一个href=\"http://$c$c.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideHttp\">HTTP呼叫。

I am evaluating if there is a performance variation between calls made using GWT-RPC and HTTP Call.

我APPLN服务托管的Java servlet和我目前使用HTTPPROXY连接,从他们那里获取数据。我期待将它们转换为GWT-RPC调用,如果在性能的提高带来的。

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...

[可与GWT使用各种服务器通信策略的好文章。]

[A good article on various Server communication strategies which can be employed with GWT.]

推荐答案

我写的,在问题中提到的文章(感谢您的联系!)。

I wrote that article mentioned in the question (thanks for the link!).

像往常一样,答案是这取决于。我用两个GWT-RPC和JSON。

As always, the answer is 'it depends'. I've used both GWT-RPC and JSON.

如上所述,GWT-RPC允许在通过线路航运Java对象(有一些限制)一些严重的生产率。一些逻辑可以共享,和GWT需要编组照顾/解组的对象。

As outlined above, GWT-RPC allows for some serious productivity in shipping java objects (with some limits) over the wire. Some logic can be shared, and GWT takes care of marshalling/unmarshalling your object.

JSON允许跨域访问量和消费量等,非GWT的客户端。您可以覆盖类型度日,但没有行为(如验证)可以共享。 JSON也可以很容易地融为一体pressed和缓存,不像GWT-RPC(我最后一次看)。

JSON allows for cross domain access and consumption by other, non GWT clients. You can get by with overlay types, but no behavior (like validation) can be shared. JSON can also be easily compressed and cached, unlike GWT-RPC (last time I looked).

由于我们不知道有效载荷是什么,性能的建议是很难给。我建议(再次,正如上面有人做)测试自己。

Since we have no idea what the payload is, performance recommendations are hard to give. I'd recommend (again, as someone does above) testing yourself.

这篇关于GWT-RPC VS HTTP调用 - 这是更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆