The remote procedure call/remote method invocation model uses a request/reply/ac
ID: 671486 • Letter: T
Question
The remote procedure call/remote method invocation model uses a request/reply/ack protocols, where only the first step (request) is required. Respond to the following questions: a. Give an example where only a request is required. b. request/reply allow the caller to receive a server response. If the caller does not 2/3 Prof. Pitts CS632AH1:Client-Server Computing Fall 2015 receive a reply, can it conclude that the server did not perform the caller's request? Why or why not? c. What is the advantage of the final ack to the server?
Explanation / Answer
There are three request – reply protocols used by RPC/RMI:
Request(R ) protocol:
In this protocol, client sends a request and doesn’t need response from the server.
after sending the request, the client be in unblocked state.(asynchronus).
This protocol is used when no value to be returned and the client doesn’t required assurance that the operation is executed.
Request-Replay (RR) protocol: This protocol is used when there are several requests to the server. That is, there are most client-server exchanges.
Thus, client sends request to server and waits for reply.
On receiving the replay from the server, the client sends next request.
The server considers the second request as the acknowledgement for the 1st reply (or response).
Request-Reply-Acknowledgement (RRA): This is the explicit acknowledgement protocol.
Client sends the request and waits for the response.
On receiving response from the server, it sends a acknowledgement.
On receiving the acknowledgement from the client, the server clears the history.
a.
Request protocol is used when no value to be returned and the client doesn’t required assurance that the operation is executed. For example, online request. It does not require any response. (ex: HTTP request)
b.
No, because the request-replay method doesn’t involve explicit acknowledgement. The server may performs the caller’s request and sends the response. But the response might lost before reaching the client.
c.
Server sends the response to the client and saves it in the buffer(cache). This helps the server to resend the response to the client without executing the procedure again, if the response is lost. If the client sends the acknowledgement, the server clears this response or history form the buffer and available memory at server is increased to store other responses. Buffer memory is crucial for the server, because, the server communicates with number of client program and stores several responses in the buffer. Thus, the server requires maintaining the memory efficiently.