View RSS Feed

RMI

Remote Method Invocation (RMI) tutorials and examples.

  1. Stub and Skeleton Layer

    by
    RMI
    , 07-07-2012 at 05:27 PM
    Stub & skeleton layer is present below the Java developer view. In this layer RMI utilizes the proxy designed patterns, as per description in a famous book known as Design patterns. For proxy patterns one object present in a context is presented by some other proxy present in other separate context. This given class shows the proxy patterns.

    Name:  1.jpg
Views: 1122
Size:  12.8 KB
    Stub and Skeleton Layer

    For using proxy pattern of RMI, Sub class has a vital role of ...
  2. RMI Architecture Layers

    by
    RMI
    , 07-07-2012 at 05:25 PM
    Let us now look at the implementation of higher leveled RMI architecture.

    Three abstraction layers are involved in building the RMI implementation. First one is Stub & Skeleton layer that is present below the view of developer. Interception of this layer is done with method calls that are built by client, to referene variable which would be redirecting calls towards the remote services of RMI.

    Next layer is known as remote reference layer. This understands that ...
  3. Interfaces: The Heart of RMI

    by
    RMI
    , 07-07-2012 at 05:23 PM
    One principle is associated with RMI architecture and that is the implementation of behavior and definition of behavior are totally separate concepts. Code is allowed by RMI which defines what behavior is and also the code which keeps it separate.

    This is nicely fitted with the distributed system needs where clients have major concern regarding the service definition and servers to be focused to provide the services.

    Remote service definition in RMI is coded by usage ...
    Categories
    Tutorial
  4. Passing Objects in RMI

    by
    RMI
    , 07-07-2012 at 05:20 PM
    Argument to the return values could be of any type including remote objects, primitive data type, and local objects. It could be said more precisely that any type’s entity could be passed from or to remote method, as long as this entity would be considered as a type’s instance which is primitive type, aserializable object, or a remote object, that shows that interface java.io.Serializable would be implemented.

    There are few object types that are not upto any criteria and hence are ...
    Categories
    Tutorial
  5. Designing and Implementing the Application Components

    by
    RMI
    , 07-07-2012 at 05:19 PM
    First thing shall be the determination of application architecture which includes the components that are accessible remotely or are the local objects. Steps included are:

    • Remote interfaces are defined. Methods are specified by the remote interface which is remotely invoked by some client. Client would program towards the remote interface instead of implementation classes. Such interfaces design includes the object type determination which is used being parameters and which would
    ...
    Categories
    Tutorial
  6. Remote Interfaces, Objects, and Methods

    by
    RMI
    , 07-07-2012 at 05:18 PM
    Distributed applications are madeup of classes and interfaces, just the way all other Java applications are made. Methods are declared by the interfaces. Methods which have been declared are implemented by the classes. Perhaps, an additional method would also be declared. In distributed applications certain implementations are present in Java virtual machines, however others are not. Objects along with method which could possibly be invoked are known to be the remote objects.
    When a remote ...
  7. Overview of RMI Applications

    by
    RMI
    , 07-07-2012 at 05:16 PM
    Two separate programs are present in RMI applications, a client and a servlet. Typical program of servlet makes certain remote objects, makes the accessibility of the reference possible to these objects, or waits for invoking methods by the clients at these objects. Typical client progam gets reference to more than one remote object that is present at server which would invoke methods. Mechanism is provided by the RMI which makes communication between client and server. Also, information is passed ...
    Categories
    Tutorial
  8. Why to use the RMI when same benefits can be achieved from EJB?

    by
    RMI
    , 01-02-2012 at 06:41 PM
    EJB makes use of the RMI framework to do the object distribution. EJB application server provides extra services for example object pooling, transaction, database connection pooling etc which is not provided by RMI. Programming efforts are simplified by these services that have been given by EJB server, at performance cost in comparison with plain RMI. Therefore, if performance is more important then go for pure MRI as a better solution.
    Tags: rmi benefits Add / Edit Tags
    Categories
    Tutorial
  9. What is HTTP tunneling? How to make RMI calls, across firewalls?

    by
    RMI
    , 01-02-2012 at 06:40 PM
    Direct sockets are opened into server by RMI transport layer. Firewalls are present in many intranets which doesn’t permit this. To make through some firewall, within firewall trusted HTTP protocol embed the RMI call. RMI uses HTTP tunneling and this is done by the encapsulation of RMI calls present in HTTP POST request.

    Name:  38.JPG
Views: 2015
Size:  19.3 KB

    HTTP Tunneling

    • When HTTP requests may be forwarded by firewall proxy server just to some known HTTP port: ...
    Categories
    Tutorial
  10. Passing parameters in RMI

    by
    RMI
    , 01-02-2012 at 06:36 PM
    • By value, primitive types get passed. For example, Boolean, char, int etc.
    • Being remote references, remote object references get passed which permits the client process to make the methods invoked.
    • By object serialization, non remote objects get passed by value. Implementation of the java.io.Serializable interface shall take place which shall allow objects to get serialized.

    Remote method’s invocation gets initiated by the client process, using calling method present ...
    Categories
    Tutorial
  11. Services that are provided by the RMI Object

    by
    RMI
    , 01-02-2012 at 06:35 PM
    Certain basic object services are provided by the RMI that might get utilized on distributed application. Such services include:

    • Object naming/registry service: Services might be provided by the RMI servers to clients by the registration of 1 or more than one remote objects, along with local RMI registry.
    • Object activation service: Based on needs, server objects are provided. With absence of the remote activation service, there exists a need to register the server objects ...
    Categories
    Tutorial
  12. What is a remote object? Why UnicastRemoteObject should be extended?

    by
    RMI
    , 01-02-2012 at 06:34 PM
    Remote object is considered to be the one in which other JVM are used to invoke the methods. Remote interface gets implemented by the remote object class. RMI is that application that produces various remote objects.
    Responsibility of a RMI Server is:
    • To create the remote object’s instance e.g CarImpl instance = new CarImpl()).
    • Export the remote object.
    • Bind the remote object instance to the RMI registry.

    Client’s incoming calls are being accepted ...
    Categories
    Tutorial
  13. RMI Architecture

    by
    RMI
    , 01-02-2012 at 06:31 PM
    RMI or Java Remote Method Invocation gives means to Java program (present at a machine) to do communication with other objects present in other JVMs, address spaces or processes. RMI architecture’s important parts are the skeleton class, stub class and object serialization. Layered architecture is used by the RMI where layers are enhanced without having any affect at the other layers. To summarize the layers, proceed as following:

    • Application Layer: Server program and the client.
    • Stub
    ...
    Categories
    Tutorial