Company LOGO Remote Method Invocation Georgi Cholakov, Emil Doychev, University of Plovdiv “Paisii.

Slides:



Advertisements
Similar presentations
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
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.
Remote Method Invocation CS587x Lecture Department of Computer Science Iowa State University.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
15-May-15 RMI Remote Method Invocation. 2 “The network is the computer” Consider the following program organization: If the network is the computer, we.
Advanced Programming Rabie A. Ramadan Lecture 4. A Simple Use of Java Remote Method Invocation (RMI) 2.
Java Remote Method Invocation (RMI) In Java we implement object systems: O1O2 O3 thread 1thread 2 execution scheme JVM 1JVM 2 distribution scheme.
Java Remote Object Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
Remote Method Invocation
FONG CHAN SING (143334) WONG YEW JOON (143388). JAVA RMI is a distributive system programming interface introduced in JDK 1.1. A library that allows an.
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.
1 HANDOUT 14 Remote Method Invocation (RMI) BY GEORGE KOUTSOGIANNAKIS THIS DOCUMENT CAN NOT BE REPRODUCED OR DISTRIBUTED WITHOUT TH E WRITTEN PERMISSION.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
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)
Java Remote Object Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Java RMI Essentials Based on Mastering RMI Rickard Oberg.
1 Java Programming II Java Network II (Distributed Objects in Java)
CS 584 Lecture 18 l Assignment » Glenda assignment extended to the Java RMI Deadline » No Java RMI Assignment l Test » Friday, Saturday, Monday.
+ A Short Java RMI Tutorial Usman Saleem
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
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 Continued IS Outline  Review of RMI  Programming example.
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.
Java Remote Object Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 17/10/2007.
Java Remote Method Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
 Java RMI Distributed Systems IT332. Outline  Introduction to RMI  RMI Architecture  RMI Programming and a Sample Example:  Server-Side RMI programming.
Remote Method Invocation A Client Server Approach.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Remote Method Invocation RMI architecture stubs and skeletons for remote services RMI server and client in Java Creating an RMI Application step-by- step.
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.
Khoa CNTT 1/37 PHẠM VĂN TÍNH   Java 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.
1 Lecture 15 Remote Method Invocation Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
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.
RMI1 Remote Method Invocation Adapted from “Core Java 2” by Cay Horstmann.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Java Distributed Computing
Java Distributed Computing
Java Remote Method Invocation (RMI)
Remote Method Invocation
What is RMI? Remote Method Invocation
Remote Method Invocation
Knowledge Byte In this section, you will learn about:
Network and Distributed Programming in Java
Creating a Distributed System with RMI
Chapter 40 Remote Method Invocation
Creating a Distributed System with RMI
Overview of RMI Architecture
Remote Method Invocation
Creating a Distributed System with RMI
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
CS 584 Lecture 18 Assignment Glenda assignment extended to the Java RMI Deadline No Java RMI Assignment Test Friday, Saturday, Monday.
Java Remote Method Invocation
Creating a Distributed System with RMI
Overview of RMI Architecture
Java Chapter 5 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Company LOGO Remote Method Invocation Georgi Cholakov, Emil Doychev, University of Plovdiv “Paisii Hilendarski”, e-Commerce Laboratory eCL Course materials

In order to begin… Necessary knowledge Desirable knowledge Basic Java knowledge, including Building hierarchies of interfaces and classes Passing parameters by value and by reference Object serialization Experience with streams in Java Naming Services Not necessary knowledge Details of network protocols, such as TCP/IP Sockets

Overview The necessity of distributed computing Proven scientifically and practically RMI – gives opportunity to distribute the work among different processes (machines) The Remote Method Invocation idea The RMI is not a totally new idea in the distributed computing area – many of its features come from CORBA (Remote Procedure Call, generation of stubs and skeletons, naming service) RMI – designed only for Java, pure Java-to-Java solution

What is RMI? Definition Remote Method Invocation – designed to provide distributed object development tool for Java applications, running in different JVMs eventually on different hosts. Existing systems – differences with RMI CORBA Remote Procedure Call in C/C++

How RMI works Java Client Stub RMI Registry Remote object Skeleton Network Client JVMRemote JVM

A close look at the details Remote interface An object can be considered as a remote object if it implements a remote interface. A remote interface is a Java interface that: extends java.rmi.Remote interface; is public; each method throws java.rmi.RemoteException. Remote object There are several rules for implementing class to obey: the class must extend UnicastRemoteObject; must contain a non-argument constructor; must provide an implementation for each remote method.

A close look at the details Stub and Skeleton The Stub/Skeleton layer is the interface between applications and the RMI system. The stub is responsible for: Initiating a call to the remote object and sending arguments (if any) to the stream; Receive the result or exception. The skeleton is responsible for: Receiving arguments from the stream; Doing the actual method call to the remote object; Sending the result back to the stream.

A close look at the details RMI Registry The RMI Registry is: a process, running on the remote virtual machine and makes it possible for client applications to locate and obtain references to remote objects; it provides the naming service for registering and retrieving remote object reference by name. Java client The Java client application has only one RMI specific task – to look up the remote object and get the reference.

A close look at the details Security In order the client to interact with objects in different virtual machine, the specific permissions must be granted. These permissions are stored in a policy file, named java.policy. To prevent the system from executing a harmful code the security manager must be installed, such as RMISecurityManager. This class defines a default security policy for RMI applications.

Summary of steps to implement RMI To implement a RMI server and client, we have to: develop the remote interface, extending java.rmi.Remote and declare all methods, that will be visible for remote invocation, each method throwing the java.rmi.RemoteException; realize the class of the remote object, implementing the remote interface, and extend the class UnicastRemoteObject. We must not forget in the main() method to install security manager, then create an instance of the object and bind it to the registry; generate stub and skeleton; When these tasks are done, we can: start the naming service (RMI Registry) and run the remote object; develop the client application, which must obtain reference to the remote object in the naming service. Now the remote methods will be available as they are locale.

Conclusion The Remote Method Invocation is a lightweight and simple approach to the distributed computing in comparison with other existing systems. We may consider RMI as an extension of Java, because it’s contained in Java. RMI has simplicity and great performance for lightweight distributed systems.