Overview

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

FAQ

What is the main difference between an event and a request in event processing?An event indicates that something has already happened, while a request expresses a wish that something should happen in the future.
Why are event producer and event consumer considered decoupled?Because an event has meaning independent of a particular consumer, and the producer does not depend on any specific action being taken by a consumer.
What is push-style event distribution?Push-style distribution means the event producer initiates communication and sends one-way event messages to one or more consumers without waiting for a response.
What is publish/subscribe in event processing?Publish/subscribe is a distribution style where consumers register subscriptions with an event channel, and the channel forwards matching events to subscribed consumers dynamically.
How is a message different from an event?An event is the information about something that happened, while a message is the mechanism used to transport that information between components.
What is pull-style event distribution?Pull-style distribution uses a request-response interaction where a consumer requests events from a producer or channel and receives them in the response.
What is an event processing network (EPN)?An EPN is a collection of event producers, event consumers, event processing agents, global state elements, and channels connected together to form an event-driven application.
What is the difference between a raw event and a derived event?A raw event enters the system directly from an event producer, while a derived event is generated inside the system by event processing.
What is stateless event processing?Stateless event processing is when the way one event is processed does not affect how later events are processed.
What is stateful event processing?Stateful event processing is when processing depends on more than one input event, so earlier events influence how later events are handled.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Event Processing in Action Event Processing in Action ebook for free