Events bring Simplicity to a System's Architecture
Using events for interactions between small business components can bring simplicity to a system's architecture, Russ Miles explained last week when talking about Architectural Simplicity through Events.
Simplicity really matters, Barbara Liskov said in a keynote at QCon London 2013, and Russ Miles, a Principal Consultant, strongly agrees. His experience is that teams often are slowed down by the increasing size and complexity of the code they write, and he believes that architecturally led simplicity is the best way to help teams keep their momentum and speed up.
For Russ, component structure is important in bringing simplicity to architecture. Placing components in a traditional layered model often creates a mess and he has therefore created a Life-Preserver model, (formed as a ring), with all infrastructure software, dealing with integration, on the ring, and core business components which adds business value, inside the ring.
He notes that this pattern is very similar to the Hexagonal architecture style created by Alistair Cockburn.
Next step is defining how components collaborate with each other. Since we may not know all interactions from start, flexibility can be maintained by sending events. The only contract for a component is then the events it receives and the events it broadcasts which gives us a standard event-driven architecture but at the component level.
Pipes and Filters
In one further step Russ reduces his components to almost functions, and moves from strongly typed events to just simple data, e.g. in the form of documents or XML, making the core communicate the same way as the integration components communicate with the outside world. This final step makes the architecture all about sharing immutable data between tiny components doing one thing with data and returning data, which is the pipes and filters pattern, but inside a system's architecture.
Ben Melbourne Jul 04, 2015