You just want the job to be done. You dont care who performs it, but you may have some demands. Tell your broker. He will take care of it.

You go to a broker to buy a house. You dont want to need to know all about the housing business, costs, quality, suppliers. You just tell the broker your maximum price and some other requirements, and he starts looking.

If the relation client-server is not fixed because there are many suitable servers or the availability of the servers changes over time.The choice of server depends on some criterion that is complex enough to be delegated to a separate component.If you want to be independent of the physical location of the server (location transparacy).

At all times servers can register and deregister themselves with the broker. If a server fails, it will be automatically (after a timeout) unregistered by the broker.

The client requests a specific service. It formats its request in a specific format and sends it to its broker. The broker then selects the most suitable server to process the request. When the link between the client and the server is set up, they may start communicating directly, freeing the broker.

There may also be multiple brokers in an architecture. These will then need their own communication protocols.

Once you set up the broker, it is easy to program the service calls. Take care to handle transactions and exceptions well, though.