<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Event-driven Reactivity: A Survey and Requirements Analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kay-Uwe Schmidt</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Darko Anicic</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roland Stuhmer</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>FZI Forschungszentrum Informatik</institution>
          ,
          <addr-line>Haid-und-Neu-Stra e 10-14, 76131 Karlsruhe ~</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>SAP AG, Research</institution>
          ,
          <addr-line>Vincenz-Prie nitz-Stra e 1, 76131 Karlsruhe ~</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Despite the huge popularity of event processing nowadays, there is a big gap between the potential usefulness of event-driven processing and the current state of the practice. One of the main reasons is the lack of a comprehensive conceptual model for the event-triggered reactivity and the corresponding framework for its management. In this paper we survey the current state of the art in event-driven architecture with special focus on event and action processing. We describe the prerequisites of a completely novel conceptual model for describing reactivity that is more close to the way people react on events: based on the ability to identify the context during which active behavior is relevant and the situations in which it is required. This approach opens a completely new view on the event processing as the way for managing a very valuable knowledge asset of every enterprise - knowledge how to react (make decisions) in event-driven situations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Event-driven processing becomes ever important in various application domains,
ranging from traditional business applications, like supply-chain management, to
the entertainment industry, like on-line gaming applications. The market value
should increase tenfold by 2010 and should reach something like $4bn in total
(source: IBM). The most relevant market research companies, like Gartner or
Forrester3 predict the key role of even-driven processing for making business
more agile. Indeed, the main bene t of "eventizing" business systems is that
event processing introduces a kind of reactive dynamics in the system, that
enables active responding on signals sensed/derived from the context (internal,
external), which the system is functioning in. Obviously, such kind of reactivity,
which we call event-triggered reactivity (EtR), opens great opportunities for
system/process improvements.</p>
      <p>However, despite considerable research e orts put in this domain, the current
development is just a top of the iceberg regarding the theoretical usefulness of
3 cf. Forrester research: "CEP (complex event processing) Adoption Is Broader,</p>
      <p>Deeper, And More Business-Driven Than IT May Expect", January 31, 2008
event processing. One can nd many causes for this "problem" (like lack of usable
tools, editors, standards, ...) but in the nutshell of the problem is a kind of the
de ciency in dealing with the ad-hoc nature of events, i.e. unpredictable (but
controlled) appearance of events. Unpredictability means that, for example, we
don't know in advance when an event will be issued, but we know that such
an event can appear. In that sense, we usually don't know exactly, in advance
how we will react on an event, but we know that we will react. Indeed, we
design an event so that it triggers reaction, but we react dependently on other
circumstances (e.g. whether a server went down during working hours or not). In
fact, an event triggers reaction and these "other circumstances" determine the
reaction. More interestingly, we can react on the same event in di erent ways,
since these "other circumstances" are di erent.</p>
      <p>Therefore, the main problem in current approaches is that the level of
abstraction used in representing events and conditions is too low. It requires too
much puzzling (of events) without having any more abstract commonality
between events (analogy is using only the form of puzzles as the feature to nd the
next suitable puzzle: really, it is a hard work if all puzzles are black and every
puzzle has unique form). If the events we are dealing with are more complex,
the possibility/easiness to build useful applications is higher. On the other side,
people are processing events in another (more abstract) way: they are reacting
on situations according to the context. A central issue in our reactivity (and in
general in reactive and proactive systems) is the ability to identify the context
during which active behavior is relevant and the situations in which it is required.
The concept of situation is an extension of the concept of composite event in its
context awareness capability; it results in additional expressive power, exibility
and usability. The main point is that puzzling events (and actions) in complex
structures can be done now by using this abstract description as an additional
feature, which certainly alleviates the whole process.</p>
      <p>In this paper we provide a survey and requirements analysis for handling
the event triggered reactivity. We distinguish the analysis between a non-logic
and logic-based view on handling the event triggered reactivity. The non-logic
view does not consider formal (logical) representation of elements in reactive
rules. On the other hand, the logic-based approach follow the line of thinking
that semantics of complex relationship in both a single reactive rule and ruleset
should be described formally. In this way, a control mechanism for an automated
execution in reactive systems is established by means of logic. Furthermore we
distinguish the analysis between event processing (i.e., change detection) and
action processing (i.e., reaction on change).</p>
      <p>Sections 2 and 3 recap the state of the art (for event and action
processing, respectively) in event-triggered reactivity. Section 4 derives requirements
for handling Event-triggered Reactivity. Section 5 gives an outlook of our future
plans.</p>
    </sec>
    <sec id="sec-2">
      <title>Event Processing</title>
      <p>
        Complex Event Processing (CEP) and Event Stream Processing (ESP)
Complex Event Processing and Event Stream Processing (ESP) are two elds of
research concerned with the handling of events. Traditionally the elds tried
to solve di erent problems in event processing using di erent approaches. The
next paragraphs will outline these approaches, as they are seen e.g. by David
Luckham in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and by others.
      </p>
      <p>Events may happen in a stream or in several streams, a cloud. The eld of
