1 / 19

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. Implementing Remote Procedure Calls. R emote P rocedure C alls. Make Distributed Computing easier.

cvelez
Download Presentation

Implementing Remote Procedure Calls

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Remote Procedure Calls Make Distributed Computing easier

  3. 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 What is a Remote Procedure Call?

  4. 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 Why RPC

  5. 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 RPC Design Issues

  6. 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 RPC Structure

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

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

  9. 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 User Stub Task

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

  11. RPC Structure Caller User User Stub RPCRuntime Network Send packet Procedure call Packarguments Transmit packet(s) Unpackresult(s) Receive packet(s) procedure return Receive packet importer exporter Callee Threaded Interface RPCRuntime Server Stub Server Network Receive packet Unpackarguments Procedure call Receivepacket(s) Transmitpacket(s) Packresult(s) Send packet Procedure return importer exporter Event Driven Interface

  12. Server exports interface Notifies RPCRuntime of Service Table array: Interface Name, Dispatcher, ID Registers Service in Database Type, Instance Binding Process(Server) Callee RPCRuntime Server Stub Server Database ExportInterface ExportInterface UpdateDatabase

  13. Client imports interface, Database lookup, Type (service) Instance (address) Binding Process(Caller) Caller User User Stub RPCRuntime Database Who’s available? ImportInterface ImportInterface QueryDatabase InterfaceInfo InterfaceInfo InterfaceInfo AvailableInterfaces

  14. Binding Process(Caller) • RPCRuntime calls Server • Verifies service is available • Returns ID, and table index • User stub records address, ID, index Caller User User Stub RPCRuntime Database Who’s available? ImportInterface ImportInterface QueryDatabase InterfaceInfo InterfaceInfo InterfaceInfo AvailableInterfaces

  15. 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 RPC Network Protocol

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

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

  18. 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 Optimizations

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

More Related