Broker Pattern

Learn about the broker architectural pattern.

Introduction

In daily life, we encounter many situations where we want a broker to do the job for us. Let’s say we want to buy a house. We don’t want to search for and tour every house by ourselves. Instead, we’d rather tell a broker what our requirements are and let them do the job for us. We use the same idea in the broker architectural pattern.

Definition

The broker pattern is a distributed, possibly heterogeneous system with components that work independently with one another through remote procedure calls.

Explanation

Fundamentally, there are three main components in the broker architectural pattern. They are the following:

  • Client: The client will request a service from the broker.
  • Broker: The broker will accept the request from the client and will forward it to the appropriate server. It will also get the result from the server and give it back to the client.
  • Server: The server will take the request from the broker and will give back the result to the broker.

Get hands-on with 1200+ tech skills courses.