How Is Event-Based Architecture Best Implemented?

0
500
event based architecture
Photo by Stephen Dawson on Unsplash

Event-driven architecture (EDA) is comprised of event producers that generate a stream of events and event consumers that receive the events. Event consumers can respond immediately to events as they are delivered in near real time. Producers and consumers are decoupled, meaning producers don’t know which consumers are listening for events. Consumers are also decoupled, which means each consumer sees all events. An EDA can either follow a pub/sub model or an event stream model.

Culture, Awareness, and Intent

Implementing event based architecture is a good idea for event-driven businesses. With event-driven business processes, there’s no need for microservices to communicate with each other. Architects can choreograph applications to consume and produce specific events using a publish/subscribe event broker. There are several benefits of EDA including agility, scalability, responsiveness, and a better customer experience. It’s important to consider which use cases are ideal candidates, examine them through an event-driven lens, and choreograph the right approach to leverage the full benefits.

Real-Time Candidates

event based architecture
Photo by UX Indonesia on Unsplash

It’s important to consider which real-time candidates within an organization can benefit from this architecture pattern. Consider whether there are issues with the order management system, issues with the payment platform, whether it’s better to funnel master data to downstream applications, or if there’s room for real-time operations optimization. The smart approach to EDA is to determine which projects benefit from pain removal or will result in a medium-to-high business impact. Be sure to consider which teams will be affected by this digital transformation and who will need to help implement and carry out this architecture to see project success.

An Eventing Foundation

event based architecture
Photo by Shahadat Rahman on Unsplash

Once the right candidates are identified, it’s time to consider the architecture and tooling. An EDA depends on decomposing event flows into microservices and implementing a runtime fabric that allows these services to communicate in a publish/subscribe, one-to-many, distributed manner. Starting the design at the right time and having the right tooling to describe and catalog events and visualize relationships is key. The best architecture pattern is modular to meet all use cases and flexible to receive data from everywhere data is deployed.

Pilot Application and Event Catalog

event based architecture
Photo by Markus Winkler on Unsplash

An event flow is a business process that’s translated into a technical process. It’s how an event is generated, sent through the broker, and consumed. Start with a pilot project to ensure the event process is effective and scalable. Once the events and event flow are identified, the event catalog will automatically take shape. The initial event catalog acts as a starting point for reusable events that future applications can consume. Choose an event flow that makes the most sense for current state modernization.

Decoupling Microservices

event based architecture
Photo by Mika Baumeister on Unsplash

Once the pilot event flows are identified and there’s an initial event catalog forming, you’ll need to decompose the business flow into event-driven microservices and identify the events in the process. Decoupling services reduce the amount of effort needed to ingest event sources because each service is responsible for a specific task in the event flow. New business logic can be built with microservices, and existing applications can be event-enabled with adapters.

There are two methods of managing microservices within event flows: orchestration or choreography. Orchestration allows microservices to work in a call-and-response manner because they’re tightly coupled and dependent on each other. Event-routing choreography results in reactive microservices that are loosely coupled and can respond to events as they happen.

There are several benefits of adopting an event-driven architecture. Applications using different technology can easily communicate, decoupled services fail independently without interrupting other services, loose coupling enables faster and easier deployment, there’s more agility in development, and it’s easier to audit services and define policies.