X hits on this document

53 views

0 shares

0 downloads

0 comments

5 / 21

Implementing Remote Procedure Calls

  • 43

width. Even on our 10 megabit Ethernets, the minimum average round triptime for a packet exchange is 120 microseconds 7, so the most likelyway to approach

this would be to use some form space between participants in

of paging system. In summary, a shared address

RPC

might

be

feasible,but

since

we

were

not

willing to

undertake

that

research

our

subsequent

design

assumes

the

absence

of

shared addresses. Our intuition is that with our hardware address space would exceed the additional benefits.

the

cost

of

a

shared

A principle that we used several times in making design choices is that the semantics of remote procedure calls should be as close as possible to those of local (single-machine) procedure calls.This principle seems attractiveas a way of ensuring that the RPC facilityis easy to use, particularlyfor programmers familiarwith single-machine use of our languages and packages. Violation of this principle seemed likelyto lead us into the complexities that have made previous communication packages and protocols difficultto use. This principle has occa- sionally caused us to deviate from designs that would seem attractiveto those more experienced in distributed computing. For example, we chose to have no time-out mechanism limiting the duration of a remote call (in the absence of machine or communication failures),whereas most communication packages consider this a worthwhile feature. Our argument is that local procedure calls have no time-out mechanism, and our languages include mechanisms to abort an activityas part of the parallelprocessing mechanism. Designing a new time-out arrangement just for RPC would needlessly complicate the programmer's world. Similarly,we chose the building semantics described below (based closelyon the existing Cedar mechanisms) in preference to the ones presented in Nelson's

thesis 13.

1.5 Structure The program structure we use for RPC

is similar to that proposed in Nelson's

thesis.Itisbased on the concept of stubs.When making a remote call,fivepieces

of program are package (known

involved: the user, the user-stub, the RPC

communications

as

RPCRuntime),

the

server-stub,and

the

server.Their

relatidn-

ship is shown in Figure 1. The user,the user-stub,and one instance of RPCRun- time execute in the caller machine; the server, the server-stub and another instance of RPCRuntime execute in the callee machine. When the user wishes

to make invokes

a remote call, it actually makes a perfectly normal local call which a corresponding procedure in the user-stub.The user-stub is responsible

for placing

a

specificationof

the

target procedure

and

the

arguments

into

one

or

more

packets

and

asking

the

RPCRuntime

to

transmit

these

reliablyto

the

callee

machine. On passes them

receipt of these packets, the RPCRuntime to the server-stub.The server-stub unpacks

in the callee machine them and again makes

a perfectly normal local call,which server.Meanwhile, the callingprocess a resultpacket. When the callin the

invokes the appropriate procedure in the in the callermachine issuspended awaiting server completes, it returns to the server-

stub and machine.

the results are passed back There they are unpacked and

to the suspended process in the caller the user-stub returns them to the user.

RPCRuntime is responsible ing, and encryption. Apart machine or communication

for retransmissions, acknowledgments, packet rout- from the effects of multimachine binding and of failures, the call happens just as if the user had

ACM Transactions on Computer Systems, Vol. 2, No. 1, February 1984

Document info
Document views53
Page views53
Page last viewedSat Dec 03 13:12:48 UTC 2016
Pages21
Paragraphs669
Words10995

Comments