An Overview of the Publisher Subscriber Model
Published on 11/2/2017
Alexander Evenhuis
Founder and Chief Software Engineer, Huis Digital (HD)
Below I share an overview of an important and underused concept in the programming world - the Publisher Subscriber model. The Publisher Subscriber model is a must have in the repertoire of any application developer.
From a high-level what the Publisher Subscriber model provides is a way of coordinating messages between various entities. The entities come in 3 parts: publisher, subscriber, and hub.
The hub is a key piece of this equation because the hub is that which:
  1. Accepts requests from entities to subscribe to certain events
  2. Accepts requests from entities to push data as an event
  3. Manages the association of events to publishers
  4. Manages the association of events to subscribers
The hub is the middle man between publishers and subscribers.
The publisher is any entity that is looking to push data to a certain set of entities, known as subscribers.
A subscriber is any entity that has communicated to a hub that it should receive updates when a publisher pushes data regarding an event. Which event will be subscribed to will be sent along with the subscribers request to subscribe.
Control flow is an important concept in software engineering. The Publisher Subscriber model provides a way of building highly scalable, asynchronous, and highly decoupled systems. Traditional programming models are limited when it comes to have a flexible control flow. Proper implementation of the Publisher Subscriber model allows the programmer to add flexibility to their application's control flow.
Thanks for the read! Have any questions? Feel free to shoot me a message below, or use the chat bubble on your bottom right to open a live chat session.
Alexander Evenhuis
Founder and Chief Software Engineer, Huis Digital (HD)
GET IN TOUCH

+1 646 992 1449

alexander.evenhuis@hotmail.com

New York, NY 10280, US

Have a question? Fill out the form below to instantly, directly notify me of your interest.