RMI Flashcards
What does RMI do?
Allows an object in one VM to invoke methods on another object in another VM (potentially on another physical machine on the network).
What are the 3 things you must consider when aming Distributed Object applications?
Remote Object Location
Remote Object Communication
Accessing Class Definitions
What is Remote Object Location?
Server application registers the remote objects with the RMI registry
or
pass remote object references via invocations of methods on other objects.
What is RMI registry?
Relates remote objects with names
What is RMI server?
Calls the registry to associate a name with a remote object bind() and rebind() - Naming class and registry interface.
What is RMI client?
Looks up a remote object by its name in the servers registry and then invokes a method on it.
How can an object act as remote?
The object must implement an interface which extends the java.rmi.Remote interface.
Each method in the interface must declare that it throws java.rmi.RemoteException.
What are the 3 class loaders used by a JVM
Bootstrap class loader- loads core java libraries, part of the JVM itself The extensions class loader- loads from system-wide, platform specific extension directory. The system class loader, loads from the current directory and any specified in the CLASSPATH environment variable of a system.
4 layer RMI architecture
Application layer- the client and server program
Stub and Skeleton layer- intercepts method calls made by the client/redirects them to a remote RMI service
Remote reference layer- understand how to interpret and manage references made from clients to remote service objects
Transport layer- based on TCP/IP connections between machines