129k views
1 vote
In broker architecture, What is the responsibility of stub?

a. Mediates between the client and the broker and provides additional transparency between them.
b. All of the others
c. Hide implementation details when two brokers interoperate.
d. Provides APIs for clients to request, servers to respond

User Plot
by
7.8k points

1 Answer

2 votes

Final answer:

A stub in broker architecture mediates between the client and broker, packages requests, communicates them over the network, and hides the complexities of network communication and remote method invocation, thus providing transparency for the client.

Step-by-step explanation:

The responsibility of a stub in broker architecture is to act as an intermediary between the client and the server when a distributed system method is called. Part of the client-side proxy, the stub is responsible for accepting requests from the client, packaging them, and then communicating them over the network to the server-side broker, where the request will be unpacked by the server's skeleton and processed further.

When a client invokes a method on a distributed object, the stub functions to handle this by hiding the implementation details of the remote method invocation, thus providing a local representation for a remote object. The stub marshals the parameters, sends the invocation details through the network to the server, and also deals with unmarshalling the results of the invocation returning from the server back to the client.

Therefore, in response to the question, the answer is (a) Mediates between the client and the broker and provides additional transparency between them, as the stub's role is critical in maintaining the transparency and seamless communication in the distributed system architecture while hiding complexities of the network communication and remote invocation details.

User Vork
by
8.2k points