In an RPC, a client causes a procedure to execute on a different address space, usually a remote server. The procedure
is coded as if it were a local procedure call, abstracting away the details of how to communicate with the server from
the client program. Remote calls are usually slower and less reliable than local calls, so it is helpful to distinguish
RPC calls from local calls. Popular RPC frameworks include Protobuf, Thrift, and Avro.RPC is a request-response protocol:
Client program - Calls the client stub procedure. The parameters are pushed onto the stack like a local procedure call.
Client stub procedure - Marshals (packs) procedure id and arguments into a request message.
Client communication module - OS sends the message from the client to the server.
Server communication module - OS passes the incoming packets to the server stub procedure.
Server stub procedure - Unmarshalls the results, calls the server procedure matching the procedure id and passes the given arguments.
The server response repeats the steps above in reverse order.