An event-driven architecture supports the analysis of event notifications to make decisions based on situational awareness.
Many business processes could benefit from situational awareness. Rather than using historical data and descriptive analytics, decisions based on real-time data and artificial intelligence (AI) and machine learning (ML) models would be much better in many scenarios. What’s needed to derive such decisions is an event-driven architecture.
An event-driven architecture is useful when a business requires real-time processing with a minimum time lag. That includes any situation that requires a decision in milliseconds to minutes. An example is determining whether a financial transaction is legit or fraudulent as the transaction is being made. Other reasons why an event-driven architecture might be selected include when there is a need for complex event processing, such as pattern matching, or there is a high volume and high velocity of data, such as data coming from IoT devices.
See also: The Case for Continuous Intelligence
The modern digital business works in real-time. It informs interested parties of things of interest when they happen, and it makes sense of and derives insight from an ever-growing number of sources. It learns, predicts, and is intelligent.
An event-driven architecture promotes the production, detection, consumption of, and reaction to events. This architectural pattern can be applied to the systems that transmit events among loosely coupled software components and services.
At the heart of the issue is the events themselves. Events are notifications of a change of state. Some fundamental characteristics of events include:
- Events represent the change of state of something of interest to the business
- Events are records of something that has happened
- Events can’t be changed, that is, they are immutable.
Value comes from analyzing events in real-time, considering the current state of affairs. Analyzing event data on the fly provides situational awareness upon which fast decisions can be made.
Basing a decision on the most current state requires analyzing the event data continuously as it streams in. When developing event-driven solutions, there are typically two types of event streams:
- Event streams whose events are defined and published into a stream as part of a solution.
- Event streams that connect to a real-time event stream, for example, from an IoT device, a voice stream from a telephone system, a video stream, or vehicle location from global positioning systems.
Several factors differentiate an event-driven architecture from an architecture designed for Big Data analytics or even real-time analytics.
One difference is the data. An event-driven architecture consists of event producers that generate a stream of events, and event consumers that listen for the events. Common event sources include:
- IoT devices or sensors showing device status changes
- Clickstream data from web or mobile applications
- Mobile applications
- Geospatial data
- Social media feeds
- Real-time voice feeds
- Other messaging backbones
- Data change event streams from databases (change data capture)
A Fundamental Shift
Events occur in a continuous stream as things happen in the real and digital worlds. By taking advantage of this continuous stream, applications can not only react in real-time but also reason about the future based upon what has happened in the past.
Embracing event-driven development is foundational to the next generation of digital business applications. Businesses will need to be able to design, develop, deploy, and operate event-driven solutions in cloud-native styles to have the required agility and speed to innovation required to stay competitive today.
While event-driven architectures and reactive programming models have been employed in the past, the move to cloud-native architectures with microservices, container-based workloads, and serverless computing is making them more practical and provides many benefits. For example, cloud-native solutions are known to reactive and responsive. An event-driven architecture leverages these traits and enhances them offering resiliency, agility, and scalability. For this to occur, two aspects of a cloud-native architecture are essential to developing an event-driven architecture:
- Microservices: These provide the loosely coupled application architecture, which enables deployment in highly distributed patterns.
- Cloud-native platforms with containers and serverless deployments: These provide the application platform and tools to deliver the promise of the microservices architectures.
Processing Continuous Streaming Events
One of the essential elements of modern event-driven solutions is the ability to process continuous event streams to derive real-time insights and intelligence.
What’s needed is streaming analytics. Streaming analytics provides the capabilities to investigate and understand the events flowing through unbounded real-time event streams. Streaming applications process the event flow and allow data and analytical functions to be applied to information in the stream. Streaming applications are written as multistep flows across the following capabilities:
- Ingest many sources of events.
- Prepare data by transforming, filtering, correlating, aggregating on some metrics, and leveraging other data sources for data enrichment.
- Detect and predict event patterns using scoring and classification.
- Decide by applying business rules and business logic.
- Act by directly executing an action, or in event-driven systems publishing an event notification or command.
An event-driven architecture focuses on the generation and handling of event notifications. An event-driven architecture is much faster, adapting to changes. This paradigm makes it possible to create real-time responsive architectures needed in business today.