Java Distributed Computing

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Advertisements

What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
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.
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.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes.
Advanced Programming Rabie A. Ramadan Lecture 4. A Simple Use of Java Remote Method Invocation (RMI) 2.
Remote Method Invocation
Company LOGO Remote Method Invocation Georgi Cholakov, Emil Doychev, University of Plovdiv “Paisii.
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.
DISTRIBUTED FILE SYSTEM USING 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.
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.
Java RMI Essentials Based on Mastering RMI Rickard Oberg.
1 Java Programming II Java Network II (Distributed Objects in Java)
+ A Short Java RMI Tutorial Usman Saleem
15 - RMI. Java RMI Architecture Example Deployment RMI is a part of J2SE (standard edition), but is used by J2EE) A J2EE server is not nessesary for using.
Java Remote Method Invocation (RMI) ). Distributed Systems  a collection of independent computers that appears to its users as a single coherent system.
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.
RMI RMI is the java API that facilitate distributed computing by allowing remote method calls. A remote method call represents a method invocation between.
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.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
Java Programming: Advanced Topics 1 Networking Programming Chapter 11.
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 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 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.
RMI1 Remote Method Invocation Adapted from “Core Java 2” by Cay Horstmann.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Remote Method Invocation Internet Computing Workshop Lecture 17.
Java Distributed Computing
Chapter 4 Remote Method Invocation
Principles of Software Development
Distributed Computing
Broker in practice: Middleware
Remote Method Invocation
Java RMI CS-328 Internet Programming.
What is RMI? Remote Method Invocation
Remote Method Invocation
Network and Distributed Programming in Java
Programming Models for Distributed Application
Creating a Distributed System with RMI
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Creating a Distributed System with RMI
Remote method invocation (RMI)
Overview of RMI Architecture
Remote Method Invocation
Creating a Distributed System with RMI
Chapter 46 Remote Method Invocation
WebServices Using JAX-RPC
Chapter 46 Remote Method Invocation
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:

Java Distributed Computing 5.27.2003

Outline Homework #3 Distributed computing overview Programming RMI

Homework #3 Good news Ave. 13.8 Bad news Some people didn’t turn in

Distributed computing Sockets Messages from A to B Distributed computing A is doing some computation P A asks B to compute some function F

Sockets

Distributed Computing

Questions to ask How does… P know how to call F (method signature, host identity) When does user/programmer of P need to know P send its message to B and B send the answer back B handle F so it can be invoked The system provide quality of service, security and management

Distributed comp. approaches (RPC) RMI DCOM CORBA/JIDL Web services

RMI P and F are written in Java Standard part of Java API F’s interface is available to P at compile time Host determined at run-time Standard part of Java API RMI registry must be running on B Not much

RMI

DCOM P and F are implemented in COM Part of Windows OS A type library for F is available at compile time Destination is encoded in registry at run time Part of Windows OS Loads and runs autonomously Some MS tools

DCOM

CORBA An IDL description of F is available at compile time The ORB uses inter-ORB communication to find host dynamically Request sent to ORB Destination ORB activates and runs ORB vendors supply

CORBA

Web services P gets XML description of F HTTP/SOAP interaction This can happen at run-time Service registry knows what hosts offers the service HTTP/SOAP interaction Web application server invokes F Emerging

Web services

Trade-offs RMI DCOM CORBA Web services Java only Windows only Must buy ORB software Web services ??

RMI

Elements of an RMI application Remote object contains the methods we want to call RMI server a program that exposes the remote object RMI registry built-in intermediary RMI client program that accesses the remote object

RMI Elements

Remote Object Must implement a remote interface UnicastRemoteObject convenience class

Remote Interface Remote object’s signature Must extend java.rmi.Remote All methods must throw RemoteException

RMI Registry Distributed with the JDK No application-specific arguments

RMI Server Program creates instance of Remote Objects Names and publishes them in the RMI registry Must set security policy to allow remote connection

RMI Client Compiled using the Remote Interface Contacts remote registry Downloads stub for remote object Calls methods on the stub

Stub conforms to the remote interface, but connects to remote JVM marshals the parameters for F waits for the result of F, unmarshals the return value or exception returned, and returns the value to the caller.

Registration

Lookup

Method Call

Serialization Alternative to remote object Transmits the object itself Objects passed as parameters to remote methods implement java.io.Serializable no code necessary

RMI Example WeatherInfo IWeatherData WeatherData WeatherServer serialized class IWeatherData remote interface WeatherData remote object WeatherServer RMI server WeatherInfoClient RMI client

Deployment Distribute Run rmic to generate stubs for remote objects remote interfaces definitions of serializable classes Run rmic to generate stubs for remote objects Run registry Run RMI server