SnoopIB: Interval-based event specification and detection for active databases

https://doi.org/10.1016/j.datak.2005.07.009Get rights and content

Abstract

Detection-based semantics does not differentiate between event detection and event occurrence and has been used for detecting events in most of the active systems that support Event–Condition–Action rules. However, this is a limitation for many applications that require interval-based semantics. In this article, we formalize the detection of Snoop (an event specification language) event operators using interval-based semantics (termed SnoopIB) in various event consumption modes. We show how events are detected using event detection graphs, and present a few representative algorithms to detect SnoopIB operators and comment on their implementation in the context of Sentinel—an active object-oriented DBMS.

Introduction

There is consensus in the database community on the Event–Condition–Action (or ECA) rules as being one of the most general formats for expressing rules in an active database management system. As the event component was the least understood (conditions correspond to queries, and actions correspond to transactions) part of the ECA rule, there is a large body of work on languages for event specification. Snoop [17], [19] was developed as the event specification component of the ECA rule formalism used as a part of the Sentinel project [8], [15], [16], [18] on active object-oriented DBMS. Snoop supports expressive ECA rules that include coupling modes and parameter contexts (or event consumption modes).1

An event was initially defined to be an instantaneous, atomic (happens completely or not at all) occurrence of interest and the time of occurrence of the last event in an event expression was used as the time of occurrence for the entire event expression. An event, which is an indicator of happening can be either primitive (e.g., depositing cash in a bank) or composite (e.g., depositing cash, followed by withdrawal of cash). Primitive events occur at a point in time (i.e., time of depositing). Composite events occur over an interval (i.e., the interval starts at the time cash is deposited and ends when cash is withdrawn). Thus, primitive events are detected at a point in time, whereas the composite events can be detected either at the end of the interval (i.e., detection-based semantics) or can be detected over the interval (i.e., occurrence/interval-based semantics).

In all event specification languages used in active DBMSs (ACOOD [10], [23], ADAM [21], [35], COMPOSE [28], [29], Event-based conditions [11], Reach [12], [13], [14], Samos [27], [26], and Snoop [17], [19]) even composite events are considered as “instantaneous”, although an event occurs over an “interval”. Because of this, all the proposed event specification languages detect a composite event at the end of an interval over which it occurs (i.e., detection-based semantics). When events are detected using the detection-based semantics, where event occurrence and event detection is not differentiated, it leads to incorrect detection of events (detailed in Section 1.1) [24], [25], when certain event operators, such as sequence, are composed more than once.

Interval-based semantics is needed to overcome the problems that are caused by the detection-based semantics. Below, we explain event detection with a detailed example using both detection-based and interval-based semantics, and highlight why the distinction between detection-based and interval-based semantics is critical.

We will first identify the conditions that are needed to detect an event. Primitive events are predefined in the system and are detected at the time of occurrence. Composite event detection on the other hand involves two steps: (i) checking the detection condition based on the operator semantics and (ii) determining the time of detection. These two steps are handled differently in detection-based semantics and interval-based semantics as explained below.

Consider an example, where a stock trading agent wants to take some action, when “Dow Jones Industrial (DJI) average increases by 5%, followed by a 5% price increase in Sun Microsystems stocks and a 2% price increase in IBM stocks”. Stock trading agent uses Snoop event operators to express this requirement.

“If (DJIA ; (Sun  IBM)) then take the appropriate action.”

  • DJIA, Sun, IBM are primitive events that correspond to DJI average increases by 5%, 5% price increase in Sun stocks, and 2% price increase in IBM stocks, respectively.2

  • (Sun  IBM) and (DJIA ; (Sun  IBM)) are composite events, where “;” (Snoop “sequence” event operator) represents followed by condition and “∧” (Snoop “and” event operator) represents And condition.

    • “;” detects a sequence of two events whenever the first event happens before the second event. “∧” detects an “And” event whenever both the events happen. Semantics for these operators are different for detection-based semantics and interval-based semantics and are illustrated below.

