Chapter 6. The event processing network
Event processing networks are presented as the central modeling concept for describing how an event-driven application works. The chapter explains that an EPN connects event producers and consumers through intermediary processing elements, and that its notation uses nodes, terminals, and links to show how event instances move through the system. It also highlights that networks can include feedback, nesting, and explicit channels, making the model both expressive and reusable while still remaining an abstraction of the actual runtime implementation.
The discussion then turns to the main processing component, the event processing agent. EPAs are described in terms of three logical functions: filtering, matching, and derivation, and several common EPA types are introduced, including Filter, Transformation, Translate, Enrich, Project, Aggregate, Split, Compose, and Pattern detect. These agent types are explained as different ways of selecting events, combining them, transforming them, or deriving new events, with examples showing how they can be chained together to build more complex behavior in a modular way.
The chapter also explains event channels and global state elements as essential parts of the network. Channels route events between processing elements using schemes such as fixed, type-based, and content-based routing, while global state provides shared reference data, historical data, or application state that EPAs can read or update. A worked example based on the Fast Flower Delivery application ties these ideas together by showing how multiple systems use EPAs, channels, and shared state to handle requests, assignments, alerts, rankings, and reports, and the chapter closes by emphasizing the practical value of explicit EPN models for understanding, validating, and optimizing event processing systems.
An example event processing network, showing the graphical notation we are using, and illustrating some of the features of an EPN
An example of feedback in an event processing network. Some of the events emitted by agent 2 are fed back into agent 1.
An example showing nested event processing networks. The upper part of the figure shows an EPN with four nodes. Two of these (A2 and A3) are agents that contain nested EPNs. The lower half of the figure shows the full network with these nodes expanded to reveal the agents inside them.
How an event processing network model (shown at top left) can be mapped to the runtime artifacts that implement it in an event processing platform
An example showing the internals of an event processing agent that contains all three logical functions
Event processing agent types. This diagram shows an inheritance hierarchy, for example, Enrich and Project are special cases of Translate, which in turn is a special case of Transformation.
The Filter EPA showing the Input terminal and three output terminals
The Transformation EPA
Six subtypes of the Transformation EPAs, showing the inputs, outputs, and transformation type
Generic event processing agent definition element
The bid request system, showing its two Enrich event processing agents
Location service event processing agent
Event processing agents that make up the assignment system
The event processing agents that make up the control system
The event processing agents in the ranking and reporting system
The definition element describing an event channel
The definition element describing a global state element
An example of using a graphical user interface to define an event processing network. This example uses StreamBase StreamSQL Event Flow.
An explicit event processing network representation from Event Zero. Note that the EPN semantics in this illustration differ slightly from those we use in this book, but the principle is similar.
Event Processing in Action ebook for free