The 111 control channel, which allows the client
client stub marshalls the parameters into a message. The
process of marshalling consists of converting a data field, or an entire
set of parameters, into a serialized string that can be sent as a message.
client stub passes the message to the transport layer. From the transport
layer, the message is sent to the remote server machine.
the server machine, the transport layer passes the message to a server stub.
Here, the message demarshalls the parameters and calls the desired server
routine using the regular procedure call mechanism.
the server procedure completes is complete, the parameters are returned to
the server stub via a normal procedure call. Here, the server stub
marshalls the return values into a message then hands the message to the
transport layer sends the result message back to the client transport
layer, which hands the message back to the client stub.
the client stub demarshalls the return parameters and execution returns to
Ideally, the RPC
protocol sits on top of TCP/IP network layer using it`s arbitrary length data
delivery to facilitate inter-process communication. RPC operates at the same
level as SMTP, POP and other protocols.
It is important to point
out that RPC does not try to implement any kind of reliability and that the
application must be aware of the type of transport protocol underneath RPC. If
it knows it is running on top of a reliable transport such as TCP/IP, then most
of the work is already done for it. However, there are a few constraints when
running RPC on the UDP/IP as it proves to be unreliable because of the underlying
mechanisms of the protocol. Implementation of services such retransmission and
time-out policies have to be implemented in the RPC running on top of UDP/IP
Sun RPC services also
known as Open Network computing remote procedure call (ONC RPC) provide a
healthy solution for programs to invoke procedures using UDP protocols as well.
RPC services offered By Sun are defined by a program identifier which is
independent of any transport address. This is achieved by having each host
linking the required RPC service to a dynamic TCP or UDP port. This port is
negotiated over the port 111 control channel, which allows the client to
connect to either TCP or UDP port 111.
The advantages of using
a reliable transport protocol such as TCP/IP is that the client application can
infer that the reply message procedure was executed exactly once. However, if
it receives no message, it cannot assume the procedure was not executed.
Security and access
mechanisms can be built on top of the messages, as RPC provides the necessary
fields for a client to identify as a service and vice-versa. Few different
protocols as such are supported, and can be identified in the specified field
of RPC header.
Originally the RPC has been intended to
serve as a method of invoking procedures/functions remotely, with each call
message corresponding with a response message. This implies that the client
does not compute while the server is processing a call and it proves to be
inefficient if the client does not want or need confirmation for every message.
Batching is a way of using RPC by allowing
a client to send an arbitrarily large sequence of call messages to a server without
having a response from server. By using this technique, the server does not
respond to every call and the client can generate new calls while the server
executes previous calls. This procedure greatly decreases the inter-process
communication between the client and server processes, reducing the amount of
time in a series of calls.
Broadcasting is another form of using the
RPC protocol developed by Sun, where the client sends a broadcast package on
the network, awaiting for multiple replies. Broadcasting is based on the UDP/IP
packet-based protocol to transport which makes this service unreliable. The
servers supporting broadcast protocols, respond only when the request is
RPC is a simple, independent protocol that
sits on top of the TCP/IP protocol and facilitates peer to peer network
communication, being a vital asset in distributed computing. It is a protocol
that has been around for any years and found place in different applications