Practical Issues of RPCCS-4513, D-Term 20071 Remote Procedure Call Practical Issues CS-4513 Distributed Computing Systems (Slides include materials from.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
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.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Java Remote Method Invocation (RMI) In Java we implement object systems: O1O2 O3 thread 1thread 2 execution scheme JVM 1JVM 2 distribution scheme.
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.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
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
CSE331: Introduction to Networks and Security Lecture 11 Fall 2002.
Remote Procedure Call Chin-Chih Chang. Remote Procedure Call Remote Procedure Call (RPC) is a protocol that allows programs to call procedures located.
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.
Remote Procedure CallCS-4513 D-term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts,
Communication in Distributed Systems –Part 2
Netprog RPC Overview1 Distributed Program Design n Communication-Oriented Design –Design protocol first. –Build programs that adhere to the protocol.
RMI Components java.rmi: client-side RMI classes, interfaces, and exceptions java.rmi.server: server-side RMI classes, interfaces, and exceptions java.rmi.registry:
1 Java Programming II Java Network II (Distributed Objects in Java)
Remote Procedure CallCS-502 Fall Remote Procedure Call CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System Concepts,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
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
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 4 Communication.
1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong. With Thanks to.
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.
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.
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 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.
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.
Presentation: RMI introduction. Goals of this lesson After this 35 min. lesson you will be: Introduced to Java RMI Ready to present RMI’s position in.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
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 Procedure CallCS-502 Fall Remote Procedure Call (continued) CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System.
 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.
Introduction to Distributed Systems and CORBA Slides for CSCI 3171 Lectures E. W. Grundke.
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.
1 Lecture 15 Remote Method Invocation Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
CSC 480 Software Engineering Lab 6 – RMI Nov 8, 2002.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Java Remote Method Invocation (RMI)
Remote Method Invocation
What is RMI? Remote Method Invocation
Remote Method Invocation
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Distributed Program Design
Chapter 46 Remote Method Invocation
CS-502, Operating Systems Fall 2009 (EMC)
Chapter 46 Remote Method Invocation
Java Remote Method Invocation
Presentation transcript:

Practical Issues of RPCCS-4513, D-Term Remote Procedure Call Practical Issues CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts, 7 th ed., by Silbershatz, Galvin, & Gagne, Modern Operating Systems, 2 nd ed., by Tanenbaum, and Distributed Systems: Principles & Paradigms, 2 nd ed. By Tanenbaum and Van Steen)

Practical Issues of RPCCS-4513, D-Term Review Message-oriented communication Connections Establishing a connection with a service Reliable communication via TCP Connection-less communication via UDP Remote Procedure Call Procedural interface between client and service IDL & stub compiler (hides communication details) Hiding data representation differences Restrictions on passing objects by reference

Practical Issues of RPCCS-4513, D-Term Practical RPC Systems DCE (Distributed Computing Environment) Open Software Foundation Basis for Microsoft DCOM Tanenbaum & Van Steen, §4.2.4 Sun’s ONC (Open Network Computing) Very similar to DCE Widely used rpcgen ON/HTML/AA-Q0R5B-TET1_html/TITLE.htmlhttp://h30097.www3.hp.com/docs/base_doc/DOCUMENTATI ON/HTML/AA-Q0R5B-TET1_html/TITLE.html

Practical Issues of RPCCS-4513, D-Term Practical RPC Systems (continued) Java RMI (Remote Method Invocation) java.rmi standard package Java-oriented approach — objects and methods CORBA (Common Object Request Broker Architecture) Standard, multi-language, multi-platform middleware Object-oriented Heavyweight …

Practical Issues of RPCCS-4513, D-Term Implementation Model for DCE

Practical Issues of RPCCS-4513, D-Term Differences for ONC program & version # rpcgen

Practical Issues of RPCCS-4513, D-Term Validating a Remote Service Purpose Avoid binding to wrong service or wrong version DCE Globally unique ID –Generated in template of IDL file Sun ONC Program numbers registered with Sun Version # and procedure # administered locally

Practical Issues of RPCCS-4513, D-Term RPC Binding — Sun ONC Service registers with portmapper on server OS Program # and version # Optional static port # Client Must know host name or IP address clnt_create(host, prog, vers, proto) –I.e., RPC to portmapper of host requesting to bind to prog, vers using protocol proto ( tcp or udp ) (Additional functions for authentication, etc.) Invokes remote functions by name

Practical Issues of RPCCS-4513, D-Term Sun ONC (continued) #include Header file for client and server rpcgen The stub compiler –Compiles interface.x –Produces.h files for client and service; also stubs See also rpcinfo RPC Programming Guide

Practical Issues of RPCCS-4513, D-Term Note on XDR (the interface definition language for ONC) Much like C Exceptions –string type – maps to char * –bool type – maps to bool_t

Practical Issues of RPCCS-4513, D-Term Sun ONC Online tutorial ON/HTML/AA-Q0R5B-TET1_html/TITLE.htmlhttp://h30097.www3.hp.com/docs/base_doc/DOCUMENTATI ON/HTML/AA-Q0R5B-TET1_html/TITLE.html CS-4513 code samples Any other resources you can find

Practical Issues of RPCCS-4513, D-Term Java RMI Based on objects & methods –I.e., an object may be located remotely –Accessed via methods –RMI causes methods to be invoked by RPC Stubs may be local or remote –Subject to security policy

Practical Issues of RPCCS-4513, D-Term Java RMI Binding Remote objects must be registered with RMI registry –May specify a port –Security policy compiled with object Client looks up object via Naming method –Specifies host (& port, if needed) –Remote stubs delivered with lookup, subject to security policy

Practical Issues of RPCCS-4513, D-Term Java Remote Object details Interface must extend java.RMI.Remote Must be public No new methods introduced by java.RMI.Remote Should also extend java.rmi.server.UnicastRemoteObject Replaces some Object class methods for proper operation in distributed environment Must throw java.rmi.RemoteException May impact definition of existing interfaces

Practical Issues of RPCCS-4513, D-Term Java Remote Object details (continued) Compiling object and stubs Object compiled to bytecodes with javac Stubs compiled with rmic RMI registry must be running before remote object can be launched rmiregistry command (part of JDK distribution) Multiple registries possible on different ports Remote object registers itself java.rmi.Naming interface

Practical Issues of RPCCS-4513, D-Term Java Client details Initialize RMI security manager System.setSecurityManager (…) If no security manager, only local stubs may be loaded Client must find and bind to remote object lookup () method in java.RMI.Naming Location of remote object specified in URL style –E.g., “rmi://garden.wpi.edu:1099/ObjectName” Remote stubs loaded by lookup –Per security policy

Practical Issues of RPCCS-4513, D-Term Java RMI CS-4513 examples – – – Uses terms “proxy” and “skeleton” for “client-side stub” and “service-side stub” respectively Identifies issues with SYNCHRONIZED remote objects Tanenbaum & Van Steen §10.3, esp. § Any other resources you can find

Practical Issues of RPCCS-4513, D-Term Questions?

Practical Issues of RPCCS-4513, D-Term Fundamental Issue With Sun ONC and Java RMI, client must know name or address of server machine in order to bind to remote service IP address or remote name (Sometimes) port number I.e., services are bound to server machines

Practical Issues of RPCCS-4513, D-Term Problems Location of remote objects not always known Location of remote objects not always constant Pointers/References to remote services are only useful to fixed servers Distributed & replicated services are difficult, at best Location independence is impossible …

Practical Issues of RPCCS-4513, D-Term Needed Location-independent object registry Any object can register itself Location-independent object naming Name of object does not imply location Distributed, replicated registry If any instance goes down, others can serve Distributed, replicated remote objects Any instance may serve in many cases …

Practical Issues of RPCCS-4513, D-Term Solutions Some or all of these things are typically provided in the major distributed object standards DCOM, CORBA, etc. “Global” registry is central component

Practical Issues of RPCCS-4513, D-Term But … None really get it right for broad spectrum of distributed systems & applications E.g., CORBA Very heavyweight (too cumbersome) Object can live in only one location –Inefficient for very commonly accessed objects –Distributed, replicated object difficult to support

Practical Issues of RPCCS-4513, D-Term Reading Assignment “Grapevine: An Exercise in Distributed Computing,” Communications of the ACM, April 1982 PDF link

Practical Issues of RPCCS-4513, D-Term Break