Gregory Aaron Wilkin
email: gwilkin@cs.purdue.edu

K R Jayaram
email: jayaram@cs.purdue.edu

Patrick Eugster
email: peugster@cs.purdue.edu

Ankur Khetrapal

FAIDECS: Fair Decentralized Event Correlation

Keywords: event, correlation, fair, reliable, multicast, decentralized

Many distributed applications rely on event correlation. Such applications, when not built as ad-hoc solutions, typically rely on centralized correlators or on broker overlay networks. Centralized correlators constitute performance bottlenecks and single points of failure; straightforwardly duplicating them can hamper performance and cause processes interested in the same correlations to reach different outcomes. The latter problem can manifest also if broker overlays provide redundant paths to tolerate broker failures as events do not necessarily reach all processes via the same path and thus in the same order. This paper describes FAIDECS, a generic middleware system for fair decentralized correlation of events multicast among processes: processes with identical interests reach identical outcomes, and subsumption relationships among subscriptions are considered for respectively delivered composite events. Based on a generic subset of FAIDECS's predicate language, we introduce properties for composite event deliveries in the presence of process failures and present novel decentralized algorithms implementing these properties. Our algorithms are compared under various workloads to solutions providing equivalent guarantees.

Introduction

The abstraction of application events is useful not only for reasoning about distributed systems [START_REF] Lamport | Time, Clocks, and the Ordering of Events in a Distributed System[END_REF], but also for building such systems [START_REF] Carzaniga | Design and Evaluation of a Wide Area Event Notification Service[END_REF][START_REF] Zhao | Exploiting Event Stream Interpretation in Publish-Subscribe Systems[END_REF].

Events: composition and correlation. Event correlation [START_REF] Demers | Towards Expressive Publish/Subscribe Systems[END_REF] enables higherlevel reasoning about interactions by supporting the assembly of composite events from elementary events [START_REF] Pietzuch | A Framework for Event Composition in Distributed Systems[END_REF][START_REF] Li | Composite Subscriptions in Content-Based Publish/Subscribe Systems[END_REF]. Traditional uses of correlation include intrusion detection [START_REF] Krugel | Decentralized Event Correlation for Intrusion Detection[END_REF]; network monitoring [START_REF] Kompella | IP Fault Localization Via Risk Modeling[END_REF] enables the improvement of resource usage, e.g., in data centers. More recent application scenarios for correlation include embedded and pervasive systems [START_REF] Grimm | System Support for Pervasive Applications[END_REF], and sensor networks [START_REF] Sanchez | Event Correlation: Language and Semantics[END_REF]. Complex event processing (CEP) is a computing paradigm based on event correlation, with applications to business process management and algorithmic trading.

Challenges for event correlation middleware. Reasoning about event composition is, however, involving. Early work in active databases [START_REF] Chakravarthy | Composite Events for Active Databases: Semantics, Contexts and Detection[END_REF] explored syntax and semantics of correlation, pinpointing options. Consider a sequence of events e 1 1 • e 1 2 • e 2 1 , where e k l is a the l-th received event (instance) of event type T k . This sequence can be matched by a "subscription" correlating two event types T 1 and T 2 as [e 1 1 , e 2 1 ] (first received first) or as [e 1 2 , e 2 1 ] (most recent first). However, corresponding systems are centralized and consider events to be uni cast.

Many theoretical and practical efforts on event correlation in publish/subscribe systems [START_REF] Carzaniga | Design and Evaluation of a Wide Area Event Notification Service[END_REF] consider decentralized setups and multi cast but focus on efficiency or the number of aggregations, yielding only best-effort guarantees on event delivery. Consider an online auction where the bidding price of a product or advertisement slot is event-driven. If two processes participating in the auction observe the same events in different orders (e.g., one receives the sequence above, the second one receiving e 2 1 •e 1 2 •e 1 1 ), then the event correlation middleware might be unfair to the first process if e 2 1 has information that is critical to placing an optimal bid. Or, consider assembly line surveillance through two monitors for fault tolerance. If they observe events differently, they might yield contradicting reports or alarms. During decentralized event correlation, one might not only expect that processes with identical subscriptions deliver identical sets of events, but also that if the subscription of a first process p i "covers" that of a second process p j , then p i would deliver anything that p j does. In production chains, the same complex events triggering alarms can be combined with further events for taking actions further down the chain or triggering more specific alarms. Such subsumption is natural in publish/subscribe systems and even key to scalability [START_REF] Carzaniga | Design and Evaluation of a Wide Area Event Notification Service[END_REF]. Of course, correlation-based systems can currently be designed individually to achieve such properties, e.g., by using proxy processes to merge and multiplex event streams to replicas to achieve agreement; corresponding solutions are hardly generic though, and can introduce bottlenecks to performance and dependability.

Contributions. This paper presents FAIDECS (FAI r Decentralized E vent C orrelation S ystem -"Fedex"), a middleware system for fair decentralized correlation of events multicast among processes. Our exact contributions are:

-After presenting related work (Section 2) and introducing the system model and assumptions (Section 3), we present clear and feasible properties for aggregated deliveries of sets of events based on a concise and generic event correlation sub-grammar in FAIDECS (Section 4). While in single event (message) delivery scenarios, several families of properties have been proposed and investigated (e.g., agreed delivery [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF], probabilistic delivery [START_REF] Birman | Bimodal Multicast[END_REF], ordering properties [START_REF] Garcia-Molina | Message Ordering in a Multicast Environment[END_REF]), corresponding properties for the better understanding of correlation-based systems and ensuring "logical correctness and integrity" [START_REF] Rabinovich | Analyzing the Behavior of Event Processing Applications[END_REF] are namely still lacking. Our properties provide fairness in the face of failures of processes responsible for merging events: either all or none of the depending processes cease to receive the desired events, while common overlays (e.g., [START_REF] Li | Composite Subscriptions in Content-Based Publish/Subscribe Systems[END_REF]) might continue to deliver differing sets of events to subsets of interested processes. Our properties also include a notion of subsumption on correlation patterns. -We introduce novel pragmatic algorithms implementing our delivery properties (Section 5). For illustration purposes, we first describe simple algorithms based on a group broadcast black box. Then we present decentralized solutions implemented in FAIDECS based on a distributed hash-table (DHT), and present the use of lightweight redundancy mechanisms used for fault tolerance.

-An implementation of our algorithms in FAIDECS is evaluated under different workloads (Section 6). We quantify the benefits of our decentralized approach by comparing them with sequencer-based and token-based total order broadcast protocols providing comparable properties.

We conclude with final remarks in Section 7. Due to space limitations, we refer to a companion technical report [START_REF] Wilkin | Multicast with Aggregated Deliveries[END_REF] for discussions of alternative properties, or a formal proof that agreement on composite events requires a total order on individual events or an equivalent oracle.

