Chapter 2. Principles of event processing
The chapter introduces the core ideas of event processing by contrasting traditional request-response interactions with event-based programming. In request-response systems, a client sends a request, waits synchronously, and depends on a specific provider to return a result. In event-based systems, by contrast, an event represents something that has already happened, and that shift in meaning enables looser coupling between the parts of a system.
That decoupling is the central principle of the chapter: event producers do not rely on specific actions from event consumers, and consumers do not depend on producers beyond receiving the event itself. Because events can be distributed one-way, asynchronously, and to multiple consumers, the same event may be handled in different ways by different parts of the application. The chapter also distinguishes events from messages, explains push and pull distribution styles, and shows how channels, brokers, and publish/subscribe mechanisms can be used to move events through a system.
The second half of the chapter broadens from communication patterns to the structure of event processing systems. It defines the main architectural roles—producers, consumers, processing agents, channels, raw events, derived events, streams, and stateful or stateless processing—and explains how these pieces form event processing networks. The chapter closes by presenting a model-driven notation built from reusable building blocks, which lets designers describe event types, agents, channels, contexts, and global state in an implementation-independent way before mapping them to concrete runtime systems.
Request-response on the World Wide Web
Request-response in distributed computing
Typical push-style event distribution
Push-style event distribution with an intermediary event channel
Pull-style event distribution
The major architectural components of event processing, showing the logical separation of event processing logic from the event producers and event consumers
This is an example of a particular event processing network showing the event processing components. The event producers appear at the extreme left of the diagram, and the event consumers at the far right.
Building blocks, definition elements, and runtime instances and how they relate to each other
Event type building block and corresponding artifacts
Information contained in the event channel building block
The seven fundamental building blocks of event processing
Different kinds of event processing agents
External appearance of an event processing agent
Event producer and consumer definition elements
Simple event processing network
A producer with an output terminal connected to two agents
Two agents connected to a single consumer input terminal
Use of an explicitly modeled channel to route events
Additional interconnects required if an explicit channel is not used
Event Processing in Action ebook for free