Download presentation
Presentation is loading. Please wait.
Published byMagdalene Copeland Modified over 9 years ago
1
Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson 1894 Xerox Palo Alto Research Center EECS 582 – W16
2
Overview Introduction Remote Procedure Call vs Local Procedure Call Design choice RPC Implementation Basic Structure Binding Transport protocol Exception handling Evaluation EECS 582 – W16
3
Introduction What is a Remote Procedure Call? Caller Callee EECS 582 – W16
4
Goals of RPC Simplicity To hide the existence of the network from a program. To make distributed computation easy. Efficiency Even a small performance improvement is important due to heavy uses. Security Secure end-to-end communications with RPC EECS 582 – W16
5
RPC Implementation EECS 582 – W16
6
RPC structure Caller machine User (application code module) User-stub Caller instance of RPCRuntime (communication subsystem) Callee Server (server code module) Server-stub Server instance of RPCRuntime EECS 582 – W16
7
Steps in RPC EECS 582 – W16
8
When writing a distributed app… Design the interface Write user code that import(call) the interface. Write server code that export(implement) the interface. Present the interface to Lupine to generate stubs Today, using any IDL(Interface description language) On caller, the user is bound to the user-stub. On callee, the server-stub is bound to the server. EECS 582 – W16
9
Binding Process How does a client of the binding mechanism specify what he wants to be bound to? Naming How does a caller determine the machine address of the callee and specify to the callee the procedure to be invoked? Locating Importer of an interfaceExporter of an interface Binding EECS 582 – W16
10
Naming Refers to what service the client wants to use. Interface consists of two parts: Type: Which interface the caller expects the callee to implement. Service Name (e.g Mail-server) Instance: Which particular implementor of an abstract interface is desired. Machine Address (e.g Specific mail-server address) EECS 582 – W16
11
Locating Type (Group) Member-list FileAccess{Ebbets, Luther, Facc} Instance(Individual)Connect-site Ebbets3#22# Luther3#276# Facc3#43# Grapevine Database Server 1 (Ebbets) 3#22# Server 2 (Luther) 3#276# Server3 (Facc) 3#43# With Grapevine, a distributed database system. EECS 582 – W16
12
Binding Process
13
Binding Mechanism Advantages Stateless: Importing an interface has no effect on the state of the exporting machine The use of UID means that bindings are implicitly broken if the exporter crashes and restarts. Restricting the set of users who can update Grapevine DB. To avoid security problems EECS 582 – W16
14
Transport Protocol Why not TCP? The goal here is low latency, not high through put The cost of setting up and terminating a connection is expensive in RCP. RPC can be characterized as transaction-oriented communication. A single response for a single request. A transaction is initiated when a client sends a request and terminated by the server's response. EECS 582 – W16
15
Simple Call EECS 582 – W16
16
Complicated call EECS 582 – W16
17
Exception Handling Communication Failure Exception (Explained with complicated call example), considered to be the primary difference between procedure call and RPC Remote Process Exception Callee sends exception back to Caller. Caller handles exception and send the result to Callee. EECS 582 – W16
18
Optimizations Use of thread pool (idle processes) in caller and callee machines to reduce process creation costs. The use of process source and destination allow processes to get the packets they’re waiting for directly from the interrupt handler. Use of subsequent packet for implicit acknowledgments of previous packets. Avoid the cost of establishing and terminating connections by the implementation of packet-level protocol. EECS 582 – W16
19
Performance EECS 582 – W16
20
Conclusion RPC makes distributed programming easier? Hard to justify back then due to lack of examples demonstrating the importance of such performance. The idea is now everywhere. Whether a sufficient level of performance for RPC can be achieved by a general purpose transport protocol remains undecided. Today, RPC usually uses UDP, but only switch to TCP when data cannot fit into single packet. EECS 582 – W16
21
Q & A EECS 582 – W16
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.