liveBook · Manning

Decoupling

As explained in Learn Docker in a Month of Lunches, Second Edition

Decoupling is a design technique that separates communicating components so they do not depend directly on one another.

Decoupling lets components communicate through a message queue instead of depending on direct communication with one another. A publisher can send messages before a subscriber starts, and a subscriber can keep listening when no publisher is active. Each component works with the queue without knowing about the others, supporting performance and scalability. section 21.1

Figure 21.1 Message queues decouple components so that they don’t communicate with each other directly.
figure

The diagram shows how a message queue separates components that would otherwise communicate directly. section 21.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Demonstrates asynchronous publishing and subscription through Redis containers, including messages sent before a subscriber listens.
Examples
Uses a Redis publisher and subscriber on channel21 to demonstrate messages passing through a queue.
What you can do after
Apply decoupling by publishing and subscribing through a Redis message queue so components can operate independently.
How it connects
Connects asynchronous communication with message queues, publishers, and subscribers.

Also explained in

Compare how 4 books explain decoupling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.