Case 1: Assume that primitive events DJIA, Sun and IBM occur at 10.30 a.m., 10 a.m., and 11 a.m. respectively. Fig. 1 depicts events that are detected along with the time of occurrence and detection.

  • 1.

    Primitive events are detected at the time of occurrence. Thus, events DJIA, Sun and IBM are detected at 10.30 a.m., 10 a.m., and 11 a.m., respectively.

  • 2.

    Composite event (Sun  IBM) detection involves two steps as previously mentioned.

    • (a)

      “And” condition is satisfied as both the events have occurred.

    • (b)

      Sun starts the composite event (Sun  IBM) detection at 10.00 a.m. IBM terminates the composite event (Sun  IBM) at 11 a.m. Since events are considered as “instantaneous” and are detected at end of the interval, composite event (Sun  IBM) is detected at 11 a.m. (though it occurred over an interval from 10 a.m. to 11 a.m.).

  • 3.

    Composite event (DJIA ; (Sun  IBM)) detection involves two steps and they are

    • (a)

      “Followed by” condition is only satisfied when event DJIA happens before event (Sun  IBM). In our example, this condition is satisfied, since event DJIA is detected at 10.30 a.m. (step 1) and event (Sun  IBM) is detected at 11 a.m. (step 2b). Thus, event DJIA happens before the event (Sun  IBM) (i.e., 10.30 a.m. < 11 a.m.).

    • (b)

      Composite event (DJIA ; (Sun  IBM)) is detected at 11 a.m. (even though it occurs over an interval from 10.30 a.m. to 11 a.m.).

Even though event Sun had occurred well before event DJIA (i.e., 10.00 a.m. < 10.30 a.m.), the composite event (DJIA ; (Sun  IBM)) is detected, which is incorrect. This is because of the condition checking in step 3a fails to capture the correct semantics, since it does not consider the start of interval. From this, it is evident that detection-based semantics does not detect events in the correct way under certain pattern of event occurrences. The detection-based semantics typically used by all the aforementioned event specification languages used in active DBMSs does not differentiate between event occurrence and event detection and have similar problems.

Same examples are used to explain interval-based semantics in this section where both times (start and end) are considered. This brings out the need for intervals for real-world events and the re-examination of the instantaneous occurrence assumption.

Case 2: Let us assume that primitive events DJIA, Sun and IBM occur at 10.30 a.m., 10 a.m., and 11 a.m. respectively. Fig. 2 depicts events that are detected, along with the time of occurrence and detection.

  • 1.

    Primitive events are detected at the time of occurrence, thus events DJIA, Sun and IBM are detected at 10.30 a.m., 10 a.m., and 11 a.m. respectively.

  • 2.

    Composite event (Sun  IBM) detection involves two steps as previously mentioned.

    • (a)

      “And” condition is satisfied, since both the events have occurred.

    • (b)

      With the interval-based semantics start time of an event is considered and it is detected over an interval. As explained in Case 1, event Sun starts and event IBM terminates the composite event (Sun  IBM), but the composite event is detected over the interval [10 a.m., 11 a.m.].3

  • 3.

    Composite event (DJIA ; (Sun  IBM)) detection involves two steps and they are:

    • (a)

      “Followed by” condition is only satisfied when event DJIA happens before event (Sun  IBM). In our example, this condition is not satisfied, since event DJIA is detected at 10.30 a.m. in step 1, and composite event (Sun  IBM) is detected over the interval [10.00 a.m., 11 a.m.] in step 2b. Thus, event DJIA does not happen before the event (Sun  IBM) (i.e., 10.30 a.m.  10 a.m.).

    • (b)

      Composite event (DJIA ; (Sun  IBM)) is not detected.

Both the Cases 1 and 2 detect composite event (DJIA ; (Sun  IBM)) using the same set of primitive events. Case 1 uses detection-based semantics, and the composite event is detected, which is not correct as event Sun had occurred well before event DJIA. Case 2 detects events using interval-based semantics, where the composite event is correctly not detected. Thus, event detection using interval-based semantics is needed for detecting events correctly. The rest of the article elaborates on event operators using the interval-based semantics.

