Request-Reply Protocol
Request-Reply Protocol
Kumudha Raimond
PROTOCOL
Request-Reply Communication
After sending the request message, doOperation invokes receive to get a reply
message, from which it extracts the result and returns it to the caller.
The caller of doOperation is blocked until the server performs the requested
operation and transmits a reply message to the client process.
When the reply message is received by the client the original doOperation is unblocked
and execution of the client program continues.
CLIENT SERVER
COMMUNICATION
Server
Side
public byte[] getRequest ();
⚫ getRequest() is used by a server process to acquire a client request via
the server port
• If the server has not yet sent the reply, it need take no special action –
it will transmit the reply when it has finished executing the operation
TIMEOUT OF REQUEST/REPLY
PROTOCOL
Lost reply messages
COMMUNICATION
PROTOCOLS FOR RPC
Several communication protocols have been proposed based on the needs
of different systems
Type of Protocols
• Reply Protocol
• Request/Reply Protocol
• Request/Reply/Acknowledge-Reply Protocol
COMMUNICATION
PROTOCOLS FOR RPC
Request (R) Protocol
• It is used when the called procedure has nothing to return and the
client requires no confirmation that the procedure has been executed
• Only one msg/call is transmitted
• Client proceeds immediately after sending the request message
• This protocol is implemented over UDP datagrams and therefore suffers
from the same communication failures.
COMMUNICATION
PROTOCOLS
Request /Reply (RR) Protocol
FOR RPC
• The RR protocol is useful for most Client Server
client-server exchanges because it is
based on the request-reply protocol.
Request Msg
• Special acknowledgement messages
Procedure
are not required, because a server’s execution
reply message is regarded as an
acknowledgement of the client’s Reply Msg
request message. Also serves as an ack for the
• Similarly, a subsequent call from a request msg