Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

DISTRIBUTED OBJECTS AND REMOTE INVOCATION
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.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 4: Interprocess.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Exercises for Chapter 4: Interprocess Communication
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
Remote Object Invocation
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
Communication in Distributed Systems –Part 2
.NET Mobile Application Development Remote Procedure Call.
Slides for Chapter 5: Communication between distributed objects
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
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.
Information Management NTU Interprocess Communication and Middleware.
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.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 9: Web Services.
RPC Design Issues Presented By Gayathri Vijay S-8,CSE.
Systems Prog. & Script. - Heriot Watt Univ 1 Systems Programming & Scripting Lecture 11: The Distributed Object Model.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
DISTRIBUTED OBJECTS AND REMOTE INVOCATION. Introduction This chapter is concerned with programming models for distributed applications... Familiar programming.
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
Distributed Objects & Remote Invocation
Distributed Objects and Remote Invocation Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
1 Distributed Objects and Remote Invocation – 5.1 Introduction  Foci: –Communication among distributed objects via RMI  Recipients of remote invocations.
Remote Procedure Call RPC
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
DISTRIBUTED OBJECTS AND REMOTE INVOCATION 1. 2 Topics  Middleware  Remote Method Invocation  Remote Procedure Call.
Slides for Chapter 5: Distributed objects and remote invocation From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition.
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
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
© 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.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Edition 5, © Addison-Wesley 2012
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Slides for Chapter 6: Operating System support
Slides for Chapter 5: Distributed objects and remote invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Remote method invocation (RMI)
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Distribution Infrastructures
WEB SERVICES From Chapter 19, Distributed Systems
Remote invocation (call)
Text extensions to slides © David E. Bakken,
Presentation transcript:

Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications

Objectives This chapter is concerned with how processes (or entities at a higher level of abstraction such as objects or services) communicate in a distributed system.

Introduction Programs need to be able to invoke operations in other processes, often running in different computers. Programming models: Remote procedure call model : it was the extension of the conventional procedure call model and it allows the client programs to call procedure in server programs running in separate processes. Object-based programming model : was extended to allow objects in different processes to communicate with one another by means of Remote method invocation (RMI) Event-based programming model: it allows objects to receive notification of the event at other objects in which they have registered interest.

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 5.1 Middleware layers Applications Middleware layers Request reply protocol External data representation Operating System RMI, RPC and events

Middleware: software that provides a programming model above the basic building blocks of processes and messages passing. The middleware layer uses protocols based on messages between process to provide its higher level abstraction such as remote method invocation The middleware provide location transparency and independence from: The details of communication protocols : TCP or UDP Operating systems: the higher level abstraction provided by the middleware layer are independent of the underlying operating systems. Computer hardware Programming languages: Some forms of middleware allow the separate components to be written in different programming languages. Introduction (con.)

Most modern programming languages provide a means of organizing a program as a set of modules that can communicate with one another. In order to control the possible interactions between modules an explicit interface is defined for each module. Interfaces in distributed systems The modules in a distributed program can run in separate processes It is not possible for a module running in one process to access the variables in a module in another process. The interface of a module that is intended for RPC or RMI cannot specify direct access to variables. Interfaces:

The differences between calling local procedure and remote procedure are shown in: The Parameter passing, for ex “call by reference and call by value “ used by local procedure are not suitable when the caller and procedure are in different processes. Pointers in one process are not valid in another remote one.

Service interface : oeach server provides a set of procedures that are available for use by clients. oIt is used : To refer to the specification of the procedures offered by a server Defining the types of the input and output arguments. Remote interface: oSpecifies the methods of an object that are available for invocation by objects in other processes oDefining the types of the input and output arguments of them The interfaces used in the original client-server model for RPC and in the distributed object model for RMI:

The difference between service interface and remote interface: oIn remote interface, the methods can pass objects as arguments and results of methods. oThe references to remote objects may also be passed. Interface definition languages Are designed to allow objects implemented in different languages to invoke one another. It provides a notion for defining interfaces in which each of the parameters of a method may be described as for input or output in addition to having its type specified

Request-reply protocols This form of communication is designed to support the roles and message exchanges in typical client-server interactions. In the normal case, request-reply communication is synchronous because the client process blocks until the reply arrives from the server. It can also be reliable because the reply from the server is effectively an acknowledgement to the client. Asynchronous request-reply communication is an alternative that may be useful in situations where clients can afford to retrieve replies later

The request-reply protocol The protocol we describe here is based on a trio of communication primitives, do Operation, get Request and send Reply, as shown in Figure 5.2

The doOperation method is used by clients to invoke remote operations. Its arguments specify the remote server and which operation to invoke, together with additional information (arguments) required by the operation. Its result is a byte array containing the reply. getRequest is used by a server process to acquire service requests

The information to be transmitted in a request message or a reply message is shown in Figure 5.4 The first field indicates whether the message is a Request or a Reply message. The second field, requestId, contains a message identifier. A doOperation in the client generates a requestId for each request message, and the server copies these IDs into the corresponding reply messages. This enables doOperation to check that a reply message is the result of the current request, not a delayed earlier call. The third field is a remote reference. The fourth field is an identifier for the operation to be invoked.

Figure 4.16 Request-reply message structure

Remote procedure call When client program calls a procedure in another program running in a server process It is possible to have a chain of RPC (when?) A server process defines in its service interface the procedures that are available for client to be called This service is like a single remote object which has state and methods It lacks the ability to create new instances of objects, therefore it does not support remote object reference.

RPC ( con.) Invocation semantics: Retry request message Duplicate filtering Retransmission of results At-least-once invocation semantics : the method executed at least once or no result was received : Omission failure Arbitrary failure What are idempotent and non-idempotent operations? At-most-once invocation semantics : the method executed exactly once or no result was received

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 5.8 Role of client and server stub procedures in RPC in the context of a procedural language client Request Reply Communication module dispatcher service client stub server stub procedure client processserver process procedure program

In RPC, the client that accessed a service includes one stub procedure for each procedure in the service interface Client Stub procedure in RPC=proxy method in RMI Client Stub procedure marshals the procedure identifier and arguments into a request message Unmarshals the results What is the proxy? The role of the proxy is to make remote method invocation transparent to client by behaving like a local object to the invocer, but instead of executingan invocation it forwords it in a message toa remote object RPC ( con.)

In RPC, the server contains the following elements for each procedure in the service interface: Dispatcher: selects one stub procedure according to procedure identifier Server stub procedure = skeleton method in RMI Unmarshaled the arguments in the request Calls the corresponding service procedure Marshals the return values for the replay message Service procedures: implement the procedures in the service inteface The client and server stub procedures and the dispatcher can be generated by an interface compiler from the interface definition of the service RPC ( con.)

RPC jan.newmarch.name

RPCRMI NO remote object referenceRemote object reference Client stubProxy method Server stubSkeleton method Procedural programmingObject oriented programming languages RPC ( con.)