This is a powerful feature java rmi is shipped with

Info icon This preview shows pages 19–22. Sign up to view the full content.

loading of new classes as required. This is a powerful feature! Java RMI is shipped with the Java JDK 1.4. It is a true distributed computing application interface for Java. Unlike other distributed programming interfaces (e.g., Corba, etc.), Java RMI is language specific. This is a good thing because by being language specific, RMI has the ability to provide more advanced feature like serialization, security, etc. How RMI works: RMI uses a network-based registry to keep track of the distributed objects. The server object makes a method available for remote invocation by binding it to a name in the registry. The client object, in turn, can check for availability of an object by looking up its name in the registry. The registry acts as a limited central
Image of page 19

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

DS & ADB DCET RAHEEM UNNISA 20 160317742004 management point for RMI. The registry is simply a name repository. It does not address the problem of actually invoking the remote method. The two objects may physically reside on different machines. A mechanism is needed to transmit the client's request to invoke a method on the server object to the server object and provide a response. RMI uses an approach similar to RPC in this regard. The code for the server object must be processed by an RMI compiler called rmic , which is part of the JDK. The RMIC compiler generates two files: a stub and a skeleton . The stub resides on the client machine and the skeleton resides on the server machine. The stub and skeleton are comprised of Java code that provides the necessary link between the two objects. When a client invokes a server method, the JVM looks at the stub to do type checking (since the class defined within the stub is an image of the server class). The request is then routed to the skeleton on the server, which in turn calls the appropriate method on the server object. In other words, the stub acts as a proxy to the skeleton and the skeleton is a proxy to the actual remote method. The first layer is the Stub/Skeleton Layer. This layer is responsible for managing the remote object interface between the client and server. The second layer is the Remote Reference Layer (RRL). This layer is responsible for managing the "liveliness" of the remote objects. It also manages the communication between the client/server and virtual machines, (e.g., threading, garbage collection, etc.) for remote objects. The third layer is the Transport Layer. This is the actual network/communication layer that is used to send the information between the client and server over the wire. It is currently TCP/IP based.
Image of page 20
DS & ADB DCET RAHEEM UNNISA 21 160317742004 RMI is a 3 tier arch and combination of 4 layers. RMI architecture consists of four layers and each layer performs specific functions: 1. Application Layer : contains the actual object definition 2. Proxy layer : consists of stub and skeleton 3. Remote Reference Layer : gets the stream of bytes from the transparent layer and sends it to the proxy layer.
Image of page 21

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 22
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '16
  • zeenath
  • ADB, RAHEEM UNNISA

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern