Java RMI 有什么意义?
What is the point of Java RMI?
为什么 Java RMI 存在?谁在使用它?为了什么?
我最紧迫的问题;
- 为什么要调用未在您的计算机上定义的方法?执行起来不会花费更长的时间吗?我看不出这如何让世界变得更美好。拥有许多机器 运行 完整的程序而不是许多机器每个 运行 部分不是更聪明吗?
- 您必须手动为所有机器(客户端和服务器)提供接口这一事实不会扼杀远程对象提供的任何好处吗?换句话说,如果拥有远程对象的好处是客户端程序员不必与服务器程序员交互,那么手动联系彼此以更新双方的接口是否会很烦人改变?
- 这与客户端与服务器通信的典型 Web 应用程序设置有何相似或不同之处?在我看来,HTTP 调用更容易理解。 RMI 服务器是否可以要求 RMI 客户端提供某种密码?
- 通常使用 Java RMI 创建什么样的应用程序?有硬性例子吗?
Why does Java RMI exist?
错误,因为 Sun built it? The same Sun that provided Sun RPC.
Who uses it and for what?
RMI is the basis of Jakarta EE (formerly J2EE) just to name one small example. However the concept of remote method calls dates further back to at least CORBA, and the concept of remote procedure calls to at least the 1970s. Sun provided their implementation of RPC in about 1982 and it is the basis of NFS 等等。
Why would you want to make calls to methods that aren't defined on your machine?
呃,如果你想让他们 运行 在另一台机器上?
Wouldn't it take much longer to execute?
当然可以。
I don't see how this makes the world a better place. Wouldn't it just be smarter to have many machines running the complete program rather than many machines each running parts?
所以你从未听说过 distributed computing,那么?
Doesn't the fact that you have to manually provide interfaces to all the machines (clients and servers) kill whatever benefits having remote objects provides?
没有
In other words, if a benefit of having a remote object is that the client programmer doesn't have to interact with the server programmer
有人说这是好处吗?
then doesn't it get annoying to have manually contact each other to update the interfaces on both sides for each little change?
如果您在实施之前实际设计您的系统,那么往往不会有很多 'little changes'。但这无论如何不是唯一的开发模型。您可以让第三方开发界面。或者同一个人发展双方。或者具有由规范定义的远程接口。或者...
How is this similar or different to a typical web app set up where a client communicates with a server?
它使用 RMI 而不是 HTTP。
In my mind, HTTP calls are much easier to understand.
没有比远程界面更容易理解的了,但显然你的里程会有所不同。
Can an RMI Server require some sort of password from RMI clients?
是的,它可以使用相互认证的 TLS,或者通过自定义套接字工厂实现的任意认证协议。
为什么 Java RMI 存在?谁在使用它?为了什么?
我最紧迫的问题;
- 为什么要调用未在您的计算机上定义的方法?执行起来不会花费更长的时间吗?我看不出这如何让世界变得更美好。拥有许多机器 运行 完整的程序而不是许多机器每个 运行 部分不是更聪明吗?
- 您必须手动为所有机器(客户端和服务器)提供接口这一事实不会扼杀远程对象提供的任何好处吗?换句话说,如果拥有远程对象的好处是客户端程序员不必与服务器程序员交互,那么手动联系彼此以更新双方的接口是否会很烦人改变?
- 这与客户端与服务器通信的典型 Web 应用程序设置有何相似或不同之处?在我看来,HTTP 调用更容易理解。 RMI 服务器是否可以要求 RMI 客户端提供某种密码?
- 通常使用 Java RMI 创建什么样的应用程序?有硬性例子吗?
Why does Java RMI exist?
错误,因为 Sun built it? The same Sun that provided Sun RPC.
Who uses it and for what?
RMI is the basis of Jakarta EE (formerly J2EE) just to name one small example. However the concept of remote method calls dates further back to at least CORBA, and the concept of remote procedure calls to at least the 1970s. Sun provided their implementation of RPC in about 1982 and it is the basis of NFS 等等。
Why would you want to make calls to methods that aren't defined on your machine?
呃,如果你想让他们 运行 在另一台机器上?
Wouldn't it take much longer to execute?
当然可以。
I don't see how this makes the world a better place. Wouldn't it just be smarter to have many machines running the complete program rather than many machines each running parts?
所以你从未听说过 distributed computing,那么?
Doesn't the fact that you have to manually provide interfaces to all the machines (clients and servers) kill whatever benefits having remote objects provides?
没有
In other words, if a benefit of having a remote object is that the client programmer doesn't have to interact with the server programmer
有人说这是好处吗?
then doesn't it get annoying to have manually contact each other to update the interfaces on both sides for each little change?
如果您在实施之前实际设计您的系统,那么往往不会有很多 'little changes'。但这无论如何不是唯一的开发模型。您可以让第三方开发界面。或者同一个人发展双方。或者具有由规范定义的远程接口。或者...
How is this similar or different to a typical web app set up where a client communicates with a server?
它使用 RMI 而不是 HTTP。
In my mind, HTTP calls are much easier to understand.
没有比远程界面更容易理解的了,但显然你的里程会有所不同。
Can an RMI Server require some sort of password from RMI clients?
是的,它可以使用相互认证的 TLS,或者通过自定义套接字工厂实现的任意认证协议。