remote method invocation (rmi)
TRANSCRIPT
![Page 1: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/1.jpg)
AbdolNaser Dorgalaleh
RMIRemote method Invocation
![Page 2: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/2.jpg)
How is Java RMI :
![Page 3: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/3.jpg)
• I have an object residing in one machine that want to access to an object that residing on another machine to invoke the methods
![Page 4: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/4.jpg)
Explain :
• Client : invoke methods across the network residing on the Server
•Rmiregistry : at first we most start rmiregistry
the rmiregistry is the element that helps the
server to advertise there availability and clients
use rmiregistry to find refrences to remote
object that they want to invoke.
![Page 5: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/5.jpg)
Implementation:
• Define the interfaces
• Implement the server
• Implement the client
![Page 6: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/6.jpg)
Running:
• Run rmiregistry
• Run the server
• Run the client.Clients will connect to rmiregistry to invoke remote method.
![Page 7: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/7.jpg)
The Archotecture
![Page 8: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/8.jpg)
Stub : Proxy for the remote object as we said the object is residing on a remote machineAfter making call the call come from the client to the stub and the stub passes the request to the RRL(Remote Refrence layer) and rrl identify the type of the server that is unicast or multicast Rmi supports unicast Server.Unicast: you can not replicate the object
![Page 9: Remote method invocation (RMI)](https://reader034.vdocument.in/reader034/viewer/2022042815/5586051fd8b42a3d6b8b476e/html5/thumbnails/9.jpg)