Units 7 & 8 Flashcards
Remote Method Invocation (RMI)
object-orientated counterpart of RPC
raised the naming, locating + binding problems of distributed systems
a technology that can be used by itself
Registry
a naming service that associates objects to unique names
Layered architecture of remote method calls
- server application binds the server object to a symbolic name in the registry
- client object looks up the symbolic name in the registry + obtains a reference to the server object
- client object uses the reference to make a remote method call
Remote method
a method that can be called from outside the JVM where is is executing
(local in same JVM)
Remote object
an object with at least one remote method
Remote interface
specifies methods available to client objects
objects of classes implementing this interface will be accessed remotely
Remote Method Invocation (RMI) proxy later
aka stub/skeleton layer
stub - client-side proxy object
skeleton - server-side proxy object
Location transparency (RMI)
the actual location of the stub object is unknown to the client
Enterprise JavaBeans (EJB)
a component model defined by JavaEE for building enterprise applications
What is a bean?
a component written in Java
types - session beans (business logic) + entity classes (business data)
Primary key
uniquely identify a record
Foreign key
uniquely identifies a record in another table
How can a remote object, remote interface + a remote method be detected in the server-side code?
a remote interface extends Remote
a remote method throws a RemoteException
a remote object’s class usually extends UnicastRemoteObject
How must the registry be set up?
a registry service is started on a port known to the client + server applications
how does the server make the remote object available to clients
server application creates a remote object + exports it so that it is ready to receive incoming calls
server application then asks the registry to bind a name to a remote reference - this name is made known to clients