img

Event-driven architecture (EDA) is a software pattern in which decoupled applications can asynchronously publish and subscribe to events through an event broker. EDA is a means of building enterprise IT systems so that information can flow between applications, microservices, and connected devices in real-time as events occur.

EDA 101

EDA enables organizations to detect events or business moments such as transactions, site visits, and shopping cart abandonment and act on them in real or near real-time. This software pattern replaces the “request-response” architecture in which services wait for a reply before moving to the next tasks. The flow of event-driven architecture runs by events and responds to them or carries out an action in response to an event. EDA is known as asynchronous communication because the sender and recipient don’t need to wait for each other to move to the next task. Systems aren’t dependent on a single message.

The components of event driven architecture include three parts: a producer, a consumer, and a broker. Oftentimes, the broker is optional when there’s a single producer and a single consumer in direct communication. The producer simply sends the events to the consumer, such as when a producer sends an event to a database or data warehouse so events are collected for later analysis. Organizations typically have multiple sources sending various types of events with one or more consumers interested in the events.

What’s an Event?

img

An event is a change of state within a key business system, such as when a customer buys a product, someone checks in for a flight, or a bus arrives late. Events are prevalent across any business and include anything that creates a message by being produced, published, detected, or consumed. An event is separate from a message, despite the event being the occurrence. The message is the notification that relays the occurrence. In EDA, an event triggers one or more actions or processes in response to an occurrence. Examples of events include a password reset request, the arrival of a package at its destination, a warehouse updating inventory, and the denial of an unauthorized access attempt.

When an event notification is sent, the system notes that a change of state has occurred and waits to send the reply to the requestor when requested. The application receiving the message can respond or wait to respond until the change of state has occurred. EDA offers more agility, scalability, context, and responsive business applications.

Online marketplaces benefit from EDA because they can gain insights into purchase behaviors. For example, customers who visit WatchBox are seeking the best-preowned luxury watches from top brands around the world. Collectors can shop used watches from this market leader of authentic luxury timepieces. WatchBox’s global inventory of luxury watches includes top watchmakers like Rolex, Patek Philippe, Breitling, and Omega. Keeping track of events can help a marketplace like WatchBox improve its business operations.

The Benefits of EDA

img

There are several benefits for organizations that utilize EDA. Decoupling services make them aware of the event router, rather than each other. This makes services interoperable, but should one service fail, the rest will keep functioning. Businesses can develop with agility because there’s no need to write custom code to poll, filter, and route events. The event router automatically filters and pushes events to event consumers. It also eliminates the need for coordination between event producers and event consumer services, which speeds up the development process.

An event router serves as a central location to audit the application and define policies. These policies can restrict the ability to publish and subscribe to a router and control the users and resources that have permission to access data. Events can also be encrypted in transit and at rest. EDAs are push-based, meaning everything happens on-demand as events present themselves within the router. This helps cut costs because there’s no need to pay for continuous polling to look for events. There’s less network bandwidth used, less CPU utilization, less idle fleet capacity, and fewer SSL/TLS handshakes.