RMI与REST服务 [英] RMI vs REST Service

查看:142
本文介绍了RMI与REST服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为使用JSF开发的门户/ Web客户端开发服务。我的建议是将服务公开为REST,但另一个团队成员表示要使用RMI实现,因为从开发和测试的角度来看,它更容易处理java对象。

We are developing a service for our portal / web client developed using JSF . My advice was to expose the service as REST but another team member said to go with RMI implementation since its easier to deal in java object from development and testing point of view.

我的论点是开发和测试工作几乎相同,但我们将获得REST Web服务的所有优点。

My argument was development and testing efforts with be pretty much the same but we will get all the goodness of REST web services.

仅供参考:我们已经安装了REST,因此框架支持不会产生额外费用。这些服务是针对使用REST api的智能手机客户端公开的。

FYI : We already have REST setup so there is no extra cost in framework support. This services are exposed for our smartphone client who uses REST api.

最后我们的经理决定采用RMI方式,但我仍然认为REST会更聪明。

At the end our Manager decided to go with RMI way but I still think REST would be smarter way.

您的选择REST或RMI是什么?

What would be your choice REST or RMI?

注意:对我的团队成员或经理只是尝试在这里学习

Note : Nothing against my team member or Manager just trying to learn here.

推荐答案

如果客户端和服务器之间存在防火墙,则可能会阻止RMI流量。 HTTP流量在大多数防火墙上都是开放的,REST应该没有问题。

If there are firewalls between your client and server, it is likely that RMI traffic might be blocked. HTTP traffic is open on most firewalls and REST should have no problem getting through.

这篇关于RMI与REST服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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