RPC vs Web Service
Creation of
web services using the SOAP
protocol requires either of two alternatives to be employed. One can either follow the Document SOAP protocol or the RPC SOAP messaging protocol. RPC refers to Remote Procedure Call and it is a protocol that can be used by a given program to request for a given service in another program that is located within another remote computer. When using RPC, there is no need to know the network details of the program. A given procedure call is referred to as a sub routine call or even a function call.
In employing the use of RPC, there is heavy use of the client/server model. The program that is requesting for a service to be performed is on the client side and the computer providing the execution of a given program is said to be on the server end. RPC action can be termed synchronous, in that it requires a program that is requesting for action to have the specified action suspended until such a time when the results of a remote procedure are given.
To ensure that the device does not take too long when there are different actions pending, RPC allows for the processing of multiple threads that share a given address, and thus the responses can be given as they come, and not in
series where one action must be completed for the next to commence.
A Web Service that is created using SOAP control can thus follow the RPC or Document messaging style. The document style can therefore indicate the specific .xml document that can be validated against given XML schema. As Java RPC is used in the
communication of platforms like EJB is, similar applications running on Java. Web Service, on the other hand, is mainly used whenever there is use of an app which does not run on Java and seeks to connect with the Web Service.
The performance between RPC and Web Services is quite distinct, with a huge variation between Web services and RPC being quite variable. In some instances, the variation can be quite small, with the consideration of resilience coming into play. RPC comes with the challenge of having a congested server environment, which makes it quite difficult for you to work with multiple clients.
On the other hand, Web Service allows for multiple deployment of service, with the only need to be met being that the Web Service is invoked over a HTTP. This allows for the exploitation of the normal network spraying and routing techniques employed in larger sites. It is also important to note that Web Service does not need any special coding to function with the server or even the client.
The resilience of both RPC and Web Service can be equally compared, though it is important to note that RPC requires the use intermediaries to function as expected. It is here that EE EJB and frameworks such as Spring come into play. For the best in service, it is advisable to work with Java EE EJB first before bringing in the RPC environment. Exposure to Web Service to this environment and RPC too makes configuration much easier.
Summary
RPC refers to Remote Procedure Call.
Use of RPC is recommended when there is heavy use of the client/server model.
RPC allows for the processing of multiple threads that share a given address.
RPC employed on a platform that uses EJB.
Web Service used in non-Java platforms when an app wants access.
Web Service also is used for synchronization of asynchronous communication.
You might also like…