Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Phil Howard.

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

Remote Procedure Call Design issues Implementation RPC programming
Chap 2 System Structures.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Fast Communication Firefly RPC Lightweight RPC  CS 614  Tuesday March 13, 2001  Jeff Hoy.
Lightweight Remote Procedure Call BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY Presented by Wen Sun.
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
Implementing Remote Procedure Calls Authored by: Andrew D. Birrel and Bruce Jay Nelson Presented by: Terry, Jae, Denny.
G Robert Grimm New York University Lightweight RPC.
Distributed Systems Lecture #3: Remote Communication.
CS533 Concepts of Operating Systems Class 8 Remote Procedure Call & LRPC.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CS533 Concepts of Operating Systems Class 8 Shared Memory Implementations of Remote Procedure Call.
CS533 - Concepts of Operating Systems 1 Remote Procedure Calls - Alan West.
Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
Remote Procedure Calls (RPC) Presenter: Benyah Shaparenko CS 614, 2/24/2004.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
490dp Prelude: Design Report Remote Invocation Robert Grimm (borrowing some from Hank Levy)
Implementing Remote Procedure Calls an introduction to the fundamentals of RPCs, made during the advent of the technology. what is an RPC? what different.
Remote Procedure Calls. 2 Client/Server Paradigm Common model for structuring distributed computations A server is a program (or collection of programs)
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
CS533 Concepts of Operating Systems Class 9 Lightweight Remote Procedure Call (LRPC) Rizal Arryadi.
CS510 Concurrent Systems Jonathan Walpole. Lightweight Remote Procedure Call (LRPC)
1 Remote Procedure Calls (RPC) and Distributed Objects G53ACC Chris Greenhalgh.
Implementing Remote Procedure Calls ANDREW D. BIRRELL and BRUCE JAY NELSON Presented by Tony Bock.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
Remote Procedure Calls Adam Smith, Rodrigo Groppa, and Peter Tonner.
Problems with Send and Receive Low level –programmer is engaged in I/O –server often not modular –takes 2 calls to get what you want (send, followed by.
Implementing Remote Procedure Calls Authored by Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presented by Lars Larsson.
Politecnico di Milano © 2001 William Fornaciari Operating Systems R P C Remote Procedure Call Lecturer: William Fornaciari Politecnico di Milano
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
REQUEST/REPLY COMMUNICATION
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
1 Developing Application in Distributed Computing Environment (DCE)
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
Reliable Distributed Systems RPC and Client-Server Computing.
1 Conventional Procedure Call read(fd,buf,nbytes) a)Parameter passing in a local procedure call: the stack before the call to read b)The stack while the.
Remote Procedure Call RPC
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
09/14/05 1 Implementing Remote Procedure Calls* Birrell, A. D. and Nelson, B. J. Presented by Emil Constantinescu *ACM Trans. Comput. Syst. 2, 1 (Feb.
Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson 1894 Xerox Palo Alto Research Center EECS 582 – W16.
Implementing Remote Procedure Calls Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Published: ACM Transactions on Computer Systems,
RPC Model, Stubs and Skeletons Divya Nampalli
Implementing Remote Procedure Call Landon Cox February 12, 2016.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
Client-Server Communication
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
CS533 Concepts of Operating Systems
Implementing Remote Procedure Calls
Implementing RPC by Birrell & Nelson
B. N. Bershad, T. E. Anderson, E. D. Lazowska and H. M
CMSC621: Advanced Operating Systems Advanced Operating Systems
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
CS533 Concepts of Operating Systems Class 10
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Remote Procedure Call (invocation) RPC
Remote Procedure Call Hank Levy 1.
Lecture 6: RPC (exercises/questions)
Remote Procedure Call Hank Levy 1.
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
Remote Procedure Call Hank Levy 1.
Communication.
Presentation transcript:

Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Phil Howard

Why?

Consider #include int main() { printf("hello world!\n"); return 0; }

What Happens main printfglibc main kernel IOkernel update_window X update_display kernel IOkernel

But what if X Server Console Window main Linux Box X Client Laptop

What Happens main printf glibc main kernel IOkernel update_windowX update_display Linux Box X Client update_display X kernel IO kernel Laptop

How do you do this? Fork/Join SendMessage/AwaitReply Remote Procedure Call

What's Involved in RPC Remote Procedure Call should look and feel like local call Remote Procedure Call should be independent of where it executes Remote Procedure Call should be "efficient"

Issues Finding the callee Passing data Implementation Exceptions Optimizations

Finding the Callee (Binding) Where  Server has known static address  Client broadcasts request  Central database of interfaces What  Servers export named interfaces  Clients request a particular interface  Need Globally Unique Identifiers for interfaces

Passing Data Can't use the stack Can't use shared memory Generally use message passing

Passing Data #include int main() { union { unsigned long stuff1; unsigned char stuff2[4]; } my_var; my_var.stuff1 = 0x ; printf("%X %X %X %X\n", my_var.stuff2[0], my_var.stuff2[1], my_var.stuff2[2], my_var.stuff2[3]); return 0; }

Passing Data What's the output? or

Passing data Build a message that includes: Who and what's being called Identity of the caller Data values in known byte order

Issues Finding the callee Passing data Implementation Exceptions Optimizations

Implementation foo(a,&b) foo(int a, int *b) return;

Implementation foo(int a; int *b) { build_msg(a,b); send_msg(); wait_for_reply(); get_from_msg(&b); } do_foo(msg_t msg) { int a,b; get_from_msg(&a,&b); foo(a,&b); build_msg(b); send_reply(); }

Implementation Function prototype is (almost) all that's needed to build the client stub –Also need binding information Function prototype is (almost) all that's needed to build server stuf –Also need method to wait for message

Implementation Clients Threaded Servers Event Driven

Issues Finding the callee Passing data Implementation Exceptions Optimizations

Exceptions What can happen in "normal" procedures? Procedure generates an exception Procedure infinite loops Procedure generates wrong results

Exceptions What can happen in "remote" procedures? Client stub generates exception Transmission failure  knowable failure  unknowable failure Remote procedure generates an exception Remote procedure infinite loops Remote procedure generates wrong results

Optimizations Servers maintain no state on clients –No penalty for a large number of clients Messages must be ack'd –for short calls, result serves as ack –for frequent calls, next call ack's last result –for long requests, only last request msg gets ack'd –for long results, only last result msg gets ack'd Bound to "closest" server –Minimum transmission delay

Conclusion Remote Procedure Call should look and feel like local call Remote Procedure Call should be independent of where it executes Remote Procedure Call should be "efficient"