Your SlideShare is downloading. ×
0
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Rmi
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Rmi

403

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
403
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
28
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. JAVA RMI Ancy Emmanuel pr12cs1003
  • 2. INTRODUCTION• Remote Method Invocation : is the action ofinvoking a method of a remote interface on a remoteobject• The Java RMI allows an object running in one JavaVirtual Machine to invoke methods in an objectrunning in another Java VM• Provides for remote communication betweenprograms written in the Java programming language
  • 3. OVERVIEW OF RMI• RMI is an object-oriented implementation of theRemote Procedure Call• it is an API for Java programs only UsingRMI, an object server exports a remote object andregisters it with a directory service.• The object provides remote methods, which canbe invoked in client programs.
  • 4. OVERVIEW OF RMI• A remote object is declared with a remoteinterface The remote interface is implemented bythe remote object.• An object client accesses the object by invokingthe remote methods associated with the objects.• provides support for distributed objects in Java
  • 5. INTERFACES
  • 6. RMI ARCHITECTURE LAYERS
  • 7. RMI ARCHITECTURE LAYERS The RMI is built from three abstraction layers.1. The stub/skeleton layer client-side stubs and server-side skeletons2. The remote reference layer remote reference behavior3. The transport layer set up a connection, management, andremote object tracking
  • 8. STUB/SKELETON LAYER• intercept method calls made by the client to theinterface reference variable and to redirect these callsto a remote RMI service.• A stub is the clients local representative of a remoteobject.• Stub hides all the network-level communication andserialization of parameters in order to present asimple invocation mechanism to the caller.
  • 9. •When the caller invokes a method on the localstub, this stub is responsible for carrying out themethod call on the remote object.•The stub implements the same set of remoteinterfaces a remote object implements.
  • 10. •Skeleton works on the server side.•This skeleton is responsible for directing the call tothe actual implementation object.•Stubs and skeletons are generated by the rmiccompiler.• Initiate a call to the remote object Marshalarguments to a marshal stream.• Inform the remote reference layer that the callshould be invoked.• Unmarshal the return value or exception from amarshal stream Inform the remote reference layerthat the call is Complete.
  • 11. INTERACTION BETWEEN STUB & SKELETON
  • 12. REMOTE REFERENCE LAYER• This layer is the middleware between the stub &skeleton layer and the underlying transport layer.• This layer handles the creation and management ofremote object references.• It also connects clients to exported objects that arerunning on the server via Remote Object Activation.• Responsible for carrying out specific remotereference protocol independent of stubs and skeletons
  • 13. TRANSPORT LAYER• The transport layer is based on TCP/IP connections.•The transport layer responsibilities:1.Setting up connections to remote address spaces&Managing connections3. Monitoring connection liveness4. Listening for incoming calls5. Maintaing a table of remote objects that reside inthe address space6.Setting up a connection for an incoming call7.Locate the dispatcher for the target of the remotecall and pass the connection to the dispatcher
  • 14. TRANSPORT LAYER ABSTRACTIONS1.Endpoint: Endpoint is the abstraction used to denote anaddress space or a JVM2.Channel: It is responsible for managing connectionsbetween the local address space and the remote addressspace for which it is a channel3.Connection: It is an abstraction for transferring data
  • 15. 4.Transport:•This abstraction manages channels.• The transport abstraction is responsible for acceptingcalls on incoming connections to the addressspace, setting up a connection object for the call, anddispatching to higher layers in the stream
  • 16. Advantages1.simple and easy to use2. Seamless Remote Invocation on objects in different virtual machines.3. Very reliable distributed applications.4. Preserves the safety and security provided by the Java runtime.5. Callbacks from servers to applets
  • 17. THANK YOU

×