Sunday, June 4, 2017

Martin Fowler Breaks Down Event Driven Architecture

A few weeks ago, I wrote an article on this year's GOTO Conference videos. I recommended checking out a few presentations. Following my own advice, I ran across this gem from Martin Fowler.  If you're new to design patterns, or interested in event-driven architecture, take a look. He does a great job of breaking down a pretty broad concept.

It's like "service-oriented architecture."  This concept gets thrown-around a lot, but what does it really mean?  Microservices is technically service-oriented, but it's very different from building a monolithic, single-server API.  The concept of event-driven architecture suffers from the same ambiguity.  So is my app "event-driven" because I rely heavily on DOM events, or is it a problem that I sometimes call an object's method directly, rather than triggering an event?

Fowler doesn't attempt to answer these questions directly, or create a concrete definition.  Instead, he distills the concept down to four main paradigms: event notification, event-carried state transfer, event sourcing, and CQRS (Command Query Responsibility Segregation).  For the details, you can check out the video; he does a much better job explaining than I ever could.  It's a 50-minute presentation, so he only touches the surface, but it's sufficient.

I walked away with the ability to communicate my architecture choices more clearly.  When using Backbone, for example, I'm creating an event-driven app, but only in the sense that it's dependent on event notification.  I'm not using event sourcing for state management, or CQRS for IO.  This means better documentation, less confusion with other developers, and better questions.

No comments:

Post a Comment