ESP is concerned with extraction of events from a stream. Thus ESP handles
events that are totally ordered by time. Further emphasis of ESP lies on e ciency
for high throughput and low latency. Processing is done by analyzing the data of
the events and selecting appropriate occurrences. Long-running queries produce
results regularly; an analogy may be drawn to signal processing.</p>
      <p>CEP, on the other hand, is more focused on complex patterns of events.
To detect these patterns CEP takes more time and memory than ESP. CEP
is concerned with clouds of events, which yield only a partial temporal order
of events. Other partial orders of interest for CEP are causality, association,
taxonomy, ontology. Rather than to signal processing, an analogy may be drawn
to higher level situational inferencing, in comparison to ESP.</p>
      <p>
        However, because CEP and ESP nowadays adopt each others approaches, the
two worlds become mingled and sources as [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] declare them one and the same
eld.
2.1
      </p>
      <sec id="sec-2-1">
        <title>Non-logic-based Approaches</title>
        <p>
          Early event speci cation languages were developed for active databases [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. They
use complex event speci cations to facilitate database triggers which do not only
listen to simple events but observe complex combinations of events until the
trigger procedures are executed.
        </p>
        <p>Simple events carry a type, their occurrence time and possibly other
parameters that can be used in data analysis to help in detecting event patterns or be
part of a computation after detection. Building on the event types one can create
complex nested expressions, using operators like And, Or, Sequence, and others
that have been proposed since the start of CEP in the 1990s. Complex event
speci cations are patterns of events which are matched against the streams of
events that occur during the run-time of the system. These patterns consist of
simple event types and event operators. Simple events are the basic events the
system can detect. Complex events are detected from occurrences of one or more
of them. All simple events have a simple event type, which for a database
application might be insert, update and delete. The types are used as placeholder in
event patterns.</p>
        <p>Event patterns are structured by event operators. A given operator might
have several event types as arguments and e.g. stipulate that the constituent
events must occur in sequence. An event detector for the given pattern
functions as a stream pattern matcher and listens for events that satisfy the type
constraints and together satisfy the semantics of the given operator, e.g.
occurred in sequence. Many operators were proposed in the past and the following
paragraphs discuss several event pattern languages and their operators. Usual
operators o ered by many languages include disjunction, sequence and
accumulation.</p>
        <p>
          One early active database system is HiPAC [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. It is an object-oriented
database with transaction support. HiPAC can detect events only within a single
transaction. Global event detectors are proposed which detect complex events
across transaction boundaries and over longer intervals, but no further details
are given. Ode [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] is another active database system with a language for the
speci cation of event expressions. The language is also referred to as Compose. Ode
proposes several basic event operators and a large amount of derived operators
for ease of use and shorter syntax. The last of the classical event speci cation
languages discussed here is Snoop [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] and its successor SnoopIB. Snoop provides
the well known operators And, Or, as well as Sequence. The remaining
operators are: Not, Any, A, A*, P, P* and Plus. Early work on Snoop views events
as having instantaneous occurrences. This also holds true if an event is complex
and its constituents span an interval of time. As a result the time of detection
is used for the occurrence, instead of the interval from the start of the rst
constituent event to the end of the last constituent event. Consideration of only the
time of detection is termed detection-based semantics. It poses problems with
nested sequences as pointed out in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. Interval-based semantics for Snoop is
called SnoopIB and was rst published in 2006 [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <p>Selection and consumption of events de ne which occurrences participate in
a complex event. Both terms are an integral part of the semantics of an event
de nition. Selection de nes the choice of events if there are more than one event
of a required type that have not yet been consumed. Consumption is concerned
with the deletion of events when they cannot be part of further complex events.</p>
        <p>Other approaches to event pattern languages include statements reminiscent
of SQL. Two examples are StreamSQL4 and Continuous Computation Language
CCL5. Queries in these languages match patterns in streams instead of database
tables. Queries are long-running and produce incremental results in contrast
to SQL queries. In CCL sliding windows are supported, joins are possible to
form complex events and patterns may be speci ed using the operators
conjunction, disjunction, sequence and negation. All operators can only be applied to
bounded windows of events. Complex events have to adhere to SQL schemata
which prohibits nested sets, for example an events that includes a previously
unknown number of constituents. Although the well known syntax of SQL might
help with the adoption of these languages, a seamless integration of an action
part seems hard to accomplish. None of these approaches so far interact with
the business vocabulary. They also do not consider the context of events and the
relationship between events and actions.
4 http://streambase.com/developers/docs/latest/streamsql/index.html
5 http://www.coral8.com/system/ les/assets/pdf/5.2.0/Coral8CclReference.pdf</p>
        <p>Many of the aforementioned event languages belong to their respective database
management system, or prototype thereof. Three of them are described here,
which have noteworthy implementation details: The Ode approach conducts
complex event detection by using automata. SAMOS uses colored Petri nets.
Sentinel uses a graph based approach.</p>
        <p>
          Complex event detection in Ode [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] is implemented using automata. Input
for the automata is a stream of simple events. Ode thus transforms complex
event expressions into deterministic nite automata. For sub-expressions which
are complex events themselves, the process is done recursively. Atomic simple
events are ultimately represented as automata of three states; a start state, an
accepting state, entered upon detection of the simple event occurrence, and a
non-accepting state, entered upon detection of any other simple event. Apart
from providing the implementation, automata are a convenient model to
dene semantics of complex event operators. A downside of automata is that an
automaton cannot accept overlapping occurrences of the same complex event.
Also event parameters pose a problem. They are either stored outside of the
automaton, or the automaton is increased greatly in the number of states to
accommodate the di erent parameters and possible values thereof.
        </p>
        <p>
          Complex event detection in SAMOS [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] is implemented using Petri nets.
Each primitive event type is represented by a Petri net place. Primitive event
occurrences are entered as individual tokens into the network. Complex event
expressions are transformed into places and transitions. Where constituent events
are part of several expressions, duplicating transitions are used to connect the
simple event with the networks requiring it. This results in a combined Petri net
for the set of all event expressions. Petri nets, like automata provide a model of
the semantics of event operators. Also the detection of overlapping occurrences
is possible. Event parameters are stored in tokens and ow through the network.
Although the tokens are individual, there is no mechanism to deterministically
choose a token if there are more than one in a single place.
        </p>
        <p>
          Sentinel [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] is an active object-oriented database implementing complex
event detection for the Snoop operators. Event detection follows a graph based
approach. The graph is constructed from the event expressions. Complex
expressions are represented by nodes with links to the nodes of their subexpressions,
down to nodes of simple events. Event occurrences enter the bottom nodes and
ow upwards through the graph, being joined into composite occurrences. The
graph is a directed acyclic graph and generally does not form a tree for two
reasons: nodes may have several parents, when their represented expression is
part of more than one complex events, and secondly there is no single root node,
when there is no overarching, single most complex event. A possibly conceived
drawback of Snoop compared to the previously mentioned implementations is
that the data structures of Snoop do not represent and even clarify the semantics
of the event expressions. The logic of Snoop is hidden in the implementation of
each graph node. However the semantics of Snoop is de ned externally, using
event histories and describing the operators as mappings from simple event
histories to complex event histories. Furthermore Snoop de nes the selection and
consumption of simple events for the concurrent detection of overlapping
complex events. The four alternative de nitions, Recent, Chronicle, Continuous and
Cumulative context were described earlier.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Logic-based Approaches</title>
        <p>In order to capture relevant changes in a system and respond to those changes
adequately, a number of logic-based reactive frameworks have been proposed. It
is a challenge to ensure that a reactive system handles changes (events) properly
and in an automated manner. By handling changes it is meant that a
reactive system undertakes certain actions (reactions) which can be seen as an act of
change propagation. In general, an action changes the state of the system or
triggers a new event (more details about actions are given in Section 3, particularly
Section 3.2). Therefore it is a question how to e ectively control the whole
reactive system, i.e. how machines can keep executing certain activities, ensuring at
the same time the system consistency. In order to achieve this goal, logic-based
reactive approaches combine a reactive system (e.g., Event-Condition-Action
system) with deductive capabilities of a particular logic.</p>
        <p>
          IBM has been developed an event processing tool available in IBM Tivoli
Enterprise Console. The engine is capable to processes complex events and
executes Event-Condition-Action rules. The Prolog programming language [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] is
used as an underlying formalism for specifying events, event lters, and actions.
        </p>
        <p>
          A Logic Programming (LP) routed approach for dealing with events has also
been proposed in [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]. More precisely, deductive rules are utilised for creating
implicit events. Motivation to use datalog-like rules, extended with strati ed
negation was justi ed there by a number of reasons. First, rules serve as an
abstraction mechanism and o er a higher-level event description. Rules allow
for an easy extraction of di erent views of the same reactive system. Rules are
suitable to mediate between the same events di erently represented in various
interacting reactive systems. Finally, rules can be used for reasoning about causal
relationship between events.
        </p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] a homogeneous reaction rule language was proposed. This approach
combines complex event and action processing, formalisation of reaction rules in
combination with other rule types such as derivation rules, integrity constraints,
and transactional knowledge updates. Motivation to use logic in reactive systems
is also justi ed there with the need to correctly and e ectively process the
eventbased behavioural and semantics of reaction rules. However one drawback of this
approach is the query based complex event processing (the same issue holds for
[
          <xref ref-type="bibr" rid="ref13">13</xref>
          ]). In order to simulate active behaviour of ECA systems with passive Logic
Programming based systems, the complex event processing in above mentioned
approaches, is realised by frequently issued queries. For instance, a complex event
pattern is encoded as a query and issued periodically. If such a query retrieves an
answer, the system identi es that as an occurrence of a corresponding complex
event. The complex event is than used for selecting ECA rules that need to be
executed. The query based complex event processing realised with passive LP
systems are not capable to identify complex events as soon as they emerge, but
at the time when a corresponding query is processed. This issue may have certain
implications with respect to the intended semantics of complex ECA rules.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Action Processing</title>
      <p>Although event processing is a major part in event-triggered reactivity there is
more to it: actions. Action processing is the task of executing actions triggered by
events in well-de ned contexts and situations. This section deals with non-logic
and logic-based approaches of triggering actions caused by events.
3.1</p>
      <sec id="sec-3-1">
        <title>Non-logic Based Approaches</title>
        <p>
          Many active database systems not only specify an event language but also a
reaction rule language. Reaction rules such as Event-Condition-Action (ECA)
rules complement the event speci cation with a condition to be evaluated upon
event occurrence and a corresponding action to take. The term ECA rule was
rst used in conjunction with the HiPAC active database [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. ECA rules are a
generalization of several methods to achieve active behavior, such as triggers and
production rules, which had been in prior existence but treated separately. The
ECA rule approach divides the rule execution in three parts, event, condition
and action handling. The parts are processed concurrently but work with di
erent input. Event processing deals with transient input, i.e. the events. Although
events are objects, they are usually not made persistent but are used in an
online, real-time fashion to deduce complex observations and thereby consume the
less-re ned input. The output from the event detection is knowledge about
complex distributed incidents happening in a system. This knowledge incorporates
the information from individual events in an accumulated fashion. Conditions,
on the other hand, deal with persistent data or knowledge. They may be viewed
as queries to a database or a knowledge base. Although the outcome of conditions
may change over time, the condition evaluation generally deals with long-lived
data, which unlike events may not be time-dependent.
        </p>
        <p>Many reaction rule languages have been proposed in the past. Not all obey
the separation of event, condition and action speci cations. Computational issues
have been identi ed early. Large amounts of memory and computational e ort
may be wasted on the detection of events which are subsequently discarded when
corresponding conditions are not met. This led many language designers to dilute
the event and condition parts. Contrary to a declarative approach it is then up
to the rule author to revise events expressions for run-time e ciency.</p>
        <p>
          Ode [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] for example, promotes so-called EA rules, instead of ECA rules, where
the conditions are folded into the event speci cation. This is done by mixing
event expressions with lters. These lter predicates can impose conditions on
events in order to discard occurrences early. Thereby the deleted occurrences do
not use further resources or become part of complex events which will not be
needed.
        </p>
        <p>
          Similarly the logical language ADL [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] has (EC)*A-rules. Like the event
masks in Ode the language tries to achieve ner granularity by mixing event
and condition speci cations.
        </p>
        <p>
          Production systems execute rules also termed productions based on the
evaluation of some conditions. The most often used algorithm in production systems
is RETE. RETE is designed by Charles Forgy and described in [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. It is a
forward-chaining algorithm for evaluating production rules (PRs)6. Production
rules are traditionally used in conjunction with a working memory. The working
memory is a potentially large set of objects or values or objects which may be
referenced in the conditions of rules. Actions are red when a condition becomes
true.
        </p>
        <p>However, conditions can be expensive to evaluate; a large working memory
requires a lot of elements to be taken into consideration, and complex conditions
require nested checks to be performed. Once a single element in the working
memory is added, changed or deleted, the conditions of many rules may change
their outcome. In the worst case every rule must be reevaluated. The RETE
algorithm remedies this situation by introducing state-saving of the evaluation
process between changes to the working memory. The condition evaluation needs
not to be fully recomputed. This is accomplished by dividing the conditions into
a hierarchical network of nodes, each doing a single comparison, lter operation,
join, etc. Every node has a so-called memory which stores the objects that ful ll
the constraints of its node. When an object is changed, the network does not
need to be completely re lled, but only the changed object is re-fed into or
removed from the network. A classic RETE network is divided into two parts;
the rst, called the alpha network, contains nodes with one input edge. These
nodes perform lter operations using single conditions or constraints. The second
part, the beta network, contains nodes with two input edges, joining objects from
two subordinate nodes. A third type of node exists that models the top nodes.
The rule actions are attached to these nodes.</p>
        <p>
          The Rete algorithm has two successors: Rete II and III but they have not
been published. There are other optimized algorithms based on Rete, TREAT
[
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] and LEAPS [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] being two examples. Variations on Rete are implemented
in many current rule engines.
3.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Logic Based Approaches</title>
        <p>The action part in reaction rules may additionally be described in a formal
way (using a particular logic). The formal description, does not help only in
controlling the execution of actions, but also allow for reasoning over complex
actions7.</p>
        <p>
          A homogeneous reaction rule language [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] is a language for extended ECA
rules (not only for CEP) implemented in a logic framework. Moreover the
lan6 Production rule (PR) is also called a condition-action (CA) rule.
7 Complex actions in general case may implement non-trivial procedures such as
business work ows.
guage is extended with Reaction RuleML, as a platform independent rule
interchange format, and rule serialization in XML. The speci cations of event,
condition and action are strictly separated. More precisely rules are expressed
as tuples (T, E, C, A, P, EL), consisting of T time, E event, C condition, A
action, P post condition and EL contingency action, "else". Parts might be left
blank, i.e. always satis ed, stated with " ", e.g., (T, E, , A, , ). Blank parts
might be completely omitted, leading to speci c types of rules, e.g. standard
ECA rules: (E, C, A), or extended ECA rules with post conditions ECAP: (E,
C, A, P). Event speci cations of the homogeneous reaction rule language follow
the Snoop [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] operators, rede ned with an interval-based semantics. Di erent
consumption policies are mentioned but do not seem to adhere to the Snoop
consumption modes Recent, Chronicle, Continuous and Cumulative.
        </p>
        <p>
          The need to declaratively describe the action component in an ECA rule
has also been recognised in [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ]. Particularly Calculus of Communicating
Systems (CCS) [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ] was chosen to formally specify complex actions, and reason
about their behavioural aspects. As a part of the Process Algebra family, CCS
is suitable for the high-level description of interactions, communications, and
synchronizations between a collection of concurrent processes, and hence an
appropriate mechanism for reactive systems in general. Although CCS is by no
means powerful formalism, its use in practical world is still limited. There
remains a huge gap between the model and the code, i.e., between the speci cation
of desired behaviour and the program that implements it [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ].
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Requirements for Handling Event-triggered Reactivity</title>
      <p>Based on the survey of state-of-the-art in event-triggered Reactivity we derived
several challenges as requirements for future systems leveraging the full potential
of event-triggered reactivity.
4.1</p>
      <sec id="sec-4-1">
        <title>Non-logic-based Requirements</title>
        <p>
          Table 1 shows a summary of todays open issues in non-logic-based event
processing. Furthermore, Rete was designed for evaluating production rules (CA rules)
only. Considering ECA-like rules, the event detection also needs to be
considered. ECA rules are triples of event, condition and action speci cations. The
rules are red, when the corresponding event has occurred, only if the condition
is ful lled. The event may be a complex event speci cation. Instead of
managing events and conditions separately, the two should be integrated into the Rete
network, extending it for temporal data and therefore event processing. This has
been proposed in [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ] but no results have been published.
        </p>
        <p>
          Events are manifested in rst class objects. Objects provide a straight-forward
facility to store parameters and other data about the event, and propagate them
through the detection process. To process events, Rete could be extended with
new nodes that handle events instead of working memory elements. Events may
be ltered and joined according to event speci cations (similarly as working
- detection only within (prede ned)
windows
- no notion of contexts and situations
- non-declarative mix of event and condition [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]
- no notion of contexts and situations
Snoop, SnoopIB - missing integration of actions
        </p>
        <p>- no notion of contexts and situations
StreamSQL,
- not extensible for actions, ECA
memory elements are ltered and joined according to the condition speci
cation). Complex events and complex conditions may be joined to re rule actions
on activation of the join node.</p>
        <p>The integration has several advantages. No separate data structures are
needed for graph based event detection and the Rete network. Also computation
cycles and memory is saved by consuming events earlier, when corresponding
conditions are not ful lled: Conditions have to be positively evaluated during
the detection interval of an event. Therefore when a condition is not satis ed,
no constituent events need to be collected for that event. Such an
implementation retains the separation of event, condition and action in a purely declarative
language but bene ts from a resource-saving internal execution.</p>
        <p>
          Mixing events and conditions on the language level may be supported, if
needed. This allows for events that are masked by a condition, such as the mask
construct in the ODE language [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] or (EC)*A rules in the ADL language [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] (see
Table 1). Instead of joining highly complex events and conditions this is done
at arbitrary levels of the network. Such masked events do not occur while their
associated condition expression is not ful lled. Furthermore, mixing event nodes
and condition nodes enables conditions to see constituent event occurrences and
include them in their evaluation, i.e. join operation. This way the condition part
of a rule can be dependent on the occurrences detected in the event part.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Logic-based Requirements</title>
        <p>
          Event-condition-action and production rules are considered as an appropriate
form of rules for programming systems which need to detect changes and
respond on them automatically. However in general case, their use may be very
unpredictable with respect to their intended semantics [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ]. In general case,
execution of an event may trigger other events, and these events may trigger even
more events. There is neither guarantee that, such a chain of events will
terminate, nor that states (through which a reactive system passes) are valid, i.e.
termination problem. Further on, two reactive rules with the same execution
priority may lead the system to two di erent states of the whole system. The
system cannot be in two states at the same time. Therefore a rule base needs
to be con uent (i.e., two rules triggered in an initial state lead the system, not
to two, but to a single nal state, regardless of the order which any subsequent
simultaneously triggered rules are selected for ring). The next issue is the rule
ordering (i.e., two rules may produce di erent e ects if the rst rule is scheduled
before the second and vice versa). Termination, con uence, ordering, and
similar issues have been recognised and extensively discussed in the area of Active
Databases [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Currently logic-based approaches lack a comprehensive framework
capable to deal with these issues.
        </p>
        <p>
          Apart from classical concepts in event-triggered reactive systems (i.e., events,
conditions and actions), those systems should also consider new notions -
situations and contexts. In many cases there is a gap between current reaction rules
that enable reaction to an (atomic or complex) event, and the reality, in which
reaction is relevant only in a certain context in response to patterns over reaction
histories [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ]. As event-driven reactive systems act autonomously, a central issue
is the ability to identify that context during which active behaviour is relevant
and the situation in which it is required.
        </p>
        <p>
          One of advantages of logic-based approaches for handling EtR is (automated)
reasoning service. However this very important feature is limited on reasoning
over one component of reactive rules, i.e. either on events [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], conditions, or
only on actions [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ]). An appropriate formalism for expressing all components of
reactive rules (i.e., events, conditions, actions, but also situations and contexts)
is missing. Such a formalism would allow for reasoning over events, condition
and actions uniformly as well as discovering new relationships between these
constructs w.r.t a given situation and context. Further on, reactive systems are
state-changing systems. Hence instead of a logic that may be used only for
reasoning in one particular state, appropriate EtR processing necessitates a logic
for state-changing reasoning. The purpose of such a logic is to control
statechanging action execution, keeping a reactive system always in a consistent state.
By executing reactive rules, the system changes its states. In this transition,
every state in which the system enters, needs to be a legal state. However if the
inference engine, searching for a possible execution path, enters to an illegal state
such a state-transition should be rolled back. In this way, automated execution
of reactive systems should be also controlled in an automated manner. In this
respect an appropriate logic should be used in implementation of such advanced
reactive systems.
4.3
        </p>
      </sec>
      <sec id="sec-4-3">
        <title>Vision: Event-triggered Reactivity</title>
        <p>
          We envision an holistic approach: Event-driven Reactivity. The unique handling
of the di erent constituents of an event-driven architecture namely events,
actions, conditions, contexts and situations will support the realization of next
generation e cient and manageable event-driven (reactive) applications. It will
rstly decrease the complexity of setting-up/evolving event-driven applications,
that nowadays requires lots of manual work, especially in de ning what an event
is; secondly increase the bene ts (added value) of such applications, which are
currently constrained on the complex monitoring of events; and thirdly open new
possibilities to apply them in highly dynamic and distributed environments. This
vision will be realized through the following set of requirements:
{ E cient modeling of the sense-and-respond (reactive) nature of a system,
especially its contextualization
{ Comprehensive management of the reactivity life cycle of a system, including
automatic discovery of relevant situations, e cient detection of events and
reasoning about actions
{ E cient implementation of the reactivity life cycle management
In fact, we argue that the ECA (event-condition-action, such as it is) model is too
simple presentation of the (intelligent) event processing nature which results in
the already mentioned insu ciencies of event processing applications.
Additionally we argue that the role of an e cient context detection process is inevitable
for the e cient event processing and is totally neglected in the literature.
Consequently, we argue that a uni ed mechanism for formal representation of all
phases in the reaction cycle is needed for e cient and complex event processing
[
          <xref ref-type="bibr" rid="ref27">27</xref>
          ]. In fact, we can go a step further and say that by using a richer conceptual
model for describing reactions on events, we are not any more talking about
simple processing of events, but rather about the management of a very valuable
knowledge asset of every enterprise (system), i.e. knowledge howto react (make
decisions) in event-driven situations8.
8 Note that traditional ECA rules are not very suitable for the description of knowledge
assets since they describe only a part of relevant knowledge. Indeed, if we consider
a rule "ON three servers clashes within one hour IF during workhours DO rescue",
then it codes just the "basic" knowledge, or the simplest knowledge related to the
particular situation. Much more interesting would be rules with more details, like
"ON three servers clashes within one hour IF during workhours and already tried
methods are rescue#1 before rescue#2 DO rescue#3", which can be provided by
our model. Additionally, the rules are too coarse grained to be e ciently reused.
        </p>
        <p>Note that having context as a rst class citizen in the event processing is
currently completely missing in the literature for event processing.
Nevertheless, context-based event processing is the next "big thing" and should shape
the future of the computing, as given in the recently issued Gartners visionary
view, depicted in Figure 1. The graphics estimates Context-Driven Architecture
(CoDA) as the most promising paradigm that will extend SOA.</p>
        <p>Reasoning about situations and context opens new possibilities for
eventtriggered reactivity. If we would have situations as formal logic models, then
some very interesting reasoning services can support the whole event processing.
For example, we can de ne two situations as con icting to each other and try to
avoid running the whole system in such a state. The system can check formally
the consistency of the system and backtrack if a con ict (meaning inconsistency
in the system) is to appear. It can help us to optimize reactions on situations.
Another service would be the synchronization of situations if we consider that
two or more reactions will run in parallel, which is a quite natural assumption
in the rich-event systems.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Future Work</title>
      <p>In the future we intend to develop a new conceptual model and architecture
of event-triggered reactivity (EtR) that will resolve drawbacks of existing
approaches for modeling reactivity, by introducing novel concept (situation and
context) and its formal, logic-based representation. Moreover we will develop
a model for managing the whole life cycle of EtR, including: a) Language for
modeling EtR concepts (e.g. situations, context), user-friendly editor based on
pattern modeling metaphor, as well as methods for ensuring the consistency9
of such a rule base and its interoperability with other reactive systems; b) New
methods and tools for the automatic discovery of complex event and situation
patterns from stream data by taking into account their evolution as well; c) New
algorithms for scalable ECA reasoning, based on the selected logic and its
implementation in a new reasoning engine that will serve as the event-,
conditionand action-handler in a reactive system. Furthermore we plan to realize, test and
re ne an integrated software framework for the management of EtRs life cycle,
containing elements of the distributed event processing, that can be easily
deployed in the selected legacy landscapes. Finally we aim the Development of use
cases, their implementation, testing and evaluation in real-world pilot studies in
order to validate proposed model and framework.
9 Consistency of a rule base assumes that a rule base does not contain any kind of
anomalies like inconsistent, redundant or circular rules.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>David</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Luckham</surname>
          </string-name>
          .
          <article-title>Whats the di erence between esp and cep? Online Article</article-title>
          ,
          <year>August 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Tim</given-names>
            <surname>Bass</surname>
          </string-name>
          . Mythbusters:
          <article-title>Event stream processing versus complex event processing</article-title>
          .
          <source>In DEBS '07: Proceedings of the 2007 inaugural international conference on Distributed event-based systems, pages 1{1</source>
          , New York, NY, USA,
          <year>2007</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Norman</surname>
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Paton</surname>
          </string-name>
          and
          <article-title>Oscar D az. Active database systems</article-title>
          .
          <source>In ACM Comput. Surv. ACM</source>
          ,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Dennis</given-names>
            <surname>McCarthy</surname>
          </string-name>
          and
          <string-name>
            <given-names>Umeshwar</given-names>
            <surname>Dayal</surname>
          </string-name>
          .
          <article-title>The architecture of an active database management system</article-title>
          .
          <source>In SIGMOD '89: Proceedings of the 1989 ACM SIGMOD international conference on Management of data</source>
          , pages
          <volume>215</volume>
          {
          <fpage>224</fpage>
          , New York, NY, USA,
          <year>1989</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Narain</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Gehani</surname>
            ,
            <given-names>H. V.</given-names>
          </string-name>
          <string-name>
            <surname>Jagadish</surname>
            , and
            <given-names>Oded</given-names>
          </string-name>
          <string-name>
            <surname>Shmueli</surname>
          </string-name>
          .
          <article-title>Composite event speci - cation in active databases: Model &amp; implementation</article-title>
          .
          <source>In VLDB '92: Proceedings of the 18th International Conference on Very Large Data Bases</source>
          , pages
          <volume>327</volume>
          {
          <fpage>338</fpage>
          , San Francisco, CA, USA,
          <year>1992</year>
          . Morgan Kaufmann Publishers Inc.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Sharma</given-names>
            <surname>Chakravarthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Krishnaprasad</surname>
          </string-name>
          , Eman Anwar, and
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Kim</surname>
          </string-name>
          .
          <article-title>Composite events for active databases: Semantics, contexts and detection</article-title>
          . In Jorge B.
          <string-name>
            <surname>Bocca</surname>
          </string-name>
          , Matthias Jarke, and Carlo Zaniolo, editors,
          <source>20th International Conference on Very Large Data Bases, September</source>
          <volume>12</volume>
          {
          <fpage>15</fpage>
          ,
          <year>1994</year>
          , Santiago, Chile proceedings, pages
          <volume>606</volume>
          {
          <fpage>617</fpage>
          , Los Altos, CA 94022, USA,
          <year>1994</year>
          . Morgan Kaufmann Publishers.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Antony</given-names>
            <surname>Galton</surname>
          </string-name>
          and
          <article-title>Juan Carlos Augusto</article-title>
          . Two approaches to event de nition.
          <source>In DEXA '02: Proceedings of the 13th International Conference on Database and Expert Systems Applications</source>
          , pages
          <volume>547</volume>
          {
          <fpage>556</fpage>
          , London, UK,
          <year>2002</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Raman</given-names>
            <surname>Adaikkalavan</surname>
          </string-name>
          and
          <string-name>
            <given-names>Sharma</given-names>
            <surname>Chakravarthy</surname>
          </string-name>
          . Snoopib:
          <article-title>Interval-based event speci cation and detection for active databases</article-title>
          .
          <source>Data Knowl. Eng.</source>
          ,
          <volume>59</volume>
          (
          <issue>1</issue>
          ):
          <volume>139</volume>
          {
          <fpage>165</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>N. H.</given-names>
            <surname>Gehani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. V.</given-names>
            <surname>Jagadish</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Shmueli</surname>
          </string-name>
          .
          <article-title>Event speci cation in an active object-oriented database</article-title>
          .
          <source>SIGMOD Rec</source>
          .,
          <volume>21</volume>
          (
          <issue>2</issue>
          ):
          <volume>81</volume>
          {
          <fpage>90</fpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Stella</given-names>
            <surname>Gatziu and Klaus R. Dittrich</surname>
          </string-name>
          .
          <article-title>Detecting composite events in active database systems using petrinets</article-title>
          .
          <source>In Proc. Fourth International Workshop on Active Database Systems Research Issues in Data Engineering</source>
          , pages
          <fpage>2</fpage>
          <issue>{9</issue>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Sharma</given-names>
            <surname>Chakravarthy</surname>
          </string-name>
          .
          <article-title>Sentinel: An object-oriented dbms with event-based rules</article-title>
          . In Joan Peckham, editor,
          <source>SIGMOD '97: Proceedings of the 1997 ACM SIGMOD international conference on Management of data</source>
          , pages
          <volume>572</volume>
          {
          <fpage>575</fpage>
          . ACM Press,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Michael</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Covington</surname>
            , Donald Nute, and
            <given-names>Andre</given-names>
          </string-name>
          <string-name>
            <surname>Vellino</surname>
          </string-name>
          .
          <article-title>Prolog programming in depth</article-title>
          . Morgan Kaufmann Publishers Inc. San Francisco, CA, USA,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Franois</given-names>
            <surname>Bry</surname>
          </string-name>
          and
          <string-name>
            <given-names>Michael</given-names>
            <surname>Eckert</surname>
          </string-name>
          .
          <article-title>Towards formal foundations of event queries and rules</article-title>
          .
          <source>In Second Int. Workshop on Event-Driven Architecture, Processing and Systems EDA-PS</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Paschke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kozlenkov</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Boley</surname>
          </string-name>
          .
          <article-title>A homogenous reaction rules language for complex event processing</article-title>
          .
          <source>In International Workshop on Event Drive Architecture for Complex Event Process</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>U.</given-names>
            <surname>Dayal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. P.</given-names>
            <surname>Buchmann</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D. R.</given-names>
            <surname>McCarthy</surname>
          </string-name>
          .
          <article-title>Rules are objects too: A knowledge model for an active, object-oriented databasesystem</article-title>
          .
          <source>In Lecture notes in computer science on Advances in object-oriented database systems</source>
          , pages
          <volume>129</volume>
          {
          <fpage>143</fpage>
          , New York, NY, USA,
          <year>1988</year>
          . Springer-Verlag New York, Inc.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>H.</given-names>
            <surname>Behrends</surname>
          </string-name>
          .
          <article-title>An operational semantics for the activity description language adl</article-title>
          .
          <source>Technical report</source>
          , Universitat Oldenburg,
          <article-title>June 1994</article-title>
          .
          <source>Technical Report TR-ISAIS-94-04.</source>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Charles</surname>
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Forgy</surname>
          </string-name>
          .
          <article-title>Rete: a fast algorithm for the many pattern/many object pattern match problem</article-title>
          .
          <source>Arti cial Intelligence</source>
          ,
          <volume>19</volume>
          :
          <fpage>17</fpage>
          {
          <fpage>37</fpage>
          ,
          <year>1982</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>D.P.</given-names>
            <surname>Miranker</surname>
          </string-name>
          .
          <article-title>TREAT: a new and e cient match algorithm for AI production systems</article-title>
          . Morgan Kaufmann Publishers Inc. San Francisco, CA, USA,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Don</given-names>
            <surname>Batory</surname>
          </string-name>
          .
          <article-title>The leaps algorithms</article-title>
          .
          <source>Technical report</source>
          , Austin, TX, USA,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>Sharma</given-names>
            <surname>Chakravarthy</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Mishra</surname>
          </string-name>
          . Snoop:
          <article-title>An expressive event speci cation language for active databases</article-title>
          .
          <source>Data Knowl. Eng.</source>
          ,
          <volume>14</volume>
          (
          <issue>1</issue>
          ):1{
          <fpage>26</fpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Erik</surname>
            <given-names>Behrends</given-names>
          </string-name>
          , Oliver Fritzen, Wolfgang May, and Franz Schenk.
          <article-title>Combining eca rules with process algebras for the semantic web</article-title>
          .
          <source>In RuleML</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Milner</surname>
            <given-names>R.</given-names>
          </string-name>
          , editor.
          <source>Calculus of Communicating Systems. Theoretical Computer Science</source>
          ,
          <year>1983</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Wing</surname>
            <given-names>J.M.</given-names>
          </string-name>
          <article-title>Faq on pi-calculus</article-title>
          .
          <source>In Microsoft Internal Memo</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>Bruno</given-names>
            <surname>Berstel</surname>
          </string-name>
          .
          <article-title>Extending the rete algorithm for event management</article-title>
          .
          <source>In Proc. Ninth International Symposium on Temporal Representation and Reasoning TIME 2002</source>
          , pages
          <fpage>49</fpage>
          {
          <fpage>51</fpage>
          , Washington, DC, USA,
          <volume>7</volume>
          {
          <issue>9</issue>
          <year>July 2002</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Kifer</surname>
          </string-name>
          , Arthur Bernstein, and
          <string-name>
            <given-names>Philip</given-names>
            <surname>Lewis</surname>
          </string-name>
          .
          <source>Database Systems - An Application-Oriented Approach. Addison-Wesley Longman Publishing Co., Inc</source>
          ., Boston, MA, USA, 2nd edition,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>Asaf</surname>
            <given-names>Adi</given-names>
          </string-name>
          , Ayelet Biger, David Botzer,
          <string-name>
            <given-names>Opher</given-names>
            <surname>Etzion</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Ziva</given-names>
            <surname>Sommer</surname>
          </string-name>
          .
          <article-title>Context awareness in amit</article-title>
          .
          <source>In Active Middleware Services</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Anicic</surname>
            <given-names>D. Stojanovic N.</given-names>
          </string-name>
          <article-title>Towards creation of logical framework for event-driven information systems</article-title>
          . In To appear
          <source>in: 10th International Conference on Enterprise Information Systems</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>