Related differences

Ques 26. Explain the role of stub in RMI.

The role of the stubs is to marshal and unmarshal the messages that are sent and received on the client or the server side.

Is it helpful? Add Comment View Comments
 

Ques 27. What are the layers on which RMI implementation is built? Explain them.

The Stub/Skeleton Layer:

The stub/skeleton layer sits in between application layer and the rest of the RMI system and acts as an interface. This layer transmits the information to remote layer. This transmission is done through the marshalling of streams. These streams performs the object serialization.

A stub is a remote object at the client-side. This stub implements all the interfaces which remote object implementation supports.

A skeleton is a remote object at the server-side. This stub consists of methods that invokes dispatch calls to the remote implementation of objects.

The Remote Reference Layer:

The lower level transport interfaces is dealt by this layer. This layer carries a specific remote reference protocol independent of stub and skeletons.

Every remote object is implemented by choosing their individual remote reference subclasses.

The Transport Layer:

The transport layer sets up the connections to remote address spaces, manages them, monitors the connection liveliness, and listens the incoming calls.

The transport layer maintains the remote object’s table available in the address space, in a table. For incoming calls, the transport layer establishes a connection. It locates the target dispatcher of the remote calls and passes the connection to the dispatcher.

Is it helpful? Add Comment View Comments
 

Ques 28. Explain how RMI clients contact remote RMI servers.

* The client procedure calls the client stub in the normal way.
* The client stub builds a message and traps to the kernel.
* The kernel sends the message to the remote kernel.
* The remote kernel gives the message to the server stub
* The server stub unpacks the parameters and calls the server.
* The server does the work and returns the result to the stub.
* The server stub packs it in a message and traps to the kernel.
* The remote kernel sends the message to the clients kernel.
* The clients kernel gives the message to the client stub.
* The stub unpacks the result and returns to the client.

Is it helpful? Add Comment View Comments
 

Ques 29. What are the basic steps to write client-service application using RMI?

* Assigning the security manager and then obtaining the reference to the service
* Contacting the RMI registry to obtain the remote object’s reference and invoking its methods
* Requesting the name for the service
* Invoke the remote method.

Is it helpful? Add Comment View Comments
 

Ques 30. What is Unicast and Multicast object?

The difference between unicast and multicast is that in unicast approach the sender sends the data stream to a single receiver at a time. Thus there is one to one communication.

In a multicast the sender and the interested receivers communicate. This is one to many communication. This communication can take place between data terminals spread across various LANs too.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: