Chapter 10. Engineering and implementation considerations
The chapter shifts from event processing concepts to the practical engineering issues involved in building real applications. It begins by noting that implementation is shaped by programming style, runtime environment, non-functional requirements, performance goals, optimization choices, and validation. A key theme is that event processing can reduce bottlenecks through asynchronous execution and by splitting work across multiple runtime artifacts and processors.
The discussion then surveys common implementation styles. Stream-oriented languages model event processing as data-flow graphs, where continuous queries operate over event streams and often use windows, partitions, and SQL-like syntax. Rule-oriented approaches are divided into production rules, active rules, and logic-programming rules, each showing a different way to react to events or state changes. The chapter also compares development environments, ranging from text-based tools to graphical and mixed interfaces, emphasizing that these tools mainly serve technical developers.
The second half focuses on quality attributes and optimization. It explains scalability concerns across event volume, numbers of agents, consumers, producers, context partitions, state size, computation complexity, and processor environments, then covers availability, recoverability, and security as major non-functional properties. It defines performance objectives such as throughput and latency, and surveys optimization strategies including partitioning, parallelism, distribution, load balancing, code generation, state management, scheduling, and routing. Finally, it shows how validation and auditing help detect loops, dead ends, unreachable agents, nondeterminism, and provenance questions, making event processing systems more trustworthy and manageable in practice.
An example of a data flow graph with streams on the edges and operators on the nodes
An example of data flow with a node as a record and associated operation taken from the Aleri language
Listing 10.1. An example of an operator written in a stream processing language
OMG Production Rule Representation
An example of an active rule in IBM WebSphere Business Events
Listing 10.3. Example based on ETALIS logic programming
A text-based development environment (Apama Studio)
Combined graphical- and form-based development environment
Stratification of an EPN to three strata
A sequence Pattern detect example showing the results of two different policies
An example of two loops detected within a path in EPN
A dead end example. The EPA Handle Low Inventory with No PO does not have any outgoing events.
An example of provenance—finding the path in the EPN that contains all the antecedents of the derived event "Shipment Delay 7 to 10 Days"
FAQ
What are the main engineering topics covered in Chapter 10 of *Event Processing in Action*?
Chapter 10 focuses on implementation concerns for event processing applications, including programming styles, non-functional properties, performance objectives, optimization techniques, validation, and auditing.
What programming styles are commonly used for event processing applications?
The chapter surveys three major styles: stream-oriented programming, rule-oriented programming, and imperative programming. It also notes that these styles vary by language and development environment.
What is the stream-oriented programming style in event processing?
Stream-oriented programming is rooted in data flow graphs, where nodes represent processing elements or operators and edges represent streams of event data flowing between them. Queries often resemble SQL and operate continuously over windows of the stream.
How do rule-oriented event processing languages differ from stream-oriented ones?
Rule-oriented languages use rules rather than continuous stream operators as the primary abstraction. They include production rules, active rules, and logic programming rules, and they typically express behavior in terms of conditions and actions.
What are active rules in event processing?
Active rules, also called event-condition-action rules, execute when an event occurs, evaluate conditions, and trigger actions if those conditions are satisfied. They may derive new events or invoke external activities.
Why are non-functional requirements important in event processing systems?
Non-functional requirements describe how well a system performs rather than what it does. In event processing, concerns such as scalability, availability, and security can strongly influence architecture and implementation choices.
What scalability challenges are discussed in Chapter 10?
The chapter discusses scalability in the volume of events, number of agents, consumers, producers, context partitions, context state size, computation complexity, and processor environment. These factors can affect both performance and system design.
What performance objectives are used to evaluate event processing systems?
The chapter lists six performance objectives: max input throughput, max output throughput, min average latency, min maximal latency, latency leveling, and real-time constraints. These can also be combined into composite objectives when needed.
What optimization techniques are used in event processing?
Optimization techniques include EPA assignment optimizations such as partitioning, parallelism, distribution, and load balancing; EPA code optimizations such as code generation and state management; and execution optimizations such as scheduling and routing.
What kinds of validation and auditing are used for event processing applications?
Validation includes static and dynamic analysis of event processing networks to detect issues like cycles, unreachable agents, dead ends, nondeterminism, and unused events. Auditing uses event logs and traces to investigate whether processes were applied appropriately and to reconstruct antecedents or consequences of events.
Event Processing in Action ebook for free