Chapter 11: Chapter 11. Today’s event processing challenges
The chapter introduction previews unresolved challenges involving time, uncertainty, event retraction, and causality in event processing.
After this chapter you will be able to
- Occurrence and detection times. Distinguish an event’s occurrence time from its detection time.
- Time and processing outcomes. Explain how time and event ordering can affect event processing outcomes.
- Occurrence Time Modeling Tradeoff. Explain why an event’s occurrence may be ambiguous or span an interval, and why a system might nevertheless represent it as a single time point.
- Half-Open Time Intervals. Describe the explicit time interval data type and identify which boundary points it includes.
- Temporal Context Interval Relationships. Explain why processing interval-valued events in a temporal context requires a specified relationship between the event interval and the context partition.
- Auction timestamp anomalies. Explain the two auction anomalies caused by timestamping derived entries at emission, and how inheriting bid occurrence times addresses them.
- Pattern occurrence time policies. Describe the alternative occurrence-time policies for the patient readmission sequence and why choosing among them is a design decision.
- Absence pattern timing choices. Explain how the Pickup Alert example applies alternative occurrence-time interpretations to an absence pattern.
- Order sensitivity and anomalies. Explain why event order matters and how distributed processing can produce an incorrect or indeterminate order.
- Occurrence time synchronization. Describe how producer clocks can distort occurrence order and compare clock synchronization with using a common time server.
- Timeout buffering and tradeoffs. Explain how timeout buffering reorders events and what assumptions and costs make it suitable or unsuitable.
- Retrospective compensation process. Trace how retrospective compensation handles an out-of-order event after normal processing has already taken place.
- Compensation feasibility and costs. Explain the practical difficulties of retrospective compensation and when it may be worth considering.
- Uncertain event reports. Explain how event reports can be uncertain even when an event either occurred or did not occur, and describe sources of that uncertainty.
- Inexact event content. Describe inexact event content and explain how imprecise sources, temporal anomalies, or estimated and sampled data can cause it.
- Propagation of event inexactness. Explain how deriving events from inexact inputs can propagate uncertainty or inexact content through an event processing network.
- Situations and computational events. Explain how a user-domain situation differs from a computational event and why the latter may not exactly identify the former.
- False detection and consequences. Distinguish false positive from false negative situation detection and describe how either can cause harm.
- Sources of detection inexactness. Explain how uncertain events and approximate computational detection can lead to false situation detections.
- Inexactness handling spectrum. Explain how assumptions about the frequency and importance of inexact cases shape a system’s approach to handling them.
- Probability for events and patterns. Describe what probabilities can represent in inexact event processing, including their application to patterns and derived events.
- Probability propagation and assignment. Explain the distinction between propagating probabilities through an event processing network and obtaining the probabilities to use.
- State-dependent cancellation consequences. Explain why cancelling a Fast Flower Delivery order is not always a simple rollback, using lifecycle stages to illustrate the different consequences.
- Retraction implementation challenge. Explain why developers must determine and hardcode application-specific retraction cases, according to the section.
- Event causality and lineage. Explain event causality and how causal relationships help trace the lineage of an action or detected situation.
- Types of event causality. Distinguish predetermined, induced, and potential causality using the roles of raw events, an event processing agent, and an external consumer.
- Causality relationship information. Explain which causality type can be inferred from the event processing network and how information for the other types may be supplied.
What it builds on
- Event type description attributes (chapter 3) · Event header attributes that describe event times.
- Temporal context (chapter 7) · Temporal context as a dimension of event processing.
- Stateful filtering in an event processing agent (chapter 8) · The role of time in stateful filtering.
- The temporal order patterns (chapter 9) · Patterns that rely on temporal order.
- Trend patterns (chapter 9) · Trend-oriented patterns.
- Event processing networks (chapter 2) · Event processing networks and their agents
- Header attributes (chapter 3) · Event header attributes
- Pattern definitions (chapter 9) · Event pattern definitions
Section by section
Introduction
The chapter introduction previews unresolved challenges involving time, uncertainty, event retraction, and causality in event processing.
11.1 The temporal semantics of event processing
This section reviews event timestamps and how time and processing order can affect event processing outcomes.
- Occurrence and detection times: Distinguish an event’s occurrence time from its detection time.
Why it matters: These timestamps distinguish when something happened from when the system learned about it. - Time and processing outcomes: Explain how time and event ordering can affect event processing outcomes.
Why it matters: The same input messages can lead to different outcomes when their timestamps or processing order differ.
Key terms: detection time, occurrence time, event producer, timestamps, temporal context, temporal order, stateful filtering, transformations, patterns
11.1.1 Occurrence time: time point versus interval
This section examines event occurrence as a time interval rather than a point and its implications for representation, temporal contexts, and ordering.
- Occurrence Time Modeling Tradeoff: Explain why an event’s occurrence may be ambiguous or span an interval, and why a system might nevertheless represent it as a single time point.
Why it matters: The choice between a timestamp and an interval trades computational convenience against the event’s actual duration. - Half-Open Time Intervals: Describe the explicit time interval data type and identify which boundary points it includes.
Why it matters: Explicit interval boundaries make it possible to represent events that last over time. - Temporal Context Interval Relationships: Explain why processing interval-valued events in a temporal context requires a specified relationship between the event interval and the context partition.
Why it matters: A context window alone does not determine which interval-valued events belong in it. - Ordering of Event Intervals: Explain why existing order-based patterns need adjustment when events have occurrence intervals.
Why it matters: Moving from timestamps to intervals affects patterns that depend on event order.
Key terms: occurrence time, temporal granularity, chronon, occurrence time interval, time interval, time point, half-open interval, start point, end point, temporal context
11.1.2 Temporal issues concerned with derived events
This section explains how timestamp and ordering policies for derived events affect event-processing semantics and can prevent or cause anomalies.
- Raw and derived event timing: Explain why raw and derived events need consistent temporal semantics, and how processing can change their relative order.
Why it matters: A downstream agent may interpret derived events alongside raw events, even when processing has changed their order. - Auction timestamp anomalies: Explain the two auction anomalies caused by timestamping derived entries at emission, and how inheriting bid occurrence times addresses them.
Why it matters: The wrong occurrence-time policy can change which bids are accepted or who wins. - Pattern occurrence time policies: Describe the alternative occurrence-time policies for the patient readmission sequence and why choosing among them is a design decision.
Why it matters: The timestamp expresses what the derived event is understood to represent, rather than having one universally correct value. - Absence pattern timing choices: Explain how the Pickup Alert example applies alternative occurrence-time interpretations to an absence pattern.
Why it matters: An absence can be associated with a whole waiting period, its expiry, or detection, depending on what the application needs the alert to mean. - Occurrence time platform limitations: Explain the limitation of setting occurrence time on a platform that orders events only by system-generated detection time.
Why it matters: A sound timestamp policy only helps ordering if the platform can use it as intended.
Key terms: raw events, derived events, occurrence time, detection time, derived event, auction interval, sequence pattern, policy, absence pattern, Pickup Alert
11.1.3 Event order and out-of-order semantics
This section explains why event order can be unreliable and compares ways to synchronize, reorder, or compensate for out-of-order events.
- Order sensitivity and anomalies: Explain why event order matters and how distributed processing can produce an incorrect or indeterminate order.
Why it matters: An application can produce the wrong result even when all the relevant events eventually arrive. - Occurrence time synchronization: Describe how producer clocks can distort occurrence order and compare clock synchronization with using a common time server.
Why it matters: Sorting by occurrence timestamps is only useful for order-sensitive processing when those timestamps are sufficiently reliable. - Timeout buffering and tradeoffs: Explain how timeout buffering reorders events and what assumptions and costs make it suitable or unsuitable.
Why it matters: Buffering can restore occurrence order, but only by accepting delay and potentially discarding events. - Sequence number buffering: Describe how sequence numbers detect gaps and compare their waiting behavior with timeout buffering.
Why it matters: Sequence numbers offer another way to handle gaps without imposing the same fixed wait on every event. - Retrospective compensation process: Trace how retrospective compensation handles an out-of-order event after normal processing has already taken place.
Why it matters: Compensation offers an alternative to delaying all processing in anticipation of late events. - Compensation feasibility and costs: Explain the practical difficulties of retrospective compensation and when it may be worth considering.
Why it matters: The ability to replay events alone does not guarantee that the consequences of earlier processing can be corrected.
Key terms: occurrence time, detection time, out-of-order, occurrence time synchronization, clock synchronization, time server, logical order, timeout buffering, timeout offset, end-to-end latency
11.2 Inexact event processing
This section introduces three forms of inexactness in event processing and notes that current systems handle them inconsistently or not at all.
11.2.1 Uncertain events and inexact event content
This section explains uncertainty in event reports, inexact event content, and how inaccuracies can propagate through an event processing network.
- Uncertain event reports: Explain how event reports can be uncertain even when an event either occurred or did not occur, and describe sources of that uncertainty.
Why it matters: A system's event reports may not faithfully represent what happened in the real world. - Inexact event content: Describe inexact event content and explain how imprecise sources, temporal anomalies, or estimated and sampled data can cause it.
Why it matters: Even an event that corresponds to something real can carry inaccurate information about it. - Propagation of event inexactness: Explain how deriving events from inexact inputs can propagate uncertainty or inexact content through an event processing network.
Why it matters: Inaccuracy need not stay confined to the event where it first appears.
Key terms: uncertain events, event producer, derived events, temporal anomalies, inexact event content, header, payload, raw events, event processing agent, inexact input events
11.2.2 Inexact matching between events and situations
This section explains why computational events can mismatch situations that users need to respond to, producing false positives and false negatives.
- Situations and computational events: Explain how a user-domain situation differs from a computational event and why the latter may not exactly identify the former.
Why it matters: A system's event is not necessarily a perfect indication of what users need to react to. - False detection and consequences: Distinguish false positive from false negative situation detection and describe how either can cause harm.
Why it matters: Both unnecessary reactions and missed real threats can be costly or damaging. - Sources of detection inexactness: Explain how uncertain events and approximate computational detection can lead to false situation detections.
Why it matters: Even a detected pattern may be evidence of a situation rather than proof of it.
Key terms: situation, raw event, derived event, false positive, false negative, situation detection, uncertain events, inexact events, derived events, pattern detection
11.2.3 Handling inexact event processing
This section compares approaches to handling inexact event processing and describes probability-based treatment and its practical limitations.
- Inexactness handling spectrum: Explain how assumptions about the frequency and importance of inexact cases shape a system’s approach to handling them.
Why it matters: The chosen approach determines where the system needs explicit support for inexactness. - Probability for events and patterns: Describe what probabilities can represent in inexact event processing, including their application to patterns and derived events.
Why it matters: These probabilities provide a quantitative way to represent uncertainty in both input and derived results. - Probability propagation and assignment: Explain the distinction between propagating probabilities through an event processing network and obtaining the probabilities to use.
Why it matters: Being able to propagate probabilities does not remove the difficulty of assigning them in the first place.
Key terms: inexact event processing, exceptions, event types, event patterns, context, probability-based methods, event occurrence, event content, temporal characteristics, patterns
11.3 Retraction and causality
This section introduces retraction and causality as challenges involving relationships between events.
11.3.1 Event retraction
This section uses order cancellation to explain why event retraction depends on application state and requires application-specific handling.
- State-dependent cancellation consequences: Explain why cancelling a Fast Flower Delivery order is not always a simple rollback, using lifecycle stages to illustrate the different consequences.
Why it matters: The same cancellation event can require different actions depending on what has already happened. - Retraction implementation challenge: Explain why developers must determine and hardcode application-specific retraction cases, according to the section.
Why it matters: Retraction can involve real-world consequences that an event processing system cannot simply undo automatically.
Key terms: event retraction, cancellation, delivery lifecycle, retraction, hardcoded, logical implications
11.3.2 Event causality
This section defines event causality, distinguishes three forms of causal relationships, and explains how they support event lineage tracing.
- Event causality and lineage: Explain event causality and how causal relationships help trace the lineage of an action or detected situation.
Why it matters: Causality tracing helps explain how an action or detected situation came about. - Types of event causality: Distinguish predetermined, induced, and potential causality using the roles of raw events, an event processing agent, and an external consumer.
Why it matters: The type of relationship determines what can be assumed about the connection between events. - Causality relationship information: Explain which causality type can be inferred from the event processing network and how information for the other types may be supplied.
Why it matters: Reliable lineage tracing depends on establishing causal relationships that the network alone cannot reveal.
Key terms: event causality, causality relations, lineage, predetermined causality, induced causality, potential causality, raw events, derived event, event processing network, event-to-event relationship information
11.4 Summary
11.4.1 Exercises
Where this is used later
- Intelligent event processing (chapter 12) · Event causality
Concepts explained in this chapter
- event orderingThe sequence in which events are arranged or processed, which can affect order-sensitive results.
- event retractionThe withdrawal or invalidation of a previously reported or derived event and its effects.
- clock synchronization problemThe challenge of aligning event occurrence timestamps produced by clocks that may not agree.
- order-sensitive processingEvent processing whose result or behavior depends on the order in which events are processed.
- retrospective compensationA technique for addressing late events by retracting affected results and replaying events in their correct order.
- timeout reorderingA method for handling out-of-order events by buffering them for a bounded delay and sorting them by occurrence time.
- occurrence timeOccurrence time is the timestamp or interval representing when an event occurred in the external system.
- derived eventA derived event is an event produced by an event processing system from detected information about a situation.
- detection timeDetection time is the timestamp at which an event became known to the event processing system.
- inexact processingInexact event processing accommodates imprecision in event information and interpretation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
