1 / 12

Remote Method Invocation

Remote Method Invocation. by James Hunt, Joel Dominic, and Adam Mcculloch. CONTENT. What is RMI Why is it used How is it used. WHAT ARE OBJECTS. Encapsulation of…. Data including pointers to other objects Methods used to manipulate the data. WHAT DOES RMI REALLY MEAN?.

heaton
Télécharger la présentation

Remote Method Invocation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch

  2. CONTENT • What is RMI • Why is it used • How is it used

  3. WHAT ARE OBJECTS Encapsulation of… • Data • including pointers to other objects • Methods • used to manipulate the data

  4. WHAT DOES RMI REALLY MEAN? • RMI stands of Remote Method Invocation • Essentially allows for a client to perform • operations on objects stored on a separate networked machine • Idea for RMI taken from RPC or Remote Procedure Call • Basically just the Procedural Programming approach to RMI • Allows for procedures to be executed on a separately networked machine

  5. COMMON USES/INTERFACES FOR RMI RMI is used in most distributed java applications • Solely in java originally • Has been ported to CORBA (Common Object Request Broker Architecture) • CORBA allows RMI to be used by non java languages

  6. HOW IT WORKS • A client machine will make a method call for remote objects that reside on a server • The server will then run that method on the object • Finally, the server will return the results of that method to the client

  7. PASSING OBJECT PARAMETERS Serializing objects: • In java (main language for RMI) objects must use the serializable interface • Everything within the object is encoded into a byte stream • Non primitive objects being encoded must also implement the serializable interface

  8. STUBS and SKELETONS Stubs: • Resides on client machine • Contains: • Parent Object Reference • Method call • Parameters needed for execution Skeletons: • Resides only on the server • Unwraps the stub to be run server side • Translates stubs into actual object calls

  9. Diagram courtesy of: http://www.cs.uiowa.edu/~slonnegr/wpj/RMI.pdf

  10. Java code courtesy of: http://download.oracle.com/javase/tutorial/rmi/implementing.html

  11. SUMMARY • Client machine makes a method request on an object that resides on the Server • Client must pass in serialized objects as parameters and then use Stubs and Skeletons to wrap and unwrap these objects • Server passes information back to the client through serialized objects

  12. SOURCES • http://www.cs.uiowa.edu/~slonnegr/wpj/RMI.pdf • http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136424.html • http://download.oracle.com/javase/tutorial/rmi/index.html • http://download.oracle.com/javase/tutorial/rmi/implementing.html • http://www.daimi.au.dk/~mailund/scripting2005/lecture-notes/rmi.html • http://notes.corewebprogramming.com/student/RMI.pdf • http://infolab.stanford.edu/CHAIMS/Doc/Details/Protocols/rmi/rmi_description.html • http://www.javacamp.org/moreclasses/rmi/rmi22.html • http://www.sentex.net/~pkomisar/RMI.html • http://java.sun.com/developer/technicalArticles/ALT/sockets/

More Related