Saturday, September 26, 2009
Sometimes I feel out of context, but today I would like to return to the notion of context, which is the topic of chapter 7 of the EPIA book. I have discussed the notion of context first time almost two years ago, and since then mentioned it in some other postings; so now it is a good time to talk more about it. A context, in essence, is a grouping of events that are processed together. This grouping may be: temporal, spatial, state oriented, or segmentation oriented, as seen in the figure below.
Temporal context may be fixed interval, interval that start and end in the occurrence (or detection) of events, and also sliding interval, according to time, or number of events. Spatial contexts can relate to fixed location, to distance from an entity, and to distance from the location of event occurrence, state oriented refers to external state (e.g. weather), and segmentation oriented, refers to partition of the event space according to some assertion (e.g. simple partition can be: platinum customers, gold customers and other type of customers). A context can be composite such as: spatial and temporal together.
What is the role of context in event processing ? first - an event processing agent lives within a context, in different contexts, the same event can be processed by different event processing agents. Second - it determines which events are processed together as input for the same pattern detection (AKA "complex event processing"). For example, if we are looking for the behavior of a single customer within a single day, then this is a combination of a temporal context (day) and a segmentation context (partition by customer), and each of them is processed in looking for a distinct pattern. This is a description of contexts in a nutshell. Some languages support kinds of temporal contexts ("window" or "sliding window"), some have more developed notion of context, and some have none. I'll write more about context types in one of the next postings.