Computer Science, asked by saisatvik2754, 1 year ago

What is the need of rpc in client server computing?

Answers

Answered by jkr18042001
0
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call.


RPC (remote procedure call) is a way of modelling communication between two applications as straightforward function calls. Since the applications may even be on different machines, an RPC mechanism usually defines a network protocol, some format for exchanging messages, a portable way of serializing and deserializing data and specific programming language support (like code generators). It is, first of all, an abstraction.

For example, consider a network service providing weather data to clients. If you were to design something like that, you could come up with a custom protocol or perhaps a RESTful API for clients to use when querying the server, e.g. HTTP GET requests to http://weather.foo/city/London would return an average temperature for the city of London as text. The RPC way of doing this would involve having the server export a GetTemperatureOfCity procedure taking a string as the sole parameter and returning an integer, which the clients can pretend to call pretty much as if it were a local function. The particular RPC implementation you used takes care of the details.

Similar questions