SnoopIB [1], [2], [3], [5] is an event specification language based on interval-based semantics. Active rules have been shown to provide active capability to object oriented databases, relational databases, and so on. Lately, they have been shown to support diverse application areas such as information security [4], XML processing [9], information filtering [22], Data stream processing [31], [30], semantic web [34], and sensor databases [38]. Interval-based semantics has far-reaching applications and has been utilized in XML processing [9], information filtering [22], and cooperative information system [37].

Need for interval-based semantics was established in the previous section using an example, where events are detected in the unrestricted context (i.e., none of the event occurrences are discarded after participating in event detection). The example only makes a case for the need for alternative semantics, and whether an application/domain can live with non-interval-based semantics is a design decision. It is clear that both detection/point-based and interval-based semantics are needed as one is not sufficient for all applications. Furthermore, since event consumption modes are used in most applications, the interval-based semantics needs to be extended to event consumption models as well. Events that are detected using event consumption modes are subsets of events detected using the unrestricted context.

Snoop supports four event consumption modes (i.e., Recent, Chronicle, Continuous, and Cumulative) and a number of event operators. In this article, due to space constraints, we present interval-based semantics for some of the Snoop event operators using Recent and Continuous context (refer [1], [2], [3], [5] for other operators and contexts). First, we formally define Snoop event operators in both the contexts using event histories (i.e., a log). Second, we show how Snoop event operators detect event occurring online (i.e., one event at a time) using event detection graphs in both the contexts, and comment on the implementation of event operators in Sentinel. Finally, we present a few representative event operator algorithms for event detection.

The rest of the article is organized as follows. Related work is explained in Section 2. Snoop operators and their semantics in the unrestricted context using interval-based semantics are explained in Section 3. SnoopIB operators are formalized in recent and continuous context in Sections 4 Interval-based event operator formalization in recent context, 5 Interval-based event operator formalization in continuous context, respectively. Section 6 provides an illustrative example of event detection using event graphs and event histories in interval-based semantics along with few sample algorithms. Section 7 shows that no other event combinations, other than the unrestricted event combinations, are generated when contexts are used, and show that events detected using histories and graphs are same. Conclusions and future work are provided in Section 8.

Section snippets

Related work

Although there is a considerable amount of work on event specification languages and operators (ACOOD [10], [23], ADAM [21], [35], COMPOSE [28], [29], Event-based conditions [11], Reach [12], [13], [14], Samos [27], [26], and Snoop [17], [19]), all previous proposals have used detection- or point-based semantics. All these languages detect composite events using different approaches. For example, Sentinel [8], [15], [16], [18] uses event graphs to detect a composite event, whereas Samos [27],

Interval-based semantics of Snoop

For the purpose of this article, we assume an equidistant discrete time domain having “0” as the origin and each time point represented by a non-negative integer as shown in Fig. 3. The granularity of the domain is assumed to be specific to the domain of interest. In object-oriented databases, interest in events comes from the state changes produced by method executions by an object. Similarly, in relational databases, interest in events comes from the data manipulation operations such as

Interval-based event operator formalization in recent context

In this section, for some of the operators defined in unrestricted context [24], [25], we will define them formally in recent context. In addition, we will also formally define the PLUS operator defined in Section 3.4. Motivation behind the recent context is given below in a more intuitive way.

Recent context: Applications where events are happening at a fast rate and multiple occurrences of the same event only refine the previous value can use this context. Only the most recent or the latest

Interval-based event operator formalization in continuous context

For some of the operators explained in Section 3.4, we will define them formally in continuous context.

Continuous context (sliding window events): In applications where event detection along a moving time window is needed, continuous context can be used. This context is especially useful for tracking trends of interest on a sliding time point governed by the initiator event. For example, computing change of more than 20% in Dow Jones average in any 2-h period requires each change to initiate a

