Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broker architectural pattern in plain english

Could someone explain the Broker pattern to me in plain english? Possibly in terms of Java or a real life analogy.

like image 294
habitats Avatar asked May 23 '14 13:05

habitats


People also ask

What is broker architectural pattern?

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.

What are the patterns of architecture?

What is an Architectural Pattern? According to Wikipedia, An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design pattern but have a broader scope.

When would you use a broker in a client server architecture?

Solution: Use a Broker A broker component coordinates communication of requests from client to server and also coordinates returning the results from server to client.

What is architectural style and pattern?

An architectural style is a central, organizing concept for a system. An architectural pattern describes a coarse-grained solution at the level of subsystems or modules and their relationships. A system metaphor is more conceptual and it relates more to a real-world concept over a software engineering concept.


1 Answers

Try to imagine that 10 people have messages they need to deliver. Another 10 people are expecting messages from the previous group. In an open environment, each person in the first group would have to deliver their message to the recipient manually, so each person has to visit at least one member of the second group. This is inefficient and chaotic.

In broker, there is a control class (in this case the postman) who receives all the messages from group one. The broker then organizes the messages based off destination and does any operations needed, before visiting each recipient once to deliver all messages for them. This is far more efficient.

In software design, this lets remote and heterogeneous classes communicate with each other easily. The control class has an interface which all incoming messages can interact with so a sorts of messages can be sent and interpreted correctly. Keep in mind this is not very scalable, so it loses effectiveness for larger systems.

Hope this helped!

like image 88
Adam Yost Avatar answered Sep 28 '22 23:09

Adam Yost