Sunday, November 30, 2014

Dictionary: Remote Procedure Call

The concept of Remote Procedure Call (RPC) was developed by Bruce Jay Nelson, a Xerox Parc researcher, in 1981. In 1984, he and his fellow researcher from Xerox PARC published a paper which entitled "Implementing Remote Calls". This paper describes of implementation of RPC that is used in the Cedar project.

Remote Procedure Call (RPC) is an important concept in a distributed system. It was developed by observation of procedure calls that are well-known mechanism for transfer of control and data within a program running on a single computer. As the networked system grown into popular there is a need to transfer control and data across the network in a simple way. When calling a remote procedure, the calling (caller) environment is suspended, the parameter are passed across the network to the environment where the procedure is executed (callee), and desired procedure will be executed there and then send the result back to the caller.

So in a simple way, RPC is a concept of computer programming for letting a computer program to execute a method or sub-routine in a remote computer and get the result of that execution easily, simpe, and straight-forward as calling a local function. RPC is also known as remote invocation or remote method invocation in a object oriented principles.

What processes happen when a client calls a RPC method or function?

    1. Create a message buffer (contigious array of bytes of some size).
    2. Pack the needed information into the message buffer. The information includes identifier of called function and function arguments. This process often called as message serialization or marshaling the argument.
    3. Wait for the reply, because the function calls are usually synchronous, the call will wait for its completion.
    4. Unpack return code and other arguments. This unpacking process often called as unmarshaling or deserialization.
    5. Return to the caller and the caller can continue for more processing.

  2. Birrell, A. D.; Nelson, B. J. (1984). "Implementing remote procedure calls". ACM Transactions on Computer Systems 2: 39. doi:10.1145/2080.357392
  3. Arpaci-Dusseau, Remzi H.; Arpaci-Dusseau, Andrea C. (2014), Introduction to Distributed Systems

No comments:

Post a Comment

Tips: How to ssh to your Digitalocean server without password

If you are tired of being asked for a password when accessing your remote droplet servers in Digitalocean, you might consider adding an rsa ...