Dwarves
Memo
Type ESC to close search bar

Overview On Broker Pattern In Distributed System

Definition

The broker pattern is an architectural pattern that can be used to structure distributed software systems with decoupled components that interact by remote procedure calls. A broker component is responsible for coordinating communication, such as forwarding requests, as well as for transmitting results and exceptions.

Component

  1. Clients: implements user functionality, send requests to server through a client-side proxy
  2. Server: Implements services, registers itself with the local broker, send responses and exceptions back the client through a server-side proxy
  3. Broker(a messenger that is responsible for the transmission of requests from clients to servers): registers server, offers interface(APIs, …), transfer messages, error recovery, interoperates with other brokers through bridges, locates servers
  4. Client-side proxy(a layer between clients and the broker): encapsulates system-specific functionality, mediates between the client and the broker
  5. Server-side proxy: calls services within the server, encapsulates system-specific functionality, mediates between server and the broker
  6. Bridge( responsible for communication among brokers): encapsulates network-specific functionality, mediates between the local broker and the bridge of a remote broker

The role of Broker Patter

The ability of Broker Pattern

In the decoupled behavior, Broker acts like an interface, when a new server was adding on the system, it just like add a new object, and the only thing we need to do is to register the new server with Broker.

Based on the idea of the independent agent(server, client), Broker pattern give us free control to individual agents(it doesn’t care about what we do with agents). Thus, the agent freely from scaling itself has its functionality