Related Work

Many early approaches for composite event detection are based on active databases that employ centralized detection of events (e.g., [START_REF] Chakravarthy | Composite Events for Active Databases: Semantics, Contexts and Detection[END_REF]). A composite event is a pattern of events that a subscriber may be interested in. A composite subscription is a pattern describing the interests of the subscriber.

Event correlation has been vigorously investigated in the context of contentbased publish/subscribe systems. Most such systems rely on a broker network for routing events to the subscribers (e.g., SIENA [START_REF] Carzaniga | Design and Evaluation of a Wide Area Event Notification Service[END_REF] and Gryphon [START_REF] Aguilera | Matching Events in a Content-Based Subscription System[END_REF]). Advertisements are typically used to form routing trees in order to avoid propagating subscriptions by flooding the broker network. Upon receiving an event e, a broker determines the subset of parties (subscribers and brokers) with matching interests, and forwards e to them. Subscription subsumption [START_REF] Carzaniga | Design and Evaluation of a Wide Area Event Notification Service[END_REF] is used to summarize subscriptions and avoid redundant matching on brokers and redundant traffic among them. If any event e that matches a first subscription also matches a second one, then the latter subscription subsumes the former one.

A broker network can be used to gather all publications for the elementary subscriptions and perform correlation matching. A successful match yields a composite event which is delivered to interested subscribers, where no guarantees are typically provided on correlation. If the events matching a composite subscription shared by two subscribers are produced by several publishers, then unless the subscribers are connected to a same edge broker, they may receive the events through different routes. This leads to different orders among the events and consequently to different composite events for the two subscribers. PADRES [START_REF] Li | Composite Subscriptions in Content-Based Publish/Subscribe Systems[END_REF] performs composite event detection for each subscription at the first broker that accumulates all the individual subscriptions, providing no global properties. In the context of Hermes [START_REF] Pietzuch | A Framework for Event Composition in Distributed Systems[END_REF], complex event detectors using an interval timestamp model are proposed as a generic extension for existing middleware architectures. Hermes uses a DHT to determine rendezvous nodes for publishers and subscribers; however, this can create single points of failure. The framework we propose is inspired by Hermes in that our framework uses specific merger nodes for specific combinations of types, determined by a DHT. However, we replicate the mergers for availability and connect them such as to ensure agreement, ordering and subsumption on composite events.

Stream processing is a paradigm closely related to event correlation and much investigated in the last few years. Research around database-backed systems like Aurora [START_REF] Abadi | Aurora: A New Model and Architecture for Data Stream Management[END_REF] or Borealis [START_REF] Tatbul | Staying FIT: Efficient Load Shedding Techniques for Distributed Stream Processing[END_REF] has led the path. These systems, however, focus on correlation over streams of events with respect to single destinations and do not consider multicasting. Straightforwardly merging two same streams at two different nodes leads to different outcomes. StreamBase 1 is a commercial offspring of these efforts. Cayuga [START_REF] Demers | Towards Expressive Publish/Subscribe Systems[END_REF] is a generic correlation engine supporting correlation across streams and is based on a very expressive language but is centralized. The Gryphon publish/subscribe systems has similarly added support for streams [START_REF] Zhao | Exploiting Event Stream Interpretation in Publish-Subscribe Systems[END_REF]. Again, the focus is efficiency, leaving properties unclear.

Preliminaries

We assume a system Π of processes, Π={p 1 , ..., p u } connected pairwise by reliable channels [START_REF] Basu | Simulating Reliable Links with Unreliable Links in the Presence of Failures[END_REF] offering primitives to send (non-blocking) and receive (receive) messages. We consider a crash-stop failure model [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF], i.e., a faulty process may stop prematurely and does not recover. We assume the existence of a discrete global clock to which processes do not have access and that an algorithm run R consists in a sequence of events on processes. That is, one process performs an action per clock tick which is either of a (a) protocol action (e.g., receive), (b) an internal action, or (c) a "no-op". A process is faulty in a run R if it fails during R, otherwise correct.

A failure pattern F is a function mapping clock times to processes, where F (t) gives all the crashed processes at time t. Let crashed(F ) be the set of all processes ∈ Π that have crashed during R. Thus, for a correct process p i , p i ∈ correct(F ) where correct(F ) = Π -crashed(F ) [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF].

For brevity and clarity, we adopt in the following a more formal notation for properties than common. Consider, for instance, the well-known problem of Total Order Broadcast (TOBcast) [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF] defined over primitives to-broadcast and todeliver, which will be used for comparison later on. We denote to-deliver i (e) t as the TO-delivery of a message conveying an event e by process p i at time t, and similarly, to-broadcast i (e) t denotes the TO-broadcasting of e by p i at time t. We elide any of i, t, or e when not germane to the context. We write ∃a for an action a (e.g., send, to-broadcast) as a shorthand for ∃a ∈ R. The specification of Uniform TOBcast thus becomes: TOB-No Duplication: ∃to-deliver i (e)t ⇒ to-deliver i (e) t | t = t TOB-No Creation: ∃to-deliver(e)t ⇒ ∃to-broadcast(e) t | t < t 1 http://www.streambase.com/.

TOB-Validity: ∃to-broadcast i (e) ∧ pi ∈ correct(F ) ⇒ ∃to-deliver i (e) TOB-Agreement: ∃to-deliver i (e) ⇒ ∀pj ∈ correct(F )\{pi}, ∃to-deliver j (e) TOB-Total Order: ∃to-deliver i (e)t i , to-deliver i (e ) t i , to-deliver j (e)t j , to-deliver j (e ) t j ⇒ (ti < t i ⇔ tj < t j )

FAIDECS Model

In this section, we specify composite events in FAIDECS and the properties achieved for corresponding deliveries (deliver) with respect to individually generated (multicast) events. In contrast to traditional settings, deliver is parameterized by a "subscription" Φ and delivers ordered sets of typed messages representing events.

Predicate Grammar

Sets of delivered events -relations -represent events aggregated according to specific subscriptions. Subscriptions are combinations of predicates on events in disjunctive normal form based on the following grammar (extended BNF):

Disjunction Ψ ::= Φ | Φ ∨ Ψ Operation op ::= < | > | ≤ | ≥ | = | = Conjunction Φ ::= ρ | ρ ∧ Φ Predicate ρ ::= T[i].a op v | T[i].a op T[i].a | T[i] | T[i].
a denotes an attribute a of the i-th instance of type T (T[i]) and v is a value. As syntactic sugar, we can allow predicates to refer to just T , which can be automatically translated to T [START_REF] Abadi | Aurora: A New Model and Architecture for Data Stream Management[END_REF]. We may use this in examples for simplicity. A type T is characterized by an ordered set of attributes [a 1 , ..., a n ], each of which has a type of its own -typically a scalar type such as Integer or Float.

