Implementing Remote Procedure Calls Birrell A D and
Implementing Remote Procedure Calls* Birrell, A. D. and Nelson, B. J. Presented by Emil Constantinescu 10/26/2020 1 *ACM Trans. Comput. Syst. 2, 1 (Feb. 1984), 39 -59
Overview Ø Brief introduction Ø RPC issues Ø Implementation Ø Examples Ø Current RPC implementations Ø Review Ø Conclusions 10/26/2020 2
What are Remote Procedure Calls (RPCs). . in a nutshell (1) RPCs represent a set of communication paradigms that allow one procedure to call another procedure on a different machine. 1. one procedure (caller) calls another procedure (callee) 2. the caller waits for the result from the callee 3. the callee receives the request, computes the results, and then send them to the caller 4. the caller resumes upon receiving the results from the callee 10/26/2020 3
What are Remote Procedure Calls (RPCs). . in a nutshell (2) CALLER invokes a procedure on the callee arguments CALLEE receives the request waits computes the results resumes 10/26/2020 4 sends the results
What are Remote Procedure Calls (RPCs). . in a nutshell (3) PURPOSE: Make distributed computing easy! MAIN PRINCIPLE: The procedure's communication patterns are transparent to the user. The procedure invocation looks just like a local procedure call. Attractive aspects: Ø simple semantics Ø efficiency Ø generality 10/26/2020 5
RPC Issues (1) Ø Ø Ø transparency, mimics the local procedure call precise semantics v machine failure v communication failure address based arguments v the address space is not shared programming integration v integration into programming environment data integrity 10/26/2020 6
RPC Issues (2) data transfer protocols v network protocols Ø binding v caller determines q the location q the identity v… of the callee Øsecurity v open communication network Ø 10/26/2020 7
RPC Implementation (1) – Basic Concepts interface local program module … call procedure_X(arg 1, arg 2, ret 1) … export procedure_X 10/26/2020 8 NAME | type procedure_X | arg 1 | arg 2 | ret 1 procedure_Y | arg 1 | ret 1 procedure_Z | arg 1 | ret 2 import procedure_X remote program module implement procedure_X(arg 1, arg 2, ret 1) { … }
RPC Implementation (2) – Overview Caller machine Network User - stub RPCRuntime local call pack argument transmit local return unpack result receive call packet Callee machine RPCRuntime Server - stub Server receive unpack argument call wait result packet transmit importer exporter interface lookup 9 return importer exporter interface Database 10/26/2020 pack result work register
RPC Implementation (3) – Local vs. Remote local (*) Caller machine Callee machine User - stub Server local call pack argument unpack argument call work local return unpack result return importer exporter 10/26/2020 10 *Garry Nutt; Operating systems; 2 nd Edition, Addison Wesley
RPC Implementation (4) – Local vs. Remote (*) 10/26/2020 11 remote *Garry Nutt; Operating systems; 2 nd Edition, Addison Wesley
RPC Implementation (5) – User/Server Stub: arguments are serialized/marshaled Ø handles language binding (IDL, object passing) Ø pass by value not by reference Ø 10/26/2020 12
RPC Implementation (6) – RPCRuntime deals with Ø data (re)transmission Ø data acknowledge Ø packet routing Ø encryption Ø exception handling Ø binding 10/26/2020 13 Caller machine Network RPCRuntime transmit call packet Callee machine RPCRuntime receive wait receive result packet transmit Database lookup register
RPC Implementation (7) – Binding … is concerned with Caller machine Network RPCRuntime Ø location transmit Ø identity wait … implements Ø Import. Interface Ø Export. Interface … has issues Ø granularity Ø security 10/26/2020 14 receive call packet result packet Callee machine RPCRuntime receive transmit Database lookup register
RPC Implementation (8) – RPC flow (*) 10/26/2020 15 * Garry Nutt; Operating systems; 2 nd Edition, Addison Wesley
RPC Implementation (9) – Semantics & Data Transfer issues scalable, connectionless scheme, reduced acknowledgements Ø unique ID/incremental packets Ø at least/most or exactly once semantics Ø Server (*) REQ. REP. 10/26/2020 16 Receive Execute Reply Server REQ. Receive Execute No REP. Crash Server REQ. No REP. Receive Crash * A. Tanenbaum and M. v. Steen; Distributed Systems: Principles and Paradigms, Prentice Hall, 2002
RPC Implementation & Issues program integration Caller machine Network User - stub RPCRuntime local call pack argument transmit local return unpack result receive call packet data transfer Callee machine RPCRuntime Server - stub Server receive unpack argument call wait result packet transmit importer exporter interface pack result work return importer exporter interface Database address based arguments 10/26/2020 17 lookup register binding security data integrity
RPC Implementations (1) Ø DCE RPC (Distributed Computing Environment RPC) Ø SUN RPC Ø DCOM (Distributed COM) Ø CORBA (Common Object Request Broker Arch. ) Ø XML RPC Ø SOAP (Simple Object Access Protocol) 10/26/2020 18
RPC Implementations (2) Ø DCE RPC Ø low level handles the binding & transport Ø Ø Sun RPC Ø DCOM & CORBA Ø object abstractions object abstraction 10/26/2020 19 A. Tanenbaum and M. v. Steen; Distributed Systems: Principles and Paradigms, Prentice Hall, 2002
RPC Implementations (3) Ø XML RPC & SOAP 10/26/2020 Ø somewhat lightweight Ø use HTTP and XML Ø Port 80 20
Conclusions & Future Research Transparency is imperative, and leads to effectiveness Ø Ø Maintain local procedure calling semantics Ø Binding strategies influences efficiency Ø Emulate shared address space Ø Timeout implementation 10/26/2020 21
About the paper (1) Paper: Ø Birrell, A. D. and Nelson, B. J. Ø “Implementing Remote Procedure Calls” Ø ACM Transactions on Computer Systems Ø published in 1984 Ø first paper to formalize RPC Ø concepts started to appear in 1976 10/26/2020 22
About the paper (2) Special treatment for missing remote implementation (late binding) Ø Ø What if the client crashes? Ø Machine specific binary data representation Ø RPC in the HPC field? 10/26/2020 23
References Birrell, A. D. and Nelson, B. J. ; Implementing remote procedure calls; ACM Trans. Comput. Syst. 2, 1 (Feb. 1984), 39 -59 Garry Nutt; Operating systems; 2 nd Edition, Addison Wesley Andrew Tanenbaum and Maarten van Steen; Distributed Systems: Principles and Paradigms, Prentice Hall, 2002 10/26/2020 24
Any Questions? 10/26/2020 25
Paper Implementation (1) Binding 10/26/2020 26
Paper Implementation (2) Simple RPC 10/26/2020 27
Paper Implementation (3) “Complicated” RPC 10/26/2020 28
Paper Implementation (4) Results 10/26/2020 29
- Slides: 29