03 – Remote invoaction Request-reply RPC RMI Coulouris 5

Slides:



Advertisements
Similar presentations
CSE 486/586 Distributed Systems Remote Procedure Call
Advertisements

Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Distributed Objects and Remote Invocation
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Exercises for Chapter 4: Interprocess Communication
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Communication in Distributed Systems –Part 2
.NET Mobile Application Development Remote Procedure Call.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
CS425 /CSE424/ECE428 – Distributed Systems – Fall Nikita Borisov - UIUC1 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S.
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.
Chapter 4: Interprocess Communication‏ Pages
RPC Design Issues Presented By Gayathri Vijay S-8,CSE.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Distributed Objects & Remote Invocation
Distributed Objects and Remote Invocation Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Distributed objects and remote invocation Pages
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Systems Lecture 8 RPC and marshalling 1.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
RPC 6/14/20161BALAJI K - AP. Design issues of RPC Programming with interfaces Call Semantics associated with RPC Transparency and related to procedure.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Topic 3: Remote Invocation Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Chapter 5 Remote Procedure Call
Distributed Systems CS
CSE 486/586 Distributed Systems Remote Procedure Call
Edition 5, © Addison-Wesley 2012
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
Distributed Systems CS
Text extensions to slides © David E. Bakken,
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Distributed Systems CS
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
EECE.4810/EECE.5730 Operating Systems
Distribution Infrastructures
Distributed Systems CS
Remote invocation (call)
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 7: RPC (exercises/questions)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Text extensions to slides © David E. Bakken,
Distributed Systems CS
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Distributed Systems CS
Presentation transcript:

03 – Remote invoaction Request-reply RPC RMI Coulouris 5 Birrel_Nelson_84.pdf

Remote invocation, indirect communication Mechanisms for process communication on a DS Built on top of interprocess communication primitives Lower level Provided by the OS Applications This chapter Remote invocation, indirect communication Middleware layers Underlying interprocess communication primitives: sockets, message passing, multicast support, overlay networks UDP and TCP

Request Reply Protocols Support client-server interaction Usually synchronous Client blocks until reply is received Reliable (reply is an acknowledge) May use UDP datagram instead of TCP streams TCP knowledge is redundant Connection establishing requires extra messages Flow control is redundant for some uses Which pass only small arguments and results

Request Reply Protocols Communication primitives doOperation getRequest sendReply Client Server Request doOperation getRequest message select object (wait) execute method Reply sendReply message (continuation)

Request Reply Protocols doOperation Sends request to the remote server Arguments Server remote reference Operation id Returns reply send (TCP), sendto (UDP)

Request Reply Protocols getRequest Blocking function / waits for request Returns request data sendReply Sends response to client Arguments Reply Client id send (TCP), sendto (UDP)

Request Reply Protocols MessageType int (0=Request, 1= Reply) requestId int remoteReference RemoteRef operationID int or Operation arguments array of bytes Message identifier RequestId increasing sequence of integers (per sending process) RemoteReference Identification of the process (IP address, port, process id)

Request Reply Protocols Failure model (UDP) Omission failures Delivery order not guaranteed Timeouts doOperation can Repeats transmission of message

Request Reply Protocols Duplicate messages After time-outs Protocols must recognize them Reception of duplicate request Ignore second repetitions Implement idepotent operation History required

Request Reply Protocols Exchange protocols R (request) Online request is sent No need for response Client may unblock imediatly RR (request-reply) Special ACK message not required Implemented by the response Subsequent Request is Acknowledgment of the reply Exchange protocols RRA (request-reply- ack) Explicit ack of the reply Server can clean history TCP simplifies protocol Larger messages Acknowledgements not necessary

Remote Procedure Call Request Reply protocols Not transparent (w.r.t. distribution) Local invocation ≠ remote invocation Extends procedure call abstraction RPCs are called as if in local address space RPC system hides Distribution Encoding/decoding of parameters/reply Passing of messages Semantics of call

Remote Procedure Call Interfaces RPCs should mimic programming language structures Modules/ libraries / classes Function/procedures/methods Use the concept of interface A set of well defined ointeraction points Encapsulate implementation details Service interfaces Set of procedures offered by a server Defining parameters and return values (and types)

Remote Procedure Call Interfaces Provide/implement good programming practices Implementation are hidden from the programmer Server programming language /architecture is hidden SW evolution is possible Distribution imposes Impossible access to remote variables Call by reference not suitable Input parameters: client → server transfer Output parameters client ← server transfer Addresses in one process are not valid on another Addresses can not be passed

Remote Procedure Call Interface Definition Languages Static languages require the a priori declaration of functions and types Publication of a service requires its description Interface Definition Languages (IDL) allow: Specification of interfaces Communication of interfaces Production of .c/.h files Examples SUN XDR, CORBA IDL Webservices WSDL Java interfaces

Remote Procedure Call RPC call semantics DoOperation can be implemented differently Retry request message Are retries made until reply is received? Duplicate filtering What happens when server receives duplicate message Retransmission of results Is history kept to prevent re-execution of operations?

Remote Procedure Call RPC call semantics Fault tolerance measures Retransmit request message Duplicate filtering Re-execute procedure or retransmit reply Maybe No Not Applicable No fault tolerance measures applied Omission failures (message lost), crash failures (server fails) At-least-once Yes Re-execute procedure Invoker receives a result (code was executed at least once) or an exception (result was not received) Retransmission of requests Crash failures (server fails), arbitrary failures (requests are retransmitted, procedure may be executed more than once) At-most-once Retransmit reply Invoker receives a result (code was executed once) or an exception (result was not received, but code not executed or executed once)

Remote Procedure Call Transparency Minimum requirement RPC tries to hide differences from local/remote procedure call Syntax is similar Data marshaling and retransmission is hidden However RPC are more vulnerable to failure Involve network, other computer, other process Code should be able to recover RPC latency is higher Parameter passing is different

Remote Procedure Call Implementation client process server process Request Reply client stub procedure server stub procedure client program service procedure Communication module Communication module dispatcher Generated automatically Stubs Marshal arguments /return values Dispatcher Redirects call General Communication module Hand coded Client program Service procedure

Remote Method Invocation Extends RPC to the OO world RPC and RMI Support programming with interfaces Built on top of Request-reply protocols Offer similar semantics Offer similar level of transparency RMI Use OO mechanisms Object, classes inheritance, OO development methods/tools Provide concept of object identity All objects have references (local or remote) That can be globally accessed

Remote Method Invocation Implementation Proxy Dispatcher Skeleton Static Generation IDL+compiler (Similar to SUN RPC) Dynamic invocation Language support for reflection method interception (client) Dynamic code loading

Remote Method Invocation Execution Server/client programs Binder/ns Process that provides object reference from textual name Server threads In order to allow concurrent method execution Requires synchronization Activation When are objects killed?