An event e of type T is an ordered set of values [v 1 , ..., v n ] corresponding to the respective attributes of T . We assume that types of values in predicates conform with the types of events (e.g., through static type-checking [START_REF] Eugster | EventJava: An Extension of Java for Event Correlation[END_REF]). T (e) returns the type of a given event e. It is important to note that we do not introduce a set of uniquely identified types {T 1 , ..., T w } as we do for processes. This keeps notation more brief in that we can use [T 1 , ..., T k ] to refer to an arbitrary ordered set of k types, as opposed to something of the form [T j1 , ..., T j k ].

To later simplify properties, we introduce the empty predicate , which trivially yields true. A predicate that compares a single event attribute to a value or two event attributes on the same event, i.e., on the same instance of a same type (e.g.,

T k [i].a op T k [i].a )
, is a unary predicate. When two distinct events (two distinct types or different instances of the same type) are involved, we speak of binary predicates (T k [i].a op T l [j].a , k = l ∨i = j). We also allow wildcard predicates of the form T[i] to be specified; such predicates simply specify a desired type T[i] of events of interest. T[i] implicitly also declares T[k] ∀k ∈ [1..i -1] if not already explicitly declared as part of other predicates in the subscription.

We assume, for presentation brevity, a single subscription per process. The disjunction representing process p i 's subscription is represented as Ψ (p i ). We also rule out disjunctions with several identical conjunctions. In practice, we can simply remove all but one copy. By abuse of notation but unambiguously, we sometimes handle disjunctions (or conjunctions) as sets of conjunctions (or predicates). We write, for instance,

ρ l ∈ Φ ⇔ Φ = ρ 1 ∧ ... ∧ ρ k with l ∈ [1..k].
For the following, consider an example subscription Ψ S for an increase in three successive stock quotes after a quarterly earnings report:

Ψ S = StockQuote[0].time > EarningsReport[0].time ∧ StockQuote[1].value > StockQuote[0].value ∧ StockQuote[2]
.value > StockQuote [START_REF] Abadi | Aurora: A New Model and Architecture for Data Stream Management[END_REF].value We would probably want to introduce arithmetic operators on values [START_REF] Koch | Cordies: Expressive Event Correlation in Distributed Systems[END_REF] to express, e.g., that the local publication time of the first stock quote is within some interval of that of the earnings report. Our grammar can be easily extended by such deterministic constructs but is intentionally kept simple for presentation and to illustrate the independence of our algorithms from specific grammars.

Predicate Types and Evaluation

We assume that a deterministic order ≺ exists within subscriptions based on the names of event types, attributes, etc., which can be used for re-ordering predicates within and across conjunctions. This ordering can be lexical or based on priorities on event types and is necessary for even simplest forms of determinism and agreement. We consider subscriptions to be already ordered accordingly.

The number of events involved in a subscription is given by the number of its types and corresponding instances. More precisely, the types involved in a subscription are represented as sequences as they are ordered, and the same type can be admitted multiple times. Such sequences can be viewed as the signatures of predicates, defined as follows:

T(Φ ∨ Ψ) = T(Φ) T(Ψ) T(T[i].a op v) = T(T[i]) T(ρ ∧ Φ) = T(ρ) T(Φ) T( ) = ∅ T(T 1 [i].a 1 op T 2 [j].a 2 ) = T(T 1 [i]) T(T 2 [j]) T(T[i]) = [T, ..., T i× ]
stands for in-order union of sequences defined below:

∅ [T, ...] = [T, ...] [T, ...] ∅ = [T, ...] [T 1 , ..., T 1 i× , T 1 , ...] [T 2 , ..., T 2 j× , T 2 , ...] =                    [T 1 , ..., T 1 i× ] ⊕ ([T 1 , ...] [T 2 , ..., T 2 j× , T 2 , ...]) T 1 ≺ T 2 [T 2 , ..., T 2 j× ] ⊕ ([T 2 , ...] [T 1 , ..., T 1 i× , T 1 , ...]) T 2 ≺ T 1 [T 1 , ..., T 1 max(i,j)× ] ⊕ ([T 1 , ...] [T 2 , ...]) T 1 = T 2
Above, ⊕ represents simple concatenation. In the previous example, the types involved are thus [EarningsReport, StockQuote, StockQuote, StockQuote].

Any subscription Ψ thus involves a sequence of event types T(Ψ)=[T 1 , ..., T n ], where we can have for i, j ∈ [1..n], i < j such that ∀k ∈ [i..j], T k = T i = T j . That is, we can have subsequences of identical types. Such a subsequence represents a stream of events of the respective type of length j

-i + 1 (T k [1], ..., T k [j -i + 1]).
A subscription is correspondingly evaluated for an ordered set of events [e 1 , ..., e n ], where e i is of type T i . The evaluation of a conjunction Φ on a relation is written as Φ[e 1 , ..., e n ]. For evaluation of an attribute a on an event e i , we write e i .a. Evaluation semantics for predicates are defined as follows:

