UP | HOME
2016-08-30 | ../../

RPC, Remote Procedure Call

Table of Contents

1 Overview

  1. Remote Procedure Call (Java Remote Method Invocation RMI) is a fundamental idea in Distributed Computing.
  2. A simple architecture for Client-Server computing.
  3. Emulate "ordinary" (local) procedure calls in the context of Client-Server computing.

2 Local v Remote

  1. Slides
  2. We will use local in the sense of process address space, not as in local/global lexical scoping
  3. Remote may not always mean that a node is remote. It really means that it can be.
  4. Obviously, we have some way of naming these; usually, IP address, or FQHN fully qualified host name.
  5. We are ignoring all kinds of "firewalling" issues.

3 Operational Semantics of Local Procedure Call

  1. The code of both P and Q are in the address space of a single process.
  2. Procedure P makes a call Q(a, b, c) on procedure Q.
  3. Arguments a, b, c are from the run time context of P.
  4. These are "passed" to Q: i.e., bound to the three formal parameters of Q
  5. Control is in Q ==> P is waiting for the answers by Q
  6. P resumes at the point below the call, when Q returns

4 Parameter Passing

  1. Procedure P makes a call Q(a, b, c) on procedure Q.
  2. P gives to Q the input arguments
  3. P receives from Q the results
  4. Call by val, by ref, by name, … ?
  5. Call by values-in + values-out: expressions a, b, c are evaluated.

5 The Idea of RPC

  1. The code of P is in one process PP and that of Q in another QQ.
  2. Do the "equivalent" of local procedure call – semantically
  3. Must we make some assumptions?

6 How to Develop RPC programs

  1. Start with sequential version of the program QPRG
  2. Select the remote procedures
  3. Describe the interface
  4. Generate the stub procedures
  5. Build two programs: server SPRG, client CPRG
  6. semantics of QPRG "equals" SPRG + CPRG
  7. Example Makefile

7 Automated Build of RPC programs

  1. Lots of assumptions
    1. no globals shared between SPRG and CPRG
  2. How do we locate/ declare SPRG?
    1. Globally unique program identifier
    2. Transient versions
  3. rpcgen Generate the stub procedures

8 A Design of RPC

  1. A Typical RPC architecture ../RPC+RMI/rpc-diag-tikz.pdf
    1. ../RPC+RMI/05-rpc-case_studies.ppt from Rutgers
    2. ../RPC+RMI/7b.pptx from Portland State
    3. ../RPC+RMI/L16-17.fa14.ppt from U of Illinois, UC
    4. Required study: At least one of the above three.
    5. Highly Recommended: All three. See also the ONC+ Guide below.
  2. NFS is based on ONC/Sun RPC

9 Practical Linux RPC

  1. Make sure that rpcbind/portmap is started at boot. Option -i
  2. Check the result of rpcinfo -p

10 References

  1. Andrew D. Birrell and Bruce Jay Nelson, Implementing Remote Procedure Calls, ACM Transactions on Computer Systems (TOCS), 2, 1, pp. 39–59, 1984. A classic paper. Highly recommended reading.
  2. Oracle.com, ONC+ Developer's Guide; http://docs.sun.com/app/docs/doc/816-1435; Reference. This is a highly recommended complete book on RPC.
  3. Andrews book, Chapter 9. Highly recommended reading.
  4. http://twitter.github.io/finagle Finagle is an extensible RPC system for the JVM. Finagle is written in Scala, but provides both Scala and Java APIs. Reference

11 End


Copyright © 2016 • www.wright.edu/~pmateti • 2016-08-30