RMI      http://www.java2all.com
Chapter 1RMI Introduction                   http://www.java2all.com
RMI Introduction:                    http://www.java2all.com
RMI stands for “Remote MethodInvocation” means communicating the objectacross the network.    RMI is a one type of structu...
RMI provides for remote communicationbetween programs written in the JAVA.General functioning diagram :                   ...
The complete RMI system has a FOUR layer,(1)   Application Layer(2)   Proxy Layer(3)   Remote Reference Layer(4)   Transpo...
RMI Architecture:                    http://www.java2all.com
The RMI Architecture (System) has a FOURlayer,(1)   Application Layer(2)   Proxy Layer(3)   Remote Reference Layer(4)   Tr...
http://www.java2all.com
(1) Application Layer:      It’s a responsible for the actual logic(implementation) of the client and server applications....
(3) Remote Reference Layer (RRL):       It’s a responsible for manage the referencesmade by the client to the remote objec...
(4) Transport Layer:       It’s also called the “Connection layer”.It’s a responsible for the managing the existingconnect...
RMI Components:                  http://www.java2all.com
The RMI application contains the THREE components(1) RMI Server(2) RMI Client(3) RMI Registry                             ...
http://www.java2all.com
(1) RMI Server:       RMI Server contains objects whose methods areto be called remotely. It creates remote objects andapp...
Now, it can be invokes the methods on theremote object to access the services of the objects asper the requirement of logi...
When the Client call the method on this object,it’s not directly call but it call by the reference whichis already set in ...
RMI Registry:                http://www.java2all.com
The RMI Registry is a naming service.RMI server programs use this service to bind theremote java object with the names.   ...
1. Start registry by using following command           start rmiregistry       By default the port 1099 is used by RMI reg...
http://www.java2all.com
From the figure we can see that server calls theRMI registry to map a name with a remote objectrepresented by black circle...
Upcoming SlideShare
Loading in...5
×

Java rmi

5,181

Published on

ppt of java rmi introduction, components, architecture and registry

Published in: Education
0 Comments
18 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,181
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
18
Embeds 0
No embeds

No notes for slide

Java rmi

  1. 1. RMI http://www.java2all.com
  2. 2. Chapter 1RMI Introduction http://www.java2all.com
  3. 3. RMI Introduction: http://www.java2all.com
  4. 4. RMI stands for “Remote MethodInvocation” means communicating the objectacross the network. RMI is a one type of structure or systemthat allows an object running in one Javavirtual machine (Client) to invoke methods onan object running in another Java virtualmachine (Server).This object is called aRemote Object and such a system is alsocalled RMI Distributed Application. http://www.java2all.com
  5. 5. RMI provides for remote communicationbetween programs written in the JAVA.General functioning diagram : http://www.java2all.com
  6. 6. The complete RMI system has a FOUR layer,(1) Application Layer(2) Proxy Layer(3) Remote Reference Layer(4) Transport LayerMainly the RMI application contains the THREEcomponents,(1) RMI Server(2) RMI Client(3) RMI Registry http://www.java2all.com
  7. 7. RMI Architecture: http://www.java2all.com
  8. 8. The RMI Architecture (System) has a FOURlayer,(1) Application Layer(2) Proxy Layer(3) Remote Reference Layer(4) Transport LayerRMI Architecture Diagram: http://www.java2all.com
  9. 9. http://www.java2all.com
  10. 10. (1) Application Layer: It’s a responsible for the actual logic(implementation) of the client and server applications.Generally at the server side class containimplementation logic and also apply the reference tothe appropriate object as per the requirement of thelogic in application.(2) Proxy Layer: It’s also called the “Stub/Skeleton layer”. A Stub class is a client side proxy handles theremote objects which are getting from the reference.A Skeleton class is a server side proxy that set thereference to the objects which are communicates withthe Stub. http://www.java2all.com
  11. 11. (3) Remote Reference Layer (RRL): It’s a responsible for manage the referencesmade by the client to the remote object on the serverso it is available on both JVM (Client and Server).The Client side RRL receives the request for methodsfrom the Stub that is transferred into byte streamprocess called serialization (Marshaling) and thenthese data are send to the Server side RRL. The Server side RRL doing reverse process andconvert the binary data into object. This process calleddeserialization or unmarshaling and then sent to theSkeleton class. http://www.java2all.com
  12. 12. (4) Transport Layer: It’s also called the “Connection layer”.It’s a responsible for the managing the existingconnection and also setting up new connections.So it is a work like a link between the RRL on theClient side and the RRL on the Server side. http://www.java2all.com
  13. 13. RMI Components: http://www.java2all.com
  14. 14. The RMI application contains the THREE components(1) RMI Server(2) RMI Client(3) RMI Registry http://www.java2all.com
  15. 15. http://www.java2all.com
  16. 16. (1) RMI Server: RMI Server contains objects whose methods areto be called remotely. It creates remote objects andapplies the reference to these objects in the Registry,after that the Registry registers these objects who aregoing to be called by client remotely.(2) RMI Client: The RMI Client gets the reference of one ormore remote objects from Registry with the help ofobject name. http://www.java2all.com
  17. 17. Now, it can be invokes the methods on theremote object to access the services of the objects asper the requirement of logic in RMI application. Once the client gets the reference of remoteobject, the methods in the remote object are invokedjust like as the methods of a local object.(3) RMI Registry:In the Server side the reference of the object (which isinvoked remotely) is applied and after that thisreference is set in the RMI registry. http://www.java2all.com
  18. 18. When the Client call the method on this object,it’s not directly call but it call by the reference whichis already set in the Registry so first get the objectfrom this reference which is available at RMI Registrythen after calls the methods as per the requirement oflogic in RMI application. http://www.java2all.com
  19. 19. RMI Registry: http://www.java2all.com
  20. 20. The RMI Registry is a naming service.RMI server programs use this service to bind theremote java object with the names. Clients executing on local or remote machinesretrieve the remote objects by their name registeredwith the RMI registry and then execute methods onthe objects. RMI creates a remote proxy for that object andsent it to clients. An object proxy contains the reference to anobject. In order to work with the RMI registry... http://www.java2all.com
  21. 21. 1. Start registry by using following command start rmiregistry By default the port 1099 is used by RMI registryto look up the remote objects. After the RMI registrystarts objects can bind to it.2. Now in second step to bind the remote object withthe RMI registry, execute the server program.3. To use the remote object execute the clientprogram. http://www.java2all.com
  22. 22. http://www.java2all.com
  23. 23. From the figure we can see that server calls theRMI registry to map a name with a remote objectrepresented by black circle. By using the name of remote objects in theservers registry client program locate the remoteobject and then methods are called on the remoteobject by the client program. http://www.java2all.com

×