Understanding Remote Procedure Calls in Distributed Systems

Slide Note
Embed
Share

Explore the implementation and structure of Remote Procedure Calls (RPC) in distributed systems, covering concepts like RPC vs local calls, design choices, basic structure, binding, transport protocols, exception handling, goals of RPC, steps in RPC, and more. Discover how RPC simplifies distributed computation, enhances efficiency, and ensures secure communications in EECS 582 W16.


Uploaded on Dec 06, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson 1894 Xerox Palo Alto Research Center EECS 582 W16

  2. Overview Introduction Remote Procedure Call vs Local Procedure Call Design choice RPC Implementation Basic Structure Binding Transport protocol Exception handling Evaluation EECS 582 W16

  3. Introduction What is a Remote Procedure Call? Caller Callee EECS 582 W16

  4. Goals of RPC Simplicity To hide the existence of the network from a program. To make distributed computation easy. Efficiency Even a small performance improvement is important due to heavy uses. Security Secure end-to-end communications with RPC EECS 582 W16

  5. RPC Implementation EECS 582 W16

  6. RPC structure Caller machine User (application code module) User-stub Caller instance of RPCRuntime (communication subsystem) Callee Server (server code module) Server-stub Server instance of RPCRuntime EECS 582 W16

  7. Steps in RPC EECS 582 W16

  8. When writing a distributed app Design the interface Write user code that import(call) the interface. Write server code that export(implement) the interface. Present the interface to Lupine to generate stubs Today, using any IDL(Interface description language) On caller, the user is bound to the user-stub. On callee, the server-stub is bound to the server. EECS 582 W16

  9. Binding Process Binding Importer of an interface Exporter of an interface How does a client of the binding mechanism specify what he wants to be bound to? Naming How does a caller determine the machine address of the callee and specify to the callee the procedure to be invoked? Locating EECS 582 W16

  10. Naming Refers to what service the client wants to use. Interface consists of two parts: Type: Which interface the caller expects the callee to implement. Service Name (e.g Mail-server) Instance: Which particular implementor of an abstract interface is desired. Machine Address (e.g Specific mail-server address) EECS 582 W16

  11. Locating With Grapevine, a distributed database system. Server 1 (Ebbets) 3#22# Server 2 (Luther) 3#276# Server3 (Facc) 3#43# Grapevine Database Type (Group) Member-list Instance(Individual) Connect-site FileAccess {Ebbets, Luther, Facc} Ebbets 3#22# Luther 3#276# Facc 3#43# EECS 582 W16

  12. Binding Process

  13. Binding Mechanism Advantages Stateless: Importing an interface has no effect on the state of the exporting machine The use of UID means that bindings are implicitly broken if the exporter crashes and restarts. Restricting the set of users who can update Grapevine DB . To avoid security problems EECS 582 W16

  14. Transport Protocol Why not TCP? The goal here is low latency, not high through put The cost of setting up and terminating a connection is expensive in RCP. RPC can be characterized as transaction-oriented communication. A single response for a single request. A transaction is initiated when a client sends a request and terminated by the server's response. EECS 582 W16

  15. Simple Call EECS 582 W16

  16. Complicated call EECS 582 W16

  17. Exception Handling Communication Failure Exception (Explained with complicated call example), considered to be the primary difference between procedure call and RPC Remote Process Exception Callee sends exception back to Caller. Caller handles exception and send the result to Callee. EECS 582 W16

  18. Optimizations Use of thread pool (idle processes) in caller and callee machines to reduce process creation costs. The use of process source and destination allow processes to get the packets they re waiting for directly from the interrupt handler. Use of subsequent packet for implicit acknowledgments of previous packets. Avoid the cost of establishing and terminating connections by the implementation of packet-level protocol. EECS 582 W16

  19. Performance EECS 582 W16

  20. Conclusion RPC makes distributed programming easier? Hard to justify back then due to lack of examples demonstrating the importance of such performance. The idea is now everywhere. Whether a sufficient level of performance for RPC can be achieved by a general purpose transport protocol remains undecided. Today, RPC usually uses UDP, but only switch to TCP when data cannot fit into single packet. EECS 582 W16

  21. Q & A EECS 582 W16

More Related Content