UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Computer Science Division CS 162 Alan Jay Smith Remote Procedure Call . We’d like to make a "Call" to a procedure on another machine. . We’ll call that a "remote procedure call". . A "remote" call can be to another process on a different machine or on this machine. . Recommended paper: "Implementing Remote Procedure Calls", Birrell and Nelson, ACM TOCS, 2, 1, February 1984, pp. 39-59. . "When a remote procedure is invoked, the calling environ- ment is suspended, the parameters are passed across the network to the environment where the procedure is to exe- cute (the callee), and the desired procedure is executed there. When the procedure finishes and produces its re- sults, the results are passed back to the calling envi- ronment, where execution resumes as if returning from a single machine call." . Issues: . How are arguments and results passed when there is no — 25.1 — shared address space? . Must pass and return (effectively) by value. . Could fake call by reference if necessary. . Must be very careful about side effects. . How is the callee located/identified? . Static vs. Dynamic . What happens if there are machine and/or communications failures? . How are data integrity and security obtained when using an open communications channel? . Overhead . Would like semantics to be same or similar to normal pro- cedure call. . Mechanism . Five components: . Caller (User) . User-Stub - interface between the caller and the com- munications mechanism. . Communications Package (RPCRuntime) . Server-Stub - interface between communications pack- age and callee. . Server (callee) . Call Steps: . [ Caller - User-stub (pack arguments) - RPCRuntime (trans- — 25.2 — mit)] - . call packet - . [ RPCRuntime (receive) - Server Stub (unpack arguments) - callee - . Server Stub (pack results) - RPC Runtime (transmit) ] - . Result Packet - . [ RPC Runtime(receive) - User-Stub (unpack result) - caller ] - 25.3 -