Composite event detection using event graphs

In Section 3.4 definitions using event histories were given for all the operators in Recent and Continuous contexts. They are appropriate for applications whose event histories are collected and processed for event occurrences. In many real-world monitoring applications events are streaming in as they occur and composite events need to be detected on the fly (as they occur) and take appropriate actions. In this section we will explain the how composite events are detected from the

Event comparisons

In the following subsections we will show that events detected using consumption modes (or contexts) just restricts the events generated by unrestricted context, and show that events generated from event histories using formal definitions and from events occurring online using event detection graphs are same.

Conclusions and future work

Interval-based semantics is required by some applications where the event detection and event occurrence needs to be differentiated. In this article, we have formally defined Snoop event operators using interval-based semantics in recent and continuous contexts using event histories. These formal definitions include constraints that are based on the conditions over initiators, detectors, and terminators that should be satisfied for a particular context. Then, we have shown how online events are

Acknowledgement

We would like to acknowledge the support of AF/Spawar grant (AF 26-0201-13) and the NSF grant (IIS-0112914) for this work.

Raman Adaikkalavan is currently a Ph.D. candidate in the Computer Science and Engineering Department at The University of Texas at Arlington. He received his Bachelor of Engineering degree in Computer Science and Engineering from Bharathidasan University, Tamil Nadu, India in August 1999 and his Master of Science in Computer Science and Engineering from The University of Texas at Arlington, in August 2002. His current research interests include: active capability, information security, access

