Chapter 3. Defining the events
When I can’t handle events, I let them handle themselves.
Henry Ford
Before delving into how events are processed, we spend a chapter discussing what events are and how they are defined. This is a good place to start our in-depth exploration of event processing, as it’s natural to begin the detailed design of an application by defining the event types that it uses. It’s good practice to base the design of an event processing application on a clearly thought-out set of event types. It also gives your first opportunity to see definition elements in use.
In this chapter we discuss the following topics:
- The logical structure of an event, and what we mean by an event type
- What you specify in an event type definition element
- Event header attributes, in particular the timestamp attributes
- Event payload attributes, including attributes referring to application entities
- Relationships between event types, such as generalization and specialization
We illustrate these topics by showing some of the event types used in the Fast Flower Delivery application, and we conclude the chapter with a discussion of how real-life event processing systems represent events and event types.