Skip to content
Web Design & Development

Event-Driven Application Design, Done Properly

Structuring applications so actions publish events that other parts of the system react to.

MediaScaleUp Editorial Team 2 min read 10 views
Event-Driven Application Design, Done Properly

What is at stake

Events decouple features, but they also make execution order and failures harder to follow.

The playbook

  1. Use events for genuine side effects
  2. Queue slow listeners
  3. Log event handling for traceability
  4. Keep listeners idempotent
  5. Document which listeners react to each event

Where it goes wrong

Avoid:

  • Events for simple direct calls
  • Listeners with hidden dependencies on each other
  • Unlogged event chains
  • Critical paths that depend on event ordering
What to do and what to avoid with event-driven application design, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Event-Driven Application Design
MeasureFigure
Events and listenerspublishers do not know who reacts
Queued listenersmove work out of the request cycle
Orderingevent handling order is not always guaranteed
Debuggingdistributed side effects are harder to trace

Getting outside help

When to hand it over: Bring in help when side effects become hard to trace.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Web Design & Development