Bidirectional patterns in event-driven architectures By David Boyne
Bidirectional patterns in event-driven architectures By David Boyne
Many folks building event-driven architectures use events to communicate between internal services. It’s a great way to create decoupled and resilient architectures, but events don’t stop there.
Companies are starting to consume events/streams from external companies, and also exposing events to front-end clients creating seamless integrations in real-time between various areas of their architecture.
Event-driven architectures are becoming more accessible to us, and innovation is happening around us to make integration with events/streams easier.
If we look at ways people are connecting and consuming streams/events we can see an increase in innovation and use cases emerging:
Events within services/boundaries
-
The most popular way to integrate with events is between your services.
-
Many folks building event-driven architectures are leaning into domain driven design to help identify boundaries and use events to communicate across these boundaries.
-
Using events to communicate cross boundaries allows you to keep decoupled and adds a level of resiliency to your architecture.
-
Identifying events can be hard, many people are leaning to EventStorming or Event Modeling here to help.
Events between organizations
-
Many businesses have value within their domain they can expose for their customers. These businesses are looking into ways customers can connect to these events and consume them.
-
You often see this pattern when you integrate with web hooks that companies provide.
-
There may be a rise of integrations between organizations, and standards emerging over the next few years, as James Urquhart visions in the book Flow Architectures.
-
Companies realise that there is huge value in data, especially real-time data and this value loses value over time. Companies are looking for ways to easily integrate and consume events in real-time.
-
Lowering the cost of integrations increases innovation. Companies are becoming aware of this.
Events between backend and frontend
-
It’s nothing that new, we have been using web sockets to connect between backend and frontend for a while now, but this space keeps innovating.
-
With the increase usage of Server-send events, MQTT or web sockets, people are exposing events to clients for real-time updates.
-
I personally consider the frontend as another consumer within its own boundary and rules. They will be interested in your domain events, just as much as your backend (in some cases), so exposing this technology is powerful.
Extra Resources
-
Flow Architectures - Great book by James Urquhart about how events can and will be used to communicate between organisations.
-
Bidirectional events example - Connecting organizations and events, here is an example of how Amazon EventBridge explore bidirectional events with Salesforce. Some interesting patterns here.
-
Dive more into domain-driven design with EDA - Event-driven architectures, team topologies, domains? What does it all mean? Here is a visual to help you.
-
Journey to event-driven architecture (video) - A talk I gave at re:Invent 2023. I talk about the journey of building event-driven architectures and common pitfalls people may have and how to avoid them.
-
Event-driven architecture with domain driven design - I visual I created to help you understand why EDA and DDD work so well together. When designing events it’s important to consider your domains!
-
What is Event Storming? - Another visual to help you understand Event Storming with extra resources. A great tool to help you identify events within your systems.
-
Internal vs External events - Visual here to help you understand internal and external events.
Explore other visuals
Want to work together?
If you're interested in collaborating, I offer consulting, training, and workshops. I can support you throughout your event-driven architecture journey, from design to implementation. Feel free to reach out to discuss how we can work together, or explore my services on EventCatalog.
Download EDA Visuals
Join over 10,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.