REMOTE METHOD INVOCATION
(RMI)
Presented by:-
SARFARAZ HUSAIN
1305010334
MCA 5TH SEM
RMI....
1. What is RMI ?
2. Important compomnent of RMI
3. RMI Stub and Skeleton
4. RMI Advantages
5. RMI Disadvanteges
What is RMI ?
RMI is a lightweight java technology that provides access
to remote methods, similar to RPC, but Object-
Oriented.RMI provides remote object access for a client
and object registration for servers.
RMI is a Java Technology since it requires that client and
server objects run in a JVM. By using IIOP(Internet Inter-
ORB Protocol) transport protocol, however, it is possible
to connect RMI-clients to non-java server objects(CORBA).
CLIENT SERVERRMI
Important compomnent of RMI
Client:-
The clients lookup a remote object and calls methods on the obtained
remote object.
Object:-
The server registeres itself in the RMI registry and accepts method
invocations from yhe client.
RMI Registry:-
The registry is the remote object lookup service.The Registry may run
on the same host as the server or on a different host.The registry can
also be a JNDI server.
Web server:-
A plain venilla HTTP sever may hold remote object classes for
downloading by the client.
RMI Stub and Skeleton
Stub:-
1.It Iinitiates a connection with remote Virtual Machine (JVM),
2.It writes and transmits (marshals) the parameters to the remote Virtual Machine
3.It waits for the result
4.It reads (unmarshals) the return value or exception, and
5.It finally, returns the value to the caller.
Skeleton:-
1.It reads the parameter for the remote method
2.It invokes the method on the actual remote object, and
3.It writes and transmits (marshals) the result to the caller.
Advantages of RMI
1. Handles threads for you
2. Handles Sockets for you
3. Nice GC of lost clients. ie Unreferenced
4. Marshalls objects for you
5. Dynamic loading of classes are available.
6. Can also make changes on the server end, that
might not mean you need to change anything on the
client side.
Disadvantages of RMI
1. Strictly Java Cannot use with other code outside Java
2. Cannot guarantee that a client will always use the
same thread in consecutive calls. Meaning you need to
write a mechanism for identifying the client yourself
3. I think it is more Hackable, security needs to be
monitored more closely.
See I always get stuck with the disadvatages. I can come
up with 2 good ones, and falter on a third.
THANKs

Rmi presentation

  • 1.
    REMOTE METHOD INVOCATION (RMI) Presentedby:- SARFARAZ HUSAIN 1305010334 MCA 5TH SEM
  • 2.
    RMI.... 1. What isRMI ? 2. Important compomnent of RMI 3. RMI Stub and Skeleton 4. RMI Advantages 5. RMI Disadvanteges
  • 3.
    What is RMI? RMI is a lightweight java technology that provides access to remote methods, similar to RPC, but Object- Oriented.RMI provides remote object access for a client and object registration for servers. RMI is a Java Technology since it requires that client and server objects run in a JVM. By using IIOP(Internet Inter- ORB Protocol) transport protocol, however, it is possible to connect RMI-clients to non-java server objects(CORBA). CLIENT SERVERRMI
  • 4.
    Important compomnent ofRMI Client:- The clients lookup a remote object and calls methods on the obtained remote object. Object:- The server registeres itself in the RMI registry and accepts method invocations from yhe client. RMI Registry:- The registry is the remote object lookup service.The Registry may run on the same host as the server or on a different host.The registry can also be a JNDI server. Web server:- A plain venilla HTTP sever may hold remote object classes for downloading by the client.
  • 5.
    RMI Stub andSkeleton Stub:- 1.It Iinitiates a connection with remote Virtual Machine (JVM), 2.It writes and transmits (marshals) the parameters to the remote Virtual Machine 3.It waits for the result 4.It reads (unmarshals) the return value or exception, and 5.It finally, returns the value to the caller. Skeleton:- 1.It reads the parameter for the remote method 2.It invokes the method on the actual remote object, and 3.It writes and transmits (marshals) the result to the caller.
  • 6.
    Advantages of RMI 1.Handles threads for you 2. Handles Sockets for you 3. Nice GC of lost clients. ie Unreferenced 4. Marshalls objects for you 5. Dynamic loading of classes are available. 6. Can also make changes on the server end, that might not mean you need to change anything on the client side.
  • 7.
    Disadvantages of RMI 1.Strictly Java Cannot use with other code outside Java 2. Cannot guarantee that a client will always use the same thread in consecutive calls. Meaning you need to write a mechanism for identifying the client yourself 3. I think it is more Hackable, security needs to be monitored more closely. See I always get stuck with the disadvatages. I can come up with 2 good ones, and falter on a third.
  • 8.