Designing pub-sub
Dive into designing a pub-sub system and its components.
We have identified the requirements for our system. Let’s dive into designing the system.
Designing a pub-sub system
At a high level, the components involved in the design of the pub-sub system are:
-
Broker: It is responsible for taking the message from the client and sending them to the receivers.
-
Writer: It writes the message of the client.
-
Reader: It reads the message for the client.
So the writer will push the messages to the broker. The broker will take those messages and push them to the readers.
Categorizing messages
All readers do not need all the messages sent to the broker. So we need to categorize the data into various topics. For example, for an e-commerce site, we have a service for validation and another service for managing carts. We can add two topics; validate ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy