liveBook · Manning

Loose coupling

As explained in Event Processing in Action

Decoupling is the independence of event-producing and event-consuming applications, which need not know of one another.

Decoupling lets event producers and consumers operate independently: the event itself carries meaning that does not depend on who produced it or who consumes it. A producer need not depend on a consumer’s actions, and a consumer need depend on the producer only to produce the event. section 2.1.2

Request-response interactions provide only partial independence: a service provider can serve requestors without regard to their purpose, but a requestor still depends on the provider. Event-based interactions can decouple both sides. section 2.1.2

Decoupled event applications can be arranged in different ways:

  • One event can be consumed by multiple applications, whose actions may differ or change over time. section 2.1.2
  • An application can consume events from multiple producers, and producers and consumers need not know one another. section 1.2.1

A sensor and monitoring application

A temperature sensor can emit an event when its state changes, allowing a monitoring application to be notified without repeatedly polling the sensor. section 2.1.2

How Event Processing in Action covers it

How deep it goes
Defines mutual producer-consumer independence and contrasts it with request-response, without detailing implementation mechanics.
Examples
Uses a temperature sensor and monitoring application to illustrate event notification without polling.
What you can do after
Understand how producers and consumers can remain independent while events connect them.
How it connects
Connects event producers and consumers with event processing, event-based programming, and request-response interactions.

Also explained in

Compare how 5 books explain loose coupling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Event Processing in Action. The section links point to the parts of the book it draws on.