Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:

Similar presentations


Presentation on theme: "Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:"— Presentation transcript:

1 Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to: Philip Howard Christopher Holm

2 Make Distributed Computing easier Remote Procedure Calls

3 What is a Remote Procedure Call? Application invokes (remote) procedure and suspends Parameters are passed across the network to remote Server The remote Server executes the procedure Results are returned to calling application Application resumes as if result returned from a local procedure call

4 Why RPC Procedure calls are: well known and therefore easily understood It is a Mechanism for transfer of control and data within a running program on a single computer Same mechanism can be used to transfer control and data across a network

5 RPC Design Issues Semantics of a call in the presence of remote machine or communication failures. Procedure calls that pass data by reference Machine Architecture differences: byte order Binding: what Servers are available and where Network Packet transmission Protocol, Security

6 RPC Structure User application And Server application – Written by developer – Could compile and link as a single program User and Server Stubs – User creates interface definition – RPC generation tool use to create stubs(Lupine) RPCruntime is existing part of system

7 Server Application Tasks Export Interface Register Interface Services requests May report Server errors to User application.

8 User Application Tasks Bind to Server – Client imports the interface exported by server Makes (remote) procedure calls as normal Handles remote machine and communication failures.

9 User Stub Task Packing parameters into one or more packets – Marshalling Calls RPCruntime to send packets to server Receive result packets from RPCruntime, Unpacks result and returns to User application – Unmarshalling

10 Server Stub Task Receive packets from RPCruntime Unpacks parameters Dispatches procedure call to Server application Packs returned result (Marshalling) Call RPCruntime to return result to user application

11 RPC Structure Caller RPCRuntime Transmit packet(s) Receive packet(s) Send packet Network Receive packet User StubUser Procedure call procedure return Pack arguments Unpack result(s) Callee RPCRuntime Receive packet(s) Transmit packet(s) Server StubServer Procedure call Procedure return Unpack arguments Pack result(s) Receive packet Send packet Interface importerexporter importerexporter Threaded Event Driven

12 Binding Process(Server) Server exports interface – Notifies RPCRuntime of Service Table array: Interface Name, Dispatcher, ID – Registers Service in Database Type, Instance Database RPCRuntime Update Database Server StubServer Export Interface Callee

13 Binding Process(Caller) Client imports interface, – Database lookup, Type (service) Instance (address) Caller RPCRuntimeUser StubUser Import Interface Query Database Interface Info Database Who’s available? Available Interfaces

14 Binding Process(Caller) RPCRuntimeUser StubUser Import Interface Query Database Interface Info Database Who’s available? Available Interfaces Caller RPCRuntime calls Server – Verifies service is available – Returns ID, and table index User stub records address, ID, index

15 RPC Network Protocol Optimized for small request/response packets, Less load on Server Must guarantee procedure invoked at most once Probe packets (are you there?) – Report network errors to application, – Unknown if procedure invoked. Deadlock or endless loop of server is not handled

16 Simple Call Example All information fits in one packet Efficient for frequent calls Caller sends procedure call Server turns response Caller sends procedure call Server turns response Only two packets foo(a,&b) foo(int a, int *b) return; callid

17 Complicated Call Caller RPCRuntime Transmit first packet Receive result User Procedure call procedure return Callee Server Procedure call procedure return RPCRuntime Call[Ids, packet=0] Ack[Ids, packet=0] Call[Ids, packet=1] Transmit next packet Transmit ack Receive packet 0 Receive packet 1 Receive ack Retransmit next packet Call[Ids, packet=1, needAck] Receive packet 1 Transmit ack Ack[Ids, packet=1] Receive ack Transmit result Transmit ack request Result[Ids] Result[Ids, needAck] Receive result Transmit ack Ack[Ids] Receive ack

18 Optimizations Process Pools with process ID for reuse Reply packets count as acknowledgement Low connection overhead Low cost to establish connection Reduced Process switching Modified network stack for RPC special case

19 Security Validation of caller and callee End to end encryption of data


Download ppt "Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:"

Similar presentations


Ads by Google