Distribution Infrastructures

Slides:



Advertisements
Similar presentations
RPC Robert Grimm New York University Remote Procedure Calls.
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.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Remote Object Invocation
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
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)
Java RMI, JAX-RPC and JWSDP
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
.NET Mobile Application Development Remote Procedure Call.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
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.
Lecture 15-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) October 12, 2010 Lecture 15 RPCs and Distributed.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
RMI RMI is the java API that facilitate distributed computing by allowing remote method calls. A remote method call represents a method invocation between.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Systems Prog. & Script. - Heriot Watt Univ 1 Systems Programming & Scripting Lecture 11: The Distributed Object Model.
Lecture 5: RPC and Distributed Objects Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
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.
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.
1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Lecture 8-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) September 19, 2013 Lecture 8 RPCs and Distributed.
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.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
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 4 Remote Method Invocation
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Communication between distributed objects Remote procedure call
Chapter 5 Remote Procedure Call
CSE 486/586 Distributed Systems Remote Procedure Call
Remote Method Invocation
Communication between distributed objects Remote procedure call
Edition 5, © Addison-Wesley 2012
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
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 Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Slides for Chapter 5: Distributed objects and remote invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Creating a Distributed System with RMI
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Remote method invocation (RMI)
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
Overview of RMI Architecture
Remote invocation (call)
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Java Remote Method Invocation
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
System Models Bina Ramamurthy 9/7/2019 B.Ramamurthy.
Presentation transcript:

Distribution Infrastructures Chapter 5 2/23/2019 B.Ramamurthy

Object Model Object References (OR) Interfaces Actions Exceptions Garbage Collection 2/23/2019 B.Ramamurthy

Object References Objects are accesses via object references. Methods are invoked on a target object by providing object reference, method name and arguments. Methods are invoked on the receiver or target object. OR are first class values meaning that they can be assigned, passed as arguments, and returned as results. 2/23/2019 B.Ramamurthy

Interfaces An interface provides a definition of the signatures of a set of methods without specifying their implementation. Interface can also define new types for parameters and return values. Interfaces do NOT have constructors. An object may implement many interfaces. An interface may be implemented many ways. 2/23/2019 B.Ramamurthy

Actions Actions in an object-oriented program is initiated by an object invoking a method in another object. An invocation can have two effects: The state of the receiver may change Further invocations may take place If no exceptions occur control will eventually return to the caller. 2/23/2019 B.Ramamurthy

Exceptions Exceptions provide a clean way to deal with error conditions. Each method heading explicitly lists as exceptions the error conditions it may encounter. A block of code is defined to throw an exception on error and catch blocks to capture and process the errors. Control may not return to the point the exception was thrown. 2/23/2019 B.Ramamurthy

Garbage Collection Is means of freeing up space occupied by objects which are no longer needed. Java has a built in mechanism to do that. But for development in languages such as C++ it is the responsibility of the programmer to do this. If garbage is collected properly it may lead memory leak and eventual break down of the software system. 2/23/2019 B.Ramamurthy

Distributed Object Model Remote Object Reference (ROR) Remote Interface Distributed Actions Distributed Garbage Collection Exceptions (Remote in Java) Look at Java RMI implementation as an example. 2/23/2019 B.Ramamurthy

RMI Method Invocation Semantics Any request-reply model can be implemented in different ways to provide different delivery guarantees. Retry request message: whether to transmit the request until server receives it. Duplicate filtering: filter duplicate requests to the server. Retransmission of results: Keep a history of requests to enable retransmission of results without re-executing requests. 2/23/2019 B.Ramamurthy

Transparency Originally RPC (Birell and Nelson) aimed to make RPC no different from a local call. CORBA and RMI do hide marshalling and messaging from the programmer. But latency and partial failure of server cannot be ignored. Waldo (1994) says it cannot be transparent. We should assign a different syntax to remote calls. 2/23/2019 B.Ramamurthy

The role of proxy and skeleton in remote method invocation object A object B skeleton Request proxy for B Reply Communication Remote Remote reference module reference module for B’s class & dispatcher remote client server 2/23/2019 B.Ramamurthy

Communication Module Two co-operating modules carry out the request-reply protocol. Message structure given in next slide. Communication model is responsible for providing invocation semantics, we discussed earlier. Object references are responsibility of remote object reference module. Method id and marshalling aspects are responsibility the RMI software. 2/23/2019 B.Ramamurthy

Request-reply message structure messageType requestId objectReference methodId arguments int (0=Request, 1= Reply) int RemoteObjectRef int or Method array of bytes 2/23/2019 B.Ramamurthy

Remote Reference Module A remote reference module is responsible for translating between local and remote object reference and for creating remote object references. Remote reference module in each process has remote reference table that has An entry all the objects held by the process. An entry for each local proxy 2/23/2019 B.Ramamurthy

Actions of the Remote Reference Module “Send”: When a remote object is to be passed as argument or result for the first first, ROR is created and added to the table. “Receive”: When a ROR arrives in a request or reply, Remote Reference module has to search its table for a local object reference which may be a proxy or a remote object. If it is not there a proxy is created and added to the table. Basically maintain a table of ROR and proxies. 2/23/2019 B.Ramamurthy

RMI Software Between application-level objects and remote reference module and communication module. It contains the middleware objects: proxy, dispatcher, and skeleton. We will study the roles of these classes next: 2/23/2019 B.Ramamurthy

RMI Software: Proxy Role of proxy is to make remote invocation transparent to the clients. There is one proxy for each remote object for which a process holds remote object reference. Class of a proxy implements the methods in the remote interface quite differently. For each method proxy marshals a reference to the target object, its own methodId and its arguments into a request message, and sends it to the target, awaits the reply message, unmarshals it and return the result to the invoker. 2/23/2019 B.Ramamurthy

RMI Software: Dispatcher, Skeleton A server has one dispatcher and skeleton for each class representing a remote object. It then maps the methodID to the appropriate method in the skeleton. Skeleton unmarshals the arguments and invokes the actual remote object method and marshals the result and or exceptions, if any. 2/23/2019 B.Ramamurthy

RMI design and Implementation Remote objects are created by factory methods. A binder is needed by the server to register and object and by the server to lookup an object. A binder maintains a table containing mappings of textual references to ROR. RMI registry is a binder. 2/23/2019 B.Ramamurthy

RMI Naming class RMiRegistry is accessed by the Naming class. void rebind(String name, Remote obj) void bind(String Name, Remote obj) void unbind(String name, Remote obj) void lookup(String name) String[] list() list all the bindings. 2/23/2019 B.Ramamurthy

Use of Reflection in RMI Reflection is a process by which an object can be queried to reveal its methods. Reflection is used to pass information in request messages about the method to be invoked. It uses a class called Method defined in java.lang.reflect package. Method can be invoked on an object of suitable class. 2/23/2019 B.Ramamurthy

Using Method class In RMI Proxy marshals by putting method in Method object, and arguments in an array of Objects. Dispatcher unmarshals (a) the Method object and (b)array of argument objects and directly invokes by using invoke method and the two parameters above. So the dispatcher can be generic and may not need the support of a object-specific skeleton. 2/23/2019 B.Ramamurthy

Assignment Read Section 5.4 Event and Notifications which is another example dealing with distributed infrastructures. 2/23/2019 B.Ramamurthy