Middleware Systems Research Group, University of Toronto, Canada

Composite subscriptions

An event is a state transition in a system, and in the publish/subscribe literature is often synonymously referred to as a publication. A composite event refers to a pattern of event occurrences of interest to a subscriber, and a composite subscription refers to the subscription that expresses the pattern defining the composite event.

A composite subscription consists of a set of atomic subscriptions connected by logic operators. It is represented by a tree, in which the root node is the composite subscription, leaf nodes are atomic subscriptions, and internal nodes are operators. A composite subscription detects a composite event by correlating publications from multiple distributed data sources, with each data source satisfying an atomic subscription within the composite subscription. Variables are supported so that subscribers can extract values of attributes and correlate several publications by attribute values. The PADRES composite subscription language features include:

  • AND (&&)
  • OR (||)
  • Variables ($X)
  • Advanced event patterns

Composite Subscription Routing

In the topology-based composite subscription routing protocol, a composite subscription is routed as a unit towards its potential publishers until it reaches a joint point broker. A joint point broker is the first broker at which the data sources that may contribute to satisfying the composite subscription are located in different directions in the overlay network. Notice that in this protocol, composite subscriptions are routed based on the topology of the broker network. In the following example, B3 and B4 are joint points of composite subscription CS.

CS Routing

Composite Subscription Detection

Each broker is an atomic/composite event detector. It can process a large number of publications and subscriptions, and maintains them as rules and facts in its matching engine. The broker matches the rules against the facts. The occurrence of a composite event is marked by the occurrence of the last event that makes the composite event occur. In the topology-based routing, the composite subscription is split at the joint point broker, which carries out the composite event detection for the subscription. When a composite subscription is received, it is inserted into the PRT as a rule. The rule is maintained in the matching engine in a partial match state. When a publication is received, it is inserted as a fact. If the fact fires a rule, that is, the fact makes a partial matched rule into a complete one, the matching engine declares a match of the composite subscription, and a notification message with a set of matching publications as its payload is issued. If the fact does not fire a rule, the matching engine updates the partial match state with the new fact.

CS Detection