Implementing Remote Procedure Calls. Andrew D. Birrell and Bruce Jay Nelson Presented by: Shreya Bhargava. Distributed environment. A1, A2, A3 are distinct address spaces p1 A1 A2 p2 A3 p3. How do these systems communicate?. Use messages. Issues:
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Andrew D. Birrell and Bruce Jay Nelson
Present at the lowest level of abstraction and requires the application programmer to be able to identify the destination process, syntax of the message, & the source process
Function call is the major control and data transfer mechanism embedded in MESA.
Argue that this is not cost-effective and adding this could degrade efficiency.
No time-outs for the procedure calls, since local procedure calls do not have a time-out (this, is in the absence of machine/communication failures).
Lupine is responsible for generating the code for packing and unpacking arguments and results, and for dispatching to the correct procedure for an incoming call in the server stub.
RPC runtime is responsible for packet level communication.
Programmer is responsible for specifying proper argument and result that is compatible with chosen design and for handling reported machine or communication failure.
Type – Specifies which interface the caller expects the callee to implement.
Instance – Specifies which particular implementer of an interface is desired.
machine address of the server hardcoded in the application program.
Too much interference.
Use Grapevine distributed database.
Database consists of two types of entries:
Instance Address Type Instance
Wpi #33# Fileaccess wpi
Alpine #23# mail server alpine
Elb #11# fileaccess elb
Each server maintains one export table, containing entries for all currently exported interfaces. This table is used to map incoming RPC request messages to their corresponding server procedure.
Each entry in the export table consist of a unique identifier for that interface, and a pointer to the server stub that should be called to invoke the interface service.
Note: Unique identifier is never reused.
Grapevine provides for late binding. Binding callers to specific servers at runtime makes it possible to move the server to another machine without requiring changes to the client software.
Latency is more important than bandwidth.
Connection establishment and tear down should be light weight. Moreover, to service many clients at the same time, server should not maintain much state information of connection.
Retransmission of modified packet with request for explicit ack.
Pkts except last one are sent with explicit request for ack.
ack for last arg packet = result pkt
ack for last result pkt = next call pkt
Flow control – stop and wait
(not the best way to send bulk data, works best with simple calls)
Loss of the last argpkt to caller -> retransmission with explicit req. for ack.
After getting ack for the last pkt, caller keeps sending probe pkt to assure that the callee is still working
Timer to senn probe increases gradually
Loss of the last result pkt to callee -> retransmission with explicit req. for ack.
- RPC at the client gives a new incarnation id.
- Client has to rebind to the service.
- server uses the new client id to distinguish this instance from the previous one.
- server get a new server id.
- all clients bound to the previous incarnation id are out of luck, they have to rebind.
RPC runtime on the caller raises the exception to the client process.
User handling procedure terminate process.
Return value of catch procedure is returned to callee or notifies callee about abort.
Callee process resumes its exception or unwinds its call stack.
What about in a case of communication failure?
RPC runtime raises a call failed exception.
A server callee maintains a pool of available server processes to handle incoming requests. This saves the cost of creating a new process to handle each request. A new process is created to handle a new request when the available processes are busy.
To save on the costs of context switches between processes, each packet contains Ids of calling and serving processes.
Minimize the costs of maintaining connections.
Avoid costs of establishing and terminating connections.
Reduce the number of process switches involved in a call.