References (38)

  • S. Chakravarthy et al.

    Snoop: an expressive event specification language for active databases

    Data and Knowledge Engineering

    (1994)
  • R. Adaikkalavan, Snoop event specification: formalization, algorithms, and implementation using interval-based...
  • R. Adaikkalavan, S. Chakravarthy, SnoopIB: Interval-based event specification and detection for active databases, in:...
  • R. Adaikkalavan, S. Chakravarthy, Formalization and detection of events over a sliding window in active databases using...
  • R. Adaikkalavan, S. Chakravarthy, Active authorization rules for enforcing role-based access control and its...
  • R. Adaikkalavan, S. Chakravarthy, Formalization and detection of events using interval-based semantics, in: Proceedings...
  • J. Allen

    Towards a general theory of action and time

    Artificial Intelligence

    (1984)
  • J. Allen et al.

    Action and events in interval temporal logic

    Journal of Logic and Computation

    (1994)
  • E. Anwar, L. Maugis, S. Chakravarthy, A new perspective on rule support for object-oriented databases, in: Proceedings...
  • M. Bernauer, G. Kappel, G. Kramler, Composite events for XML, in: Proceedings of the International World Wide Web...
  • M. Berndtsson et al.

    On developing reactive object-oriented databases

    IEEE Data Engineering Bulletin

    (1992)
  • E. Bertino, E. Ferrari, G. Guerrini. An approach to model and query event-based temporal data, in: Proceedings of the...
  • H. Branding et al., Rules in an open system: the REACH rule system, in: Proceedings of the 1st International Workshop...
  • A.P. Buchmann

    REACH: a real-time active and heterogeneous mediator system

    IEEE Data Engineering Bulletin

    (1992)
  • A.P. Buchmann et al., The REACH Active OODBMS, in: Proceedings of the ACM SIGMOD International Conference on Management...
  • S. Chakravarthy

    Early active databases: a capsule summary

    IEEE Transactions on Knowledge and Data Engineering

    (1995)
  • S. Chakravarthy

    Design of sentinel: an object-oriented DBMS with event-based rules

    Information and Software Technology

    (1994)
  • S. Chakravarthy et al., Composite events for active databases: semantics, contexts and detection, in: Proceedings of...
  • S. Chakravarthy et al., ECA rule integration into an OODBMS: architecture and implementation, in: Proceedings of the...
  • Cited by (75)

    • Knowledge-infused and consistent Complex Event Processing over real-time and persistent streams

      2017, Future Generation Computer Systems
      Citation Excerpt :

      On the other hand, existing CEP systems focus on processing real-time events, without considering archived event streams. Integrated querying over real-time and persistent data has attracted some interest from active databases [16]. These leverage triggers in relational query engines to process time varying data that is persisted.

    • EVA: An event algebra supporting complex event specification

      2015, Information Systems
      Citation Excerpt :

      The Snoop language of the Sentinel introduced parameter contexts to control the semantics of each operator [43,29]. SnoopIB extends Snoop to events with durations [1,3]. Rapide׳s language covers complex situation such as causality and event equivalences [80].

    • Event identification in web social media through named entity recognition and topic modeling

      2013, Data and Knowledge Engineering
      Citation Excerpt :

      Fuzzy theory is proposed in [18], where an efficient hot spot extraction algorithm that uses several efficient strategies to improve performance is proposed. A different approach is followed by Adaikkalavan and Chakravarthy [30], who propose SnoopIB, an event specification language and detect events based on interval-based semantics. On the other hand, Lee et al. [58] focus on Twitter for mining microblogging text stream to obtain real-time and geospatial event information.

    • ECA-based interoperability framework for intelligent building

      2013, Automation in Construction
      Citation Excerpt :

      In this context, it was assured that the developed framework can be readable and accessible to everyone from apprentice programmers to experienced system engineers for intelligent building. The ECA rule mechanism which has its origin from active database systems is often used in artificial intelligence area that observes triggers to execute a predetermined action [19,20]. In active databases, ECA rule mechanism is defined through two models, i.e., knowledge model and execution model.

    • A lightweight and extensible Complex Event Processing system for sense and respond applications

      2012, Expert Systems with Applications
      Citation Excerpt :

      The first language class expresses complex events by composing single events using different composition operators (such as sequence, conjunction, disjunction, negation, temporal relations, event occurrences counting) and nesting of expressions. Examples are: SnoopIB (Adaikkalavan & Chakravarthy, 2006), where the authors formalize the detection of event operators using interval-based semantics; the work by Zang et al. (2008), proposing an event meta model, event pattern rules and operators for complex event detection; CEDR (Complex Event Detection and Response), which is an event processing system, based on a declarative language for specifying patterns that include high level event operators and support for detection lifetime (Barga et al., 2006). Data stream query languages enable to express queries in an SQL-like language.

    View all citing articles on Scopus

    Raman Adaikkalavan is currently a Ph.D. candidate in the Computer Science and Engineering Department at The University of Texas at Arlington. He received his Bachelor of Engineering degree in Computer Science and Engineering from Bharathidasan University, Tamil Nadu, India in August 1999 and his Master of Science in Computer Science and Engineering from The University of Texas at Arlington, in August 2002. His current research interests include: active capability, information security, access control models, event stream processing systems and information filtering.

    Dr. Sharma Chakravarthy is a Professor in the Computer Science and Engineering Department at the University of Texas at Arlington. He has established the Information Technology Laboratory (or ITLab) and a Distributed and Parallel Computing Cluster (DPCC) at UTA. His current research interests include: enabling technologies for advanced information systems, mining/knowledge discovery (conventional, graph, and text), active capability, web change monitoring, stream data processing, document/email classification, and information security. Prior to joining UTA, he was with the CISE Department at the University of Florida, Gainesville. He also worked as a Computer Scientist at the Computer Corporation of America (CCA), Cambridge, MA and as a Member of Technical Staff at Xerox Advanced Information Technology (XAIT), Cambridge, MA. He has published over 115 papers in refereed International journals and conference proceedings. He has consulted for MCC, BBN, SRA Systems (India), Enigmatec, London, and RTI Inc. He has given tutorial on a number of database topics, such as active, real-time, distributed, object-oriented, and heterogeneous databases in North America, Europe, and Asia. He has given several invited and keynote addresses at universities and International conferences.

    View full text