Upload
nancy-horn
View
229
Download
0
Embed Size (px)
Citation preview
Implementing Remote Procedure Calls
Authored by Andrew D. Birrell and Bruce Jay Nelson
Xerox Palo Alto Research Center
Presented by Lars Larsson
Contents The RPC model and environment Aims of RPC facility and alternatives High level overview of the RPC facility RPC Binding Packet transport protocol Process Use Exception Handling Performance evaluation Conclusion
RPC Model
Client server model for distributed computing
Network I/O is ‘wrapped’ by stubs Programmer doesn’t need to know
about message passing implementation
This RPC Environment
Written for the Cedar project: a programming environment for building experimental programs and systems
Coded mostly in Mesa but also some Smalltalk and InterLisp
Communicate across the Xerox research inter-network
Aims of the RPC Facility
Efficiency of communication
Simplicity Security
Alternatives to Procedure Calls
Some form of remote fork and shared address space
This choice might introduce possible complications with the programming language
Not likely to be as efficient Need more research of possible
benefits
The 5 Pieces of a Procedure Call
User process User Stub RPC Communications
Package (RPC Runtime) Server Stub Server process
Generating the Pieces The RPC Runtime is part of Mesa -
the major programming language of Cedar
User and Server code are written as part of the distributed application
User and Server Stubs are generated by Lupine
Lupine uses specifications from the Mesa interface modules
Caller and Callee
User process, user stub and an instance of the RPC Runtime exist on the caller machine
Server process, server stub and an instance of the RPC Runtime exist on the callee machine
Overview of a simple call:
Binding Importers and Exporters
Names bind importer with an exporter of an interface
Each Name holds the type and possibly an instance of the interface
Type describes which interface the caller expects the callee to implement
Instance specifies which implementer of the interface is desired
Locating Exporters with Grapevine
Each record is a Grapevine RName which have two varieties: individual or group
Individual RNames hold the connect-site network addresses
Group RNames hold a list of RNames identifying which instances belong to a particular group
Given type FileAccess.Alpine wih instance Ebbets.Alpine exported from a server at 3#22# and another instance of FileAccess.Alpine with an instance named Luther.Alpine exported from a server at 3#276#
The members of the Grapevine group FileAccess.Alpine would include Ebbets.Alpine and Luther.Alpine.
The Grapevine individual Ebbets.Alpine would hold 3#22# and the individual Luther.Alpine would hold 3#276#
Example of Grapevine Group and Individual RName entries
Exporting and Importing Interfaces
Packet Level Transport Protocol Caller sends a CallPacket containing a call
identifier, data specifying the desired procedure and arguments
Result packet contains the same call identifier and the results
Retransmitted packets request explicit acknowledgement
While waiting for results caller sends periodic ‘probe’ packets
Large results sent in multiple packets which request explicit acknowledgement (except for last packet)
Call Identifier Holds identifier of calling machine
and machine relative identifier of calling process and a sequence number (with conversation identifier)
(Machine, process identifier) pair is called an ‘activity’
Each activity has at most one outstanding remote call
Simple Call Example
Complicated Call Example
Exception Handling
RPC returns an exception packet instead of a response packet
Raises an exception in the appropriate process If a catch phrase executes a return, the return
is passed to the callee and execution resumes otherwise the callee is notified of termination
Only exceptions defined in the exported interface may be sent
‘Call failed’ exception may be raised incase of communication difficulty
Process Use Idle server processes wait for incoming
packets If a process is waiting for a packet the
Ethernet interrupt handler uses the ‘process identifier’ to pass the packet to waiting process
Otherwise an idle process is passed the packet to decide what to do
Initial destination process identifiers are ‘guessed’
Performance Evaluation
Conclusion
RPC is fully implemented in Cedar Being used by Alpine – file server
supporting multi-machine transactions
Implementations made for BCPL, InterLisp, SmallTalk and C
Still more work needs to be done