EDA: are you polling for states or are you interrupted by events?
At NS, we are preparing our organization for Event Driven Architecture, or EDA. There’s a growing interest for this subject in the literature, but there still are some remaining discussions. One of them is about what it is that we should be interested in, having adopted EDA as a main approach to our design of and thinking about information processes and the automated systems meant to support them.
EDA: are you polling for states or are you interrupted by events?
There seems to exist an obscurity in the realm of Event Driven Architecture, or EDA. What are the building blocks of EDA? What should we be interested in, if we enter this event driven world? Are they states in our environment or are they things called ‘events’? Or are these two terms referring to the same thing?
It has been common practice for a long time to let states be the things that drive systems to act or react. People and other systems are oftentimes perceived to be reacting to states in their environment, once noticed, of course. If the traffic light is green (which is a state), you drive, right? And if you notice that a customer has ordered something (yet another state), you deliver. States inform you about appropriate actions to perform.
But there’s a drawback to the use of these states. Though states can tell you what to do, they don’t tell you when to react. Are other drivers blowing their horns because the traffic light has been green for a while before you accelerate? Did your customer turn to your competitor because you didn’t react quickly enough to her order?
If interpreted appropriately, events imply conditions in the environment as well as these states do. But events offer a bit more than just states. They include information about timeliness as well. It shouldn’t be your perception of a state in your environment that you react to or act upon. You should be reacting to perceived events. That’s what EDA is about, IMHO. You needn’t be polling your environment for states of interest to you. Instead, you should let yourself be interrupted by events in your environment.
This story implies, however, that, in order to fully leverage the events you perceive, you need not only understand what these events themselves are about. You also need to understand events in their context, in terms of their implications. You must be able to infer the conditions they create. You must form an idea about what these events mean to you. This way, events inform you about what happened, when it happened, and what state resulted, thereby enabling you to select the appropriate reactions AND the timeliness needed to be agile, in other words: they give the what and the when.
So if you ask me, I would be much more interested in events than in states, because events are more informative, providing you with the triggering logic you need to be agile.
This view comes with a consistent naming convention for events. I hope to present you with an insight into this naming convention soon.
1 Comments:
Hi Maarten,
I just read your ideas about states and events. I agree that it is not the state that you react upon, but it is the state coming true you want to react upon.
What you call an event is in my opinion a notification. The event is the state coming true. That is a difference.
The difference between polling for states (or better: changes of state, events) and interupts is a matter of implementation; semantically I am not interested in the way I am notified of the change of state (the event). However I am interested in WHEN I am notified; the time between the event occurred and the notification is reaching me. Sometimes it may last for a couple of days, or weeks or months. When my PC breaks down (event, state coming true), it is financially no problem the notify the suplier at the last day of the warranty period, which may be after 2 years. But when my heart stops beating (event, state coming true), I want my pacemaker to be notified "at once". Whether it is polling or interupted, what the heck, I don't care!
Post a Comment
<< Home