(Φ ∨ Ψ)[
(T[i].a op v) [e 1 , ..., e n ] =      e k+i-1 .a op v T (e k ) = T ∧ (T (e k-1 ) = T ∨ (k -1) = 0) false otherwise (T 1 [i].a 1 op T 2 [j].a 2 ) [e 1 , ..., e n ] =          e k+i-1 .a 1 op e l+j-1 .a 2 T (e k ) = T 1 ∧ (T (e k-1 ) = T 1 ∨ (k -1) = 0) ∧ T (e l ) = T 2 ∧ (T (e l-1 ) = T 2 ∨ (l -1) = 0) false otherwise
For brevity we may write simply Φ[...] for Φ[...] = true.

A process p i delivers events in response to its subscription Ψ (p i ) through deliver. We consider this primitive to be generically typed, i.e., we write deliver Φ ([e 1 , ..., e n ]) to deliver a relation [e 1 , ..., e n ], where e j is of type

T j such that T(Φ)=[T 1 , ..., T n ]. deliver i Φ ([e 1 , ..., e n ]
) t denotes a delivery on process p i in response to Φ at time t, and multicast i (e) t defines the multicast of an event e by p i at time t. Again i, t, etc. may be omitted when not germane to the context.

Properties

We now present properties for composite events in FAIDECS defined over primitives multicast and deliver. From here on, deliver refers to deliver (vs. TOdeliver for to-deliver), and multicast refers to multicast (vs. TO-broadcast). See [START_REF] Wilkin | Multicast with Aggregated Deliveries[END_REF] for detailed discussions of alternative properties.

Basic safety properties. The basic safety properties for FAIDECS are MDM-No Duplication, MDM-No Creation and Admission as shown below:

MDM-No Duplication: ∃deliver i Φ ([..., e, ...])t ⇒ deliver i Φ ([..., e, ...]) t | t = t MDM-No Creation: ∃deliverΦ ([..., e, ...])t ⇒ ∃multicast(e) t | t < t Admission: ∃deliver i Φ ([e1, ..., en]) | T(Φ) = [T1, ..., Tn] ⇒ Φ ∈ Ψ(pi) ∧ Φ[e1, ..., en] ∧ ∀k ∈ [1..n] : T (e k ) = T k
The MDM-No Duplication property implies that a same event is delivered at most once for a given conjunction, which may be opposed to certain systems that allow a same event to be correlated multiple times. Our property could easily be substituted to allow a delivery for every instance of a type in a given conjunction. We omit this for simplicity of the presented properties and algorithms. MDM-No Creation is similar to TO-broadcast specifications [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF] in that an event may only be delivered if multicast. Admission ensures type safety and that all events in a relation match the subscription.

Liveness. Admission can trivially hold while not delivering anything. We have to be careful about providing strong delivery properties on individually multicast events though, as events may depend on others to match a given conjunction. Nonetheless, we want to rule out bogus implementations which simply discard all events. We thus propose the following complementary liveness properties: These two properties handle the two possible cases that can arise. The first property deals with dependencies across events and can be paraphrased as follows: "If for a correct process p i , there is an infinite number of relations of matching events that are successfully multicast, then p i will deliver infinitely many such relations." This property is reminiscent of the Finite Losses property of fair-lossy channels [START_REF] Basu | Simulating Reliable Links with Unreliable Links in the Presence of Failures[END_REF]. It allows matching algorithms to discard some events for practical purposes such as agreement and ordering, yet ensures that when matching events are continuously multicast, a corresponding process will continuously deliver. From the example presented in Section 4.1, as long as events of both types are inifinitely published such that infinitely often, three successive, increasing stock quotes are multicast after an earnings report, there will be an infinite number of delivered relations.

Conjunction Validity: ∃multicast(e k l ), k ∈ [1..n], l ∈ [1..∞] ∧ pi ∈ correct(F ) ∧ ∃Φ ∈ Ψ(pi) | Φ[e 1 l , ..., e n l ] ⇒ ∃deliver i Φ ([...])t j | j ∈ [1..∞] Event Validity: ∃multicast i (e x ), multicast k,l (e k l ), k ∈ [1..n]\x, l ∈ [1..∞] {pi, pj, p k,l } ⊆ correct(F ) | Φ ∈ Ψ(pj) ∧ T(Φ) = [T1, ..., Tn] ∧ ∀z ∈ [w..y], Tz = T (e x ) ∧ (T (e x )[x -w + 1].a1 op T[r].a2) ∈ Φ | (T = T (e x ) ∨ r = x -w + 1) ∧ Φ[e
Event Validity provides a property analogous to validity for single-message deliveries (e.g., TOBcast): If an event is multicast by a correct process p i , and its delivery in response to a conjunction on some correct process p j is not conditioned by binary predicates with other event types, then the event must be delivered by p j if matching events of all other types are continuously multicast. This latter condition is necessary because the delivery of the event, even in the absence of binary predicates, requires the existence of other events (by nature of correlation). The condition also ensures that any unary predicates on the respective event type are satisfied. Note that in the case of multiple instances of that type, for each of which there are only unary predicates that match, the property does not force an event to be delivered more than once as the position of the event is not fixed in the implied delivery. The example in Section 4.1 does not present a unary predicate, and thus would not be affected by this property. If the subscription Ψ S were extended to trigger only if the value of the U.S. dollar is below some value v as in Ψ S = Ψ S ∧ USDollar.value < v, then any event matching this predicate will be delivered with the entire relation given by Ψ S .

Note also that none of these properties is impacted by the presence of multiple instances of a same type in a conjunction. An infinite flow of events of some type implies a multiple (a finite number) of infinite flows of that type.

Agreement. The properties so far ensure that as long as matching events are being multicast, processes will eventually deliver relations. We are, however, interested in stronger properties for these delivered relations, which ensure fairness for relations delivered across processes. We define Covering Agreement:

Covering Agreement: ∃deliver i Φ∧Φ ([e1, ..., en, ...]) | ((T(Φ) = [T1, ..., Tn])∩T(Φ )) = ∅ ⇒ ∀pj ∈ correct(F )\{pi} | Φ ∈ Ψ(pj) : ∃deliver j Φ ([e1, ..., en])
Subsumption only allows "extending conjunctions to the right" as determinism requires some given order for matching. Intuitively, subsumption in the presence of binary predicates is limited since, when comparing two subscriptions with same types, an event of a first type might match both subscriptions without implying that the same holds for a second event.

Note that Covering Agreement is not defined in a symmetric way (with Φ ∧ Φ ∈ Ψ(p j )), as the presence of a matching set of events for a conjunction Φ does not imply a timely or even eventual occurrence of a matching set for another sub-relation Φ conjoined by p j with Φ.

Thus, the example subscriptions Ψ S , as defined in Section 4.1, and Ψ S , defined in 4.3, would exhibit the necessary conditions for Covering Agreement. That is, the common predicates over the EarningsReport and StockQuote types would yield the same (sub)-relations for Ψ S and Ψ S , where Ψ S would deliver relations containing the above with an additional event of type USDollar.

Total Order

Intuitively, and as we will illustrate in the following sections, a total order on individual events can be used to achieve agreement on relations. In fact, it is necessary to do so (see [START_REF] Wilkin | Multicast with Aggregated Deliveries[END_REF] for a formal proof). On the upside, this can be exploited to provide corresponding relation-level properties. We define three types of total order properties below: None of the properties includes any of the others. Event Total Order ensures that there is a total (sub-)order on the events of a same type. Conjunction Total Order ensures that (sub-)relations delivered to identical (sub-)conjunctions are delivered in a total order. An implementation which never enforces Conjunction Total Order, i.e., delivers no two same relations on two processes with identical (sub-)conjunctions, could still ensure Event Total Order. Perhaps more obvious is that, inversely, Event Total Order does not imply Conjunction Total Order. Disjunction Total Order further sets our model apart from many single-event delivery multicast settings (e.g., traditional publish/subscribe), where subscriptions are conjunctions, and disjunctions are viewed as being expressed independently through multiple conjunctions. Our property strives for total order across relations delivered to distinct conjunctions in a same disjunction.

Algorithms

We now present ways to implement the properties proposed in the previous section. For illustration purposes, we first outline an approach relying straightforwardly on a total order across multicast events of all types. Then, we present novel decentralized algorithms achieving the same properties, leveraging our notion of subscription subsumption.

Total Order Broadcast Black Box

A straightforward solution for deterministic event correlation across all processes is to rely on a Total Order Broadcast "black box," with primitives tobroadcast and to-deliver for individual events, ensuring that all correct processes eventually TO-deliver all TO-broadcast events in the same order. To multicast an event e of any type, a process simply performs to-broadcast(e); a to-deliver(e) is handled in a deterministic manner described shortly. Many implementations exist, tolerating different failure patterns [START_REF] Défago | Total Order Broadcast and Multicast Algorithms: Taxonomy and Survey[END_REF].

Conjunctions. For simplicity, we first focus on single conjunctions for the algorithm in Figure 1 before expounding on generic disjunctions. That is, subscription Ψ i of process p i consists in a single conjunction Φ i . Disjunction Total Order, in this case, becomes subsumed by Conjunction Total Order.

The algorithm in Figure 1 uses first received matching semantics and pre-fix+infix disposal. In short, the former means that events are matched on a process in the order received by that process. The latter implies the following: Upon a successful match [e 1 , . . . , e n ], for each event e i , all events of the same type received prior to e i are discarded via the garbage collection mechanism dequeue. These semantics are further elaborated on below.

Each process p i maintains one queue Q per event type in its conjunction Φ=Ψ (p i ). For example, for a conjunction Φ = ρ 1 ∧ ρ 2 where ρ 1 = T 1 .a 1 < T 2 .a 2 and ρ 2 = T 1 .a 1 < 20, the subscriber maintains one queue for events of type T 1 and one for events of type T 2 . When TO-delivering an event, p i will loop once by line 20 and first checks whether the type of the event is in p i 's subscription. If so, p i attempts to enqueue the event. Q[T (e)] ⊕ e denotes the appending of event e to the queue of type T (e). The enqueue primitive returns true if the event has been enqueued, which means that it satisfies all unary predicates on the respective types in the conjunction. Then p i proceeds to matching. Any single received event may complete up to one relation. If a match [e 1 , . .

. , e n ]

Executed by every process pi 1: init 2: for all k = (l + 1)..h do 11: for all Φ l ∈ Ψ | T (e) ∈ T(Φ l ) in order do

Ψ ← Φ1 ∨ . . . ∨ Φo 3: Φ l ← ρ1 ∧ . . . ∧ ρm 4: Q l [T] ← ∅
if |T(Φ)| = n + 1 then 12: if Φ[

21:

if enqueue(e, Φ l , Q l ) then

22:

[e1, ..., e k ] ← match(∅, Φ l , Q l )

23:

if k = 0 then is identified, the corresponding events are discarded (dequeue) and for each event e i , all preceding events of the same type are discarded from the respective queue for that type. match iterates through the queues deterministically. The semantics attempt to find the first instance of the first type in Φ for which there are events of the remaining types with which Φ is satisfied. Among all such possibilities, the algorithm recursively seeks for a match with the first instance of the second type in Φ, etc. until a match is found or all possibilities are exhausted.

For multiple instances of a same type, a first instance is recursively matched with the first follow-up instance in the same queue until the needed number of instances is found for that type or the queue is exhausted.

Assuming that the underlying TOBcast primitive ensures TOB-No Creation and TOB-No Duplication (see Section 3), it is easy to see how the algorithm of Figure 1 ensures the corresponding MDM-No Creation and MDM-No Duplication properties defined in Section 4.3. An event e, matching all unary predicates of a conjunction Φ, is successfully added to the corresponding queue Q[T (e)] in enqueue (line 31, Figure 1). The only way in which e can be removed (and delivered) is together with a matching set of other events fulfilling Φ (line 23, Figure 1), thus ensuring Admission. If matching sets of such events are continuously TO-broadcast, then a match will eventually be determined at line 12 thus ensuring Event Validity. Conjunction Validity holds by a similar line of reasoning. The first matching, together with prefix+infix disposal, and the independent handling of events of distinct types ensures Event Total Order. If two processes p i and p j define conjunctions Φ ∧ Φ and Φ respectively, as long as Φ and Φ are type-disjoint, then events that match with Φ are independent of any events that match with Φ . Thus, if there is a matching relation for p i , there is a subset of the relation for which Φ is true. Since garbage collection is deterministic and is triggered every time an event of a type in T(Φ) is TO-delivered and in the same order on p i and p j with respect to those de-liveries, p i and p j will handle respective events identically, ensuring Covering Agreement. Similarly, Conjunction Total Order holds as all processes TO-deliver all relevant events. When p i identifies a match for Φ ∧ Φ , with Φ and Φ type-disjoint, p j will have TO-delivered the respective subset of events in Φ already in the same sub-order and thus delivers the respective sub-relations in the same order with any events identified for a Φ type-disjoint with Φ.

Disjunctions. When the subscription is a disjunction of several conjunctions, a process maintains one event queue per event type per conjunction. For example, for a disjunction

Ψ = Φ 1 ∨ Φ 2 where T(Φ 1 )=T(Φ 2 )=[T 1 , T 2 ]
, a process maintains two queues for type T 1 and then two queues for type T 2 , one each for

Φ 1 (Q 1 [T 1 ] and Q 1 [T 2 ]) and for Φ 2 (Q 2 [T 1 ] and Q 2 [T 2 ]).
Figure 1 supports multiple conjunctions in a single disjunction. The primary distinction is in the response to TO-deliveries. The primitive dispatches events to conjunctions in order of subscriptions. In contrast to subscriptions of one conjunction, an event can lead to multiple matches and deliveries.

Because the matching is performed deterministically, as explained previously for a given conjunction, and all processes enqueue the same sets of events in the same order, Covering Agreement across any two conjunctions is met for the same reasons as for single conjunctions. This property would also be met by any unordered dispatching for multiple conjunctions. The other properties established for conjunctions remain valid due to the duplication of events appearing in distinct conjunctions of a same subscription.

Disjunction Total Order is met as any p i and p j defining two identical separate conjunctions TO-deliver the respective events (possibly interleaved by those for other conjunctions in Ψ (p i ) and Ψ (p j ) respectively) in the same order. Thus, the correlation for respective relations occurs in the same order.

A simple optimization of the algorithm for subscriptions containing several conjunctions Φ 1 ,...,Φ m with a common event type T , omitted for brevity, consists in sharing the queue for T across conjunctions. An event in a queue is then tagged by the index k of a conjunction Φ k to indicate that the event has previously been used in a match and delivered for Φ k . Earlier events of that type should then also be tagged with k. Events with tags {1, ..., m} may then be discarded. Also, the portrayed matching algorithm performs an exhaustive search and is thus not efficient; however, it suffices to illustrate the relevant properties and can be represented concisely. More elaborate and efficient matching algorithms exist, which offer the same semantics. A common approach consists in storing partial matches in specialized data-structures to avoid matching a given event multiple times with same events (cf. [START_REF] Eugster | EventJava: An Extension of Java for Event Correlation[END_REF]). In our implementation of FAIDECS and all evaluated algorithms, we make use of the Rete [START_REF] Forgy | On the efficient implementation of production systems[END_REF] matching algorithm.

FAIDECS Decentralized Ordered Merging

One of the simplest and most popular approaches in practice for Total Order Broadcast consists in a sequencer, which orders all events. As long as the sequencer remains available (e.g., through replication), the properties presented

T 1 Λ T 2 T 1 Λ T 2 Λ T 3 T 1 Λ T 2 Λ T 3 Λ ... Λ T k T 1 T 2 T 3 T k T 1 Λ T 2 Λ T 4 T 4
Fig. 2: T 1∧...∧T j denotes the conjunction merger for the respective types [T1, ...Tj] (single instance per type).

Fig. 3: Small-scale FAIDECS merger replication. Dotted ovals are "logical" mergers; circles are processes. L denotes the leader.

earlier hold under respective assumptions on failure patterns. A Consensus-based textbook Total Order Broadcast [START_REF] Hadzilacos | Fault-Tolerant Broadcasts and Related Problems[END_REF] yields the same properties with much better fault tolerance (typically a minority of all processes may fail), yet with a higher overhead. We now present a decentralized solution implementing the same properties, yet with much better scalability characteristics than both and inherently better fault-tolerance than a sequencer-based approach. The solution assumes a distributed hashtable (DHT) or similar mechanism for uniquely identifying a process for a given "role." Lightweight replication mechanisms used for faulttolerance of such roles are discussed separately thereafter.

Conjunctions. We first describe an algorithm focusing on single conjunctions, providing the same properties as that of Figure 1. All processes with conjunctions on a sequence of event types [T 1 , ..., T k ] send their subscriptions to a same process, identified as p j =process( [T 1 , ..., T k ]), responsible for handling all conjunctions on the involved sequence of types without duplicates

2 : [T 1 , ..., T 1 , T 2 , ...] = [T 1 ] ⊕ [T 2 , ...]
The function process relies on a DHT (e.g., a deterministic lookup facility) to deterministically identify such responsible processes, called mergers. Lodged at the root of the thereby created overlay network (see Figure 2) are mergers responsible for individual event types T 1 , T 2 , etc. To ensure the properties with respect to extensions of conjunctions to the right, events undergo an ordered merge by type where a merger p j =process( [T 1 , ..., T k ]) gets events of types T 1 , ..., T k from two processes: those identified as process( [T 1 , ..., T k-1 ]) and process([T k ]). We term processes in the role of subscribers/publishers as clients.

Figure 4 presents the algorithm for merging event types and handling subscriptions corresponding to the merged types. Figure 5

presents the algorithm

Executed by every process pi=process( [T1, ..., T k ]) 1: init 2:

lef t ← process([ T1, ..., T k-1 ]) 3: right ← process([T k ]) 4: subs[pj ] 5: kids[pj ] 6:
initparents() 7: procedure initparents() 8:

Ψ ← Ψ ∈kids∪subs Ψ\ {ρ ∈ Ψ |T(ρ) ∈ {[T1], ..., [T k-1 ]}} 9:
send(con, Ψ ) to lef t 10:

Ψ ← Ψ ∈kids∪subs Ψ\ {ρ ∈ Ψ |T(ρ) = [T k ]} 11:
send(con, Ψ ) to right 12: upon receive(con, Ψ) from pj do 13:

kids[pj ] ← Ψ 14:
initparents() 15: upon receive(sub, Φ) from pj do 16:

subs[pj ] ← Φ\{ρ ∈ Φ | |T(ρ)| > 1}
17:

initparents() 18: upon receive(ev, e) do 19:

for all Ψ = kids[pj ] do 20: if ∃l, Φ ∈ Ψ | ∀ρ = T (e)[l]... ∈ Φ : ρ[e] then

21:

send(ev, e) to pj

22:

for all Φ = subs[pj ] do 23:

if ∃l | ∀ρ = T (e)[l]... ∈ Φ : ρ[e] then

24:

send(ev, e) to pj Fig. 4: Ordered merging for conjunctions: mergers.

Executed by every pi. Reuses enqueue, match, dequeue of Figure 1 1: init 2:

Ψ ← Φ 3: Φ ← ρ1 ∧ . . . ∧ ρm 4: Q[T] ← ∅

5:

send(sub, Φ) to process( T(Φ))

6:

To multicast(e): 7:

send(ev, e) to process([T (e)])

8: upon receive(ev, e) do 9:

if enqueue(e, Φ, Q) then 10:

[e1, ..., e l ] ← match(∅, Φ, Q)

11:

if l > 0 then

12:

dequeue([e1, ..., e l ], Q)

13:

deliver Φ ([e1, ..., e l ])

Fig. 5: Ordered merging for conjunctions: clients.

for client processes. Unary predicates are propagated from subscribers to mergers (line 16, Figure 4), and from mergers to their ancestor mergers in the form of disjunctions (lines 8-11) since a potential match (i.e., compliant with any unary predicates) for any merger or subscriber means a potential match for a parent merger. Forwarding of events received by mergers from their respective parent mergers (lef t) or processes for merged event types (right) happens without interruptions by other events and can be achieved by simple local synchronization.

For simplicity, the algorithm in Figure 5 handles event queues at clients. The use of shared queues on mergers as described at the end of Section 5.1, could lead to savings in global memory overhead by avoiding redundancies. In practice, we have observed that this, however, overburdens mergers, just like a propagation of complete conjunctions instead of only unary predicates to mergers.

Assuming that all subscribers are connected to mergers which are connected to each other before events are multicast, the properties described in Section 4.3 are also met by the algorithm in Figures 4 and5 thanks to the type-ordered merging of events. Covering Agreement and Conjunction Total Order are ensured as processes with a common "prefix" in their conjunctions, which is type-disjoint with any conjoined predicates, will receive the same events for the prefix and in the same order from the corresponding conjunction merger process.

Disjunctions. For disjunctions, we essentially need to solve Total Order Multicast [START_REF] Guerraoui | Genuine Atomic Multicast in Asynchronous Distributed Systems[END_REF] on the event sequences output by conjunction mergers. Using timestamps and extending the conjunction algorithm of Figures 4 and5, order of events is established for clients as needed for disjunctions. More precisely, con- Executed by every pi. Reuses enqueue, match, dequeue of Figure 1 1: init 2:

Ψ ← Φ1 ∨ . . . ∨ Φo 3: Φ l ← ρ1 ∧ . . . ∧ ρm 4: Q l [T] ← ∅ 5:
R ← ∅ 6:

S[T ] ← 0 7:
for all Φ l ∈ Ψ do 8:

send(sub, Φ l ) to process( T(Φ l ))

22:

if k > 0 then

23:

dequeue([e1, ..., e k ], Q l )

24:

deliver Φ l ([e1, ..., e k ]) Fig. 7: Ordered merging for conjunctions and disjunctions: clients.

junction mergers following the algorithm of Figure 6 timestamps all received messages before passing them to clients which do the actual correlation (Figure 7). There is no need for specialized disjunction mergers, which are thus omitted here for simplicity. (If using dedicated disjunction mergers, these can be arbitrarily connected among each other to cover the respective conjunctions.) If processes send timestamps with events, to achieve order of delivery for relations, an event is only enqueued (and correspondingly matched) when a receiving process has received events for all other types in its subscription, and the timestamp of that event is less than all the other respective timestamps of other types. As long as all processes which are multicasting events of the respective types continue to do so, for any receiving process, an event will eventually be enqueued after other events with lower timestamps of other types. This guarantees that all processes receiving the same events over a set of types will enqueue and thus perform a match on them one by one in the same order.

If there are any processes which multicast events at a slower rate than others, then the approach may not be as efficient with the requirement that each event of a type (before being enqueued) must wait for events of every other type with higher timestamps to be received. To solve this problem for the algorithm in Figure 7, if an event has not been received in some time interval by a conjunction merging process, then an "empty" event e ⊥ may be sent to all processes in subs[p j ], indicating that pending events of other types may be respectively enqueued. Depending on the targeted scenarios (e.g., publication rate, topology) other information such as rates may be used (additionally).

MDM-No Creation and MDM-No Duplication are met as enqueue and match are only performed on received events, and for a given type, only events with a higher timestamp than the last event of that type are further added to the ordered set R and queue Q l . Since an event is never enqueued unless its type exists in the process's subscription, and match is performed over every received event, Admission holds. As in Section 5.2, Event Validity and Conjunction Validity are retained here despite the filtering and discarding of certain events. It is easy to see that the timestamps generated by mergers follow the observed order of event reception, thus respecting Conjunction Total Order. Given that events are compared based on timestamps and merged in order of conjunctions, Disjunction Total Order is also ensured.

Joining. The algorithms presented so far all rely on a consistent set of event queues across all processes with the same composite subscription if any subscription is issued prior to publications. However, this consistency is violated when two such related processes subscribe to an event stream at different times with respect to the multicasting of events. In order to maintain consistency, we thus employ a simple synchronization algorithm between (a) a joining subscriber process, (b) the corresponding conjunction merger(s), and (c) one of the existing subscriber processes with identical conjunctions, if any. This ensures that a joining process starts with a valid state of the respective queues copied from any existing subscriber and does not miss any subsequent events from the merger received also by that existing subscriber after copying the state of its queues.

Fault tolerance. For presentation simplicity, the algorithms described thus far stipulated single processes returned by function process() as responsible for given conjunctions, which obviously provides little fault tolerance. In FAIDECS, process() returns a small fixed number of processes; i.e., the underlying DHT determines a set of replicas for such merger roles. A membership layer monitors the merger processes and ensures that their membership is consistent. Figure 3 provides an overview of the replication. A role, or "logical" merger process, is represented by 3 replicas which are contoured by a dotted line. L represents a leader process which determines the order between the merged types and communicates that order (only) to its peers. These receive the actual events independently as depicted in the figure. When a physical merger process (solid circles) p i fails, its descendant(s) connect to one of p i 's peers. To ensure that no events are missed in the meantime, all replicas regularly acknowledge received and forwarded events to each other; events prior to such acknowledgements are buffered. If a process lags or fails, its peers will attempt to replace it. Using majority-based voting, a minority of (suspected) process failures can typically be tolerated at a time. In addition to benefitting fault tolerance, this smallscale replication also benefits load distribution, in that down-stream processes, including subscribers, distribute uniformly over the replicas.

Evaluation

To demonstrate the scalability of our decentralized algorithms and explore overall performance benefits and tradeoffs, we compare a Java implementation of FAIDECS to the algorithm of Figure 1 with 3 different JGroups-based3 implementations for the Total Order Broadcast black box: (1) a sequencer algorithm, (2) a replicated sequencer (3 replicas) and (3) a token-based algorithm. Figure 10 summarizes our findings. An extended version of this report [START_REF] Wilkin | Fair Decentralized Event Correlation with FAIDECS[END_REF] presents further descriptions and results.

Metrics and Experimental Setup

We used two metrics -Throughput: the average number of events delivered per second by a subscriber, and Latency: the average delay between the multicasting time of an event and its delivery to a subscriber. The number of subscribers was increased from 10 to 600, and each subscriber had a randomly generated set of subscriptions. Each event consisted of 3 integer attributes with values chosen uniformly at random within [0..1000]. All processes were run on 65 nodes in a LAN. Each node is equipped with an Intel Xeon 3.2GHz dual-core processor and 2GB RAM, and runs Linux. A maximum of 15 subscriber processes were run on a single node. The maximum multicast rates varied by setup (e.g., different components became the bottleneck, selectivity of subscriptions varied). We tested scalability of FAIDECS first in terms of conjunctions and then disjunctions.

For conjunctions, we used 3 different distributions of subscriptions, which led to different workloads for actual routing and filtering of events. In scenarios A and B, we followed the setup of Figure 8, increasing the maximum number of conjoined types (and thus the depth) k from 2 to 4. For scenario A, all filtering occurred at end nodes rather than in mergers through the selectivity of binary predicates, which differed across conjunctions to achieve the same expected delivery rates at all subscribers in a respective level. This scenario demonstrated the limits of the overlay. In scenario B, events were filtered at the mergers through unary predicates propagated upwards from subscriptions, allowing higher aggregate multicast rates than in scenario A. Scenario C invariably had 4 event types, and subscriptions were over all 6 possible conjunctions ( 42 ). This allowed us to explore the potential of traffic separation. For evaluating scalability with respect to disjunctions, we used scenario D, which is the merger overlay shown in Figure 9. The maximum level was also varied (from 2 to 4). Subscribers were uniformly distributed across all merger processes and throughput/latency values were averaged for each group of subscribers for a given level.

We expect that the bottleneck in our decentralized algorithms would occur at the merger process(es) which would merge all involved types, limiting throughput consistently for all k. All values are normalized with respect to the values obtained with FAIDECS with 10 subscribers connected to a single merger for 2 types in scenario A, and with respect to the relations with the largest number of types (independent of the algorithm). Throughput here was approximately 31,400 events/s and latency 150ms. Normalization does not introduce any bias but makes comparison clear, so that values could be reported independent of subscriptions, and so that values may be reported for each level independently.

T 1 T 2 T 1 Λ T 2 T k T 1 Λ T 2 Λ T 3 Λ ... Λ T k T 1 T 2 T 1 V T 2 T 3 T 4 T 3 V T 4 T 5 T 6 T 5 V T 6 T 1 V T 2 V T 3 T 3 V T 4 V T 5 T 2 V T 5 V T 6 T 1 V T 2 V T 3 V T 4 T 2 V T 4 V T 5 V T 6 T 1 V T 3 V T 5 V T 6 Level 2 Level 3 Level 4 Level 1
Fig. 8: Setup for conjunctions (scenarios A and B).

Conjunctions

Figure 10(a) displays the trend in throughput as the system scales to more subscribers in scenarios A and B with varying number of event types/levels k (see Figure 8). FAIDECS scales very well compared to the approaches shown in Figure 10(b), shown separately for a clear relationship among the three implementations since the values start at nearly 3% (about 950 events/s) and remained consistent in all scenarios. Note that IP-multicast was turned off in the test environment which could help throughput for both FAIDECS and the JGroup implementations. In Figure 10(b), the token-based algorithm starts with a higher throughput than the sequencer-based one as there were few multicasters competing over the token, but its performance degrades faster due to the inherent cost of its high fault tolerance. Replication helps performance in both FAIDECS and the replicated sequencer due to the load balancing of replicas of a same logical merger process, though less and with an initial cost for the replicated sequencer. The total throughput remained approximately the same in scenarios A and B since propagation of events by mergers was the bottleneck.

Figure 10(c) illustrates the scalability and the high throughput of FAIDECS when subscriber interests are in largely disjoint types, following scenario C. Thus, FAIDECS scales very well with the addition of an arbitrary number of types to a system, even with transitive correlation across them as in scenario C, given enough merger process nodes to support them -the high throughput (about double that of two types for scenario A) occurs because every merger only handles relatively few subscribers compared to the other scenarios.

Figure 10(d) reports the latency of our algorithms for scenario A. As expected, increased depth (conjunctions with increasing number of types) leads to increased latency. Here the "depth" k is fixed to 4, but latency is reported independently at different depths. The observed latency, averaged over all subscribers within each level, was approximately the same with replicated and non-replicated mergers.

Disjunctions

Figure 10(e) compares the scalability of FAIDECS with respect to throughput in scenario D. The 3 curves represent different depths of the hierarchy (between 2 to 4 levels). For each curve, the throughput is averaged at the respective level. We observe that the impact on throughput is minimal when the disjunctions are made more complex. As shown in Figure 10(f), the latency for 4 types improves slightly. This is because disjunctions provide more than one possibility for event delivery, and the system is no longer throttled by the rate of the slowest upstream process as with conjunctions.

Conclusions

We have presented decentralized algorithms for event correlation implemented in FAIDECS. Our algorithms provide clear properties, hinging on a novel notion of subscription subsumption tailored to correlation. The same properties can be achieved by less specialized solutions such as sequencer-based schemes, yet our solutions are inherently more scalable and reliable, leading to strong properties with practical performance; our solutions are also more scalable than peer-based approaches, e.g., relying on tokens, while still achieving practical fault-tolerance. We are currently exploring extensions of our algorithms and additional properties (e.g., causal order).

  e 1 , ..., e n ] = Φ[e 1 , ..., e n ] ∨ Ψ[e 1 , ..., e n ] (T)[e 1 , ..., e n ] = true (ρ ∧ Φ)[e 1 , ..., e n ] = ρ[e 1 , ..., e n ] ∧ Φ[e 1 , ..., e n ] ( )[e 1 , ..., e n ] = true

5 :

 5 To multicast(e): 6: to-broadcast(e) 7: function match ([e 1 , ..., e n ], Φ, Q) 8: T ← Tn+1 | T(Φ) = [T1, ..., Tn+1, ...] 9:l ← max(j | Q[T] = e1 ⊕ ... ⊕ ej ⊕ ... ⊕ e h ) | ∃k ∈ [1..n] : ej = e k 10:

24 :

 24 dequeue([e1, ..., e k ], Q l ) 25: deliver Φ l ([e1, ..., e k ]) 26: function enqueue (e, Φ, Q) 27: win ← max(j | ∃...T (e)[j].a... ∈ Φ) 28: if ∀j = 1..win ((∃ρ = (T (e)[j].a op v) ∈ Φ | ¬ρ[e]) ∨ (∃(ρ = T (e)[j].a op T (e)[j].a ) ∈ Φ | ¬ρ[e])) then (e)] ← Q[T (e)] ⊕ e 32: return true 33: procedure dequeue([e1, ..., em], Q) 34: for all Q[T] = ... ⊕ e k ⊕ e ⊕ ..., k ∈ [1..m] do 35: Q[T] ← e ⊕ ...

Fig. 1 :

 1 Fig. 1: Conjunctions/disjunctions with Total Order Broadcast.

Fig. 6 :

 6 Fig. 6: Disjunction-enabled ordered merging for conjunctions: mergers.

Fig. 9 :

 9 Fig. 9: Setup for disjunctions (scenario D).

  Scenario D latency for disjunctions.

Fig. 10 :

 10 Fig. 10: Comparing conjunction/disjunction algorithms to a sequencer based approach.

  e 1 , ..., e n , e k ] then

			19: upon to-deliver(e) do
			20:
	13: 14:	else	return [e 1 , ..., e n , e k ]
	15: 16:	E ← match([e 1 , ..., e n , e k ], Φ, Q) if E = ∅ then
	17:		return E
	18:	return ∅

  [e1, ..., e k ] ← match(∅, Φ l , Q l )

		11: upon receive(ev, e, ts) do
		12:	if ts > S[T (e)] then
		13:	S[T (e)] ← ts
		14:	R ← { e , t ∈ R | t < ts}
		15:	R ← { e , t ∈ R | t > ts}
		16:	R ← R ∪ { e, ts } ∪ R
		17:	for all e , t ∈ R ordered on t |
	9: To multicast(e): 10: send(ev, e) to process([T (e)])	18: 19: 20:	t < min T (S[T ]) do for all Φ l in order do if enqueue(e , Φ l , Q l ) then R ← R\{ e , t }
		21:

We could use different mergers but deduplication simplifies the algorithm.

http://www.jgroups.org

Financial support by NSF grants 0644013 and 0834529, DARPA grant N11AP20014. Any opinions, findings, conclusions, or recommendations in this paper are those of the authors and do not necessarily reflect the views of NSF or DARPA.