Extending Java RMI for Dynamic Reconfiguration

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

RMI Varun SainiYing Chen. What is RMI? RMI is the action of invoking a method of a remote interface on a remote object. It is used to develop applications.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes.
Remote Method Invocation
Company LOGO Remote Method Invocation Georgi Cholakov, Emil Doychev, University of Plovdiv “Paisii.
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.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
EEC-681/781 Distributed Computing Systems Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Introduction to Remote Method Invocation (RMI)
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Communication in Distributed Systems –Part 2
1 Java Programming II Java Network II (Distributed Objects in Java)
CSCI 6962: Server-side Design and Programming Web Services.
+ A Short Java RMI Tutorial Usman Saleem
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
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.
Java Remote Method Invocation RMI. Idea If objects communicate with each other on one JVM why not do the same on several JVM’s? If objects communicate.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
RMI Remote Method Invocation Distributed Object-based System and RPC Together 2-Jun-16.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
Common Object Request Broker Architecture (CORBA) The Common Object Request Broker Architecture (CORBA) is a specification of a standard architecture for.
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 17/10/2007.
Eric Tryon Brian Clark Christopher McKeowen. System Architecture The architecture can be broken down to three different basic layers Stub/skeleton layer.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.
Proxy Pattern. What’s a Proxy? A remote proxy acts as a local representative of a remote object Remote Object: instantiated in a different JVM heap (a.
The Proxy Pattern (Structural) ©SoftMoore ConsultingSlide 1.
Remote Method Invocation A Client Server Approach.
Distributed objects and remote invocation Pages
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Java RMI. RMI Any object whose methods can be invoked from another Java VM is called a remote object.
1 RMI Russell Johnston Communications II. 2 What is RMI? Remote Method Invocation.
Java Distributed Object Model A remote object is one whose methods can be invoked from another JVM on a different host. It implements one or more remote.
Distributed programming in Java Faculty:Nguyen Ngoc Tu Session 5 - RMI.
CSC 480 Software Engineering Lab 6 – RMI Nov 8, 2002.
Netprog Java RMI1 Remote Method Invocation.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
RMI1 Remote Method Invocation Adapted from “Core Java 2” by Cay Horstmann.
Topic 4: Distributed Objects 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.
Distributed and Parallel Processing George Wells.
RMI (Java RMI) P 460 in text UUIDs / system wide references Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc.
Java Distributed Computing
Chapter 4 Remote Method Invocation
Java Distributed Object System
Distributed Computing
Java Distributed Computing
Java Remote Method Invocation (RMI)
Broker in practice: Middleware
Remote Method Invocation
What is RMI? Remote Method Invocation
Network and Distributed Programming in Java
Programming Models for Distributed Application
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Creating a Distributed System with RMI
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Bond-Jini Interoperability
Creating a Distributed System with RMI
Distribution Infrastructures
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
Java Remote Method Invocation
Presentation transcript:

Extending Java RMI for Dynamic Reconfiguration Presentation for ECE 8813 Georgia Institute of Technology Spring 2003 Christophe Levand

Java RMI CLIENT RMI Registry ? myObj SERVER

Java RMI RMI Registry Naming.bind(“hello”, myObj) SERVER myObj

Java RMI Naming.lookup(“hello”) lookup returns the stub of myObj. CLIENT Naming.lookup(“hello”) RMI Registry lookup returns the stub of myObj. The stub code resides on the client.

Java RMI Stub on client / Skeleton on server Stub/Skeleton responsible for parameters marshalling/unmarshalling. Client uses the stub through an interface. The interface is implemented by the class of myObj. The stub is following the proxy design pattern. Consequence: Client uses the remote object as if it was “local”.

Dynamic reconfiguration: Motivations RMI RMI Server A Server B Server C

Dynamic reconfiguration: Motivations RemoteException ! Server A Server B Server C RMI ?

Dynamic reconfiguration: Motivations Solutions? The client intercepts the Exception and makes a new lookup Error handling is not transparent to the application. Before moving the target component, one has to make sure that there is no ongoing transactions. Extend the RMI middleware  XRMI. From a static to a dynamic approach.

RMI vs XRMI XRMI RMI Abstraction Client Server RMI Registry RMI Stub lookup (1) uses (3) forwards to (4) RMI Registry creates (2) RMI Stub RMI Client Server Component Manager Virtual Stub lookup (1) creates (2) uses (6) RMI lookup (3) RMI Registry creates (4) RMI Stub uses (5) forwards to (7) XRMI Abstraction

XRMI: General perspective Attributes of the virtual stub: - ClientName / ServerName provided by the CM A target reference provided by the CM. Dependency list: (client, server) - lock flag: to block new invocations invocation counter Client Server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI

XRMI: Scenario 1 Client needs to calls a method on the remote server object. Lock flag is false, so a call can be made. Virtual stub adds a dependency. Virtual stub delegates the call to rmi stub (target reference), which forwards to server. After the server sends the result back, Virtual stub removes the dependency. Virtual stub returns the result to the Client. Client Server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI

XRMI: Scenario 2 XRMI Server needs to be moved to another location. The CM on Server’s location broadcasts a query to all CMs in the network. Each CM gathers a list of all its Virtual stubs that point to server. For each Virtual stub of that list, set the lock flag to true: to block any new requests. Each Virtual stub of that list monitors its dependency list and sends a signal to the CM when the list is empty. Each CM sends a signal to the CM in Server’s location. Client Server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI

XRMI: Scenario 2 XRMI For each virtual stub used by server: set lock to true monitor the dependency list. send a signal to the CM when the list is empty. the CM moves the server to another location. the CM broadcasts a signal to every CMs. Each CM makes an RMI look up for the remote server and update the target reference in their virtual stubs that point to the old location. Client Server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI

XRMI: Improvement XRMI remote server XRMI local server no RMI lookup Client Server Client Server Component Manager Virtual Stub lookup (1) creates (2) uses (3) forwards to (4) XRMI local server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) no RMI lookup no parameter marshalling RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI remote server

XRMI: Improvement XRMI Attributes of the virtual stub: - ClientName / ServerName provided by the CM A target reference provided by the CM. Dependency list: (client, server) - lock flag: to block new invocations invocation counter  when high, move client to the same location as server. Client Server lookup (1) uses (6) Component Manager Virtual Stub creates (2) forwards to (7) RMI lookup (3) uses (5) RMI Registry creates (4) RMI Stub XRMI

RMI / XRMI cost comparison Runtime environment Middleware Time (ms) Caller and callee on same computer RMI 1.01 XRMI 0.06 Caller and callee on different computers 2.79 2.83

Resources Xuejun Chen, Extending RMI to Support Dynamic Reconfiguration of Distributed Systems. Proceedings of the 22nd International Conference on Distributed Computing Systems, page(s): 401 – 408, 2002. http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html