开发者

What's the difference between RPC and Browser/Server?

It seems Browser/Server is the same as RPC in that the Browser sends a request to the Server,

and the Server returns th开发者_Go百科e data after calling related routines.

So what's the difference?


Those are loosely related concepts. "Browser/Server" (usually named client/server) indicates an architecture where you have a process listening for requests (a server) and processes making requests (clients). The client may or may not be calling the server using an RPC mechanism. HTTP, for example, is a client/server protocol that is not considered RPC.

RPC means Remote Procedure Call, which means that the client calls a method on a proxy object, and the proxy object sends a request to the server. The server then translates the request into a method (procedure) call to its target object. Therefore to the client, it looks like it's simply calling a method on a server object, but client/server code is what enables this.


There are a few differences also to be considered though:

  1. RPC works with stubs. Client calls the 'client-stub' which in turns calls the 'server-stub' for the call of the procedure. If you talk about browser-server, also RPC (RMI) technology is implemented sometimes to achieve the same effect.

  2. Additionally, to call a disadvantage, the call of RPC is not connection-oriented. The client does not know whether the procedure was actually-called. Thus it can be failure in case of unpredictable network problems. Also the browser technology is reliable as it confirms (if implemented) the execution of the process in the server (using AJAX etc.).


Rpc causes a procedure to execute in the remote procedure. in client server the procedure may be execute in local host or remote location.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