31
Mo Liu 1 , Elke A. Rundensteiner 1 , Dan Dougherty 1 , Chetan Gupta 2 , Song Wang 2 , Ismail Ari 3 , and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA 2 HP Labs, USA 3 Ozyegin University, Turkey BIRTE2010 Singapore NEEL: The Nested Complex Event Language for Real-Time Event Analytics Acknowledgements: This work is partly supported by HP Innovations Award, NSF 1018443 and NSF IIS 0917017, Turkish National Science Foundation TUBITAK under career award 109E194. We thank Di Wang, Han Wang and Richard T. Ellison III for the case study.

Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Embed Size (px)

Citation preview

Page 1: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Mo Liu1, Elke A. Rundensteiner1, Dan Dougherty1, Chetan Gupta2, Song Wang2, Ismail Ari3, and Abhay

Mehta2

1Worcester Polytechnic Institute, USA2HP Labs, USA

3Ozyegin University, Turkey

BIRTE2010 Singapore

NEEL: The Nested Complex Event Language

for Real-Time Event Analytics

Acknowledgements:This work is partly supported by HP Innovations Award, NSF 1018443 and NSF IIS 0917017, Turkish National Science Foundation TUBITAK under career award 109E194. We thank Di Wang, Han Wang and Richard T. Ellison III for the case study.

Page 2: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

2

Event Processing

EventConsumer

EventProducer

Event Processing—The Big Picture

Page 3: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Data Streams

Query Results

Data Sources

Put on surgical gloves

Wash your hands before touching next

patients

RFID Input

RFID Input

RFID Input

Put on mask for H1N1 contagious patients

Aggregate statistics for a

hospital

3

RFID In

put

Hospital Disease and Hygiene Control

Detect hygiene violations

Track workers

D. Wang, E. Rundensteiner, R. Ellison III, Active complex event processing: applications in realtime health care, VLDB (demonstration paper), 2010.

Page 4: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Primitive event instance is defined to be an occurrence of interest in time.

Composite event instance occurs over an interval.

Event history H is an ordered set of primitive event instances.

CEP Basics

e(t)

time t

e([t1, t2])

time t1 t2

4

Page 5: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Outline

• Event Processing• NEEL• Formal Semantics of NEEL• E-Analytics System• Case Study• Conclusion

Page 6: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

CompactIncremental Convenient

6

Why Nested Queries?

+

++

+

+

Page 7: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

NEEL: The Nested Complex Event Language

• Support nested SEQ, AND, OR with NEGATION

• Specify time period

• Specify condition on attributes• Assume value-based comparison

7

Page 8: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

NEEL Query Example

Time

8

Page 9: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Nested Expression Variable Scope

Inner query

Outer query

Time

Nested sub-query

9

AND

Page 10: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Window Constraints

w.ts

time

o.ts

Sub Window: [w.ts, o.ts]

10

Page 11: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Predicate Specification

Simple predicate

Correlated predicate

11

Page 12: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Negation

Time

Positive component

Positive component

Negative component

12

Page 13: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Scoping of Negation

r.ts

time

o.ts

! Washing [r.ts, o.ts]

13

Page 14: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Nested Negation

<r1, w2, o10> is outputted if

w time

or

14

r1 w2 o10

time

r1 w2 o10

time

d8s5 c9

No s or no c between w2 and o10

(s, c) exists between w2 and o10, d must exist between (s, c)

Page 15: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Predicates with Negation

Condition: all events have the same id.

Option 1: State condition in the outer SEQ

Inner events s, d and c are not visible in the outer SEQ construct.

15

Page 16: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Predicates with Negation

Condition: all events have the same id.

Option 2: State condition in the inner SEQ

Should the query return <r1, w2, o10> when no negative events exist?

−Condition is evaluated to be false: No final output. However, no outer results should be filtered as no negative event exists.

r1 w2 o10

Id: 1 1 1 time

Any P v s.id !=s.id is true

16

−Condition is evaluated to be true when involving negative events.

Page 17: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Our Proposal: Predicates with Negation

<r1, w2, o10> is generated. 17

We split condition and state the predicates involving negative components directly with

these negative components. Predicates only involving positive

components are stated directly with these positive components.

r1 w2 o10

Id: 1 1 1 time

The way we write predicates influences its meaning and results.

The positive components are first evaluated. If negative components exist, we evaluate

the negative predicates.

Page 18: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Predicates with Negation Example

SEQ(Recycle r, ! SEQ(Washing w, ! Sharpening s, Disinfection d), Checking c, Operating o)

Condition: all events have the same id.

18

SEQ(Recycle r, ! SEQ(Washing w, ! (Sharpening s, s.id = w.id ), Disinfection d, w.id = d.id = o.id ), Checking c, Operating o, r.id = c.id = o.id)

| d.id| c.id| r.id

Page 19: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Outline

• Event Processing• NEEL• Formal Semantics of NEEL• E-Analytics System• Case Study• Conclusion

Page 20: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Notations

• denotes an ordered sequence.

• denotes a set of event instances.• denotes the cross product of event histories.

• denotes predicates on events

20

Page 21: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Formal Semantics of NEEL

• Window constrained event history

• Window constrained event history for the event type Ei

• Union of event histories

21

Page 22: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Formal Semantics of NEEL

• SEQ operator

• SEQ operator with Negation

22

Page 23: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Formal Semantics of NEEL

• AND operator

• AND operator with Negation

• OR operator

23

Page 24: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Outline

• Event Processing• NEEL• Formal Semantics of NEEL• E-Analytics System• Case Study• Conclusion

Page 25: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

E-Analytics System

Selective caching[DMSN]

Algebraic operators:WinSeq WinOr, WinAnd

Iterative execution strategy [DMSN]

[DMSN] Processing Strategies for Nested Complex Sequence Pattern Queries over Event Streams, Mo Liu, Medhabi Ray, Elke A. Rundensteiner, Dan Dougherty, Chetan Gupta, Song Wang, and Abhay Mehta, DMSN 2010

25

Page 26: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Outline

• Event Processing• CEP Basics• NEEL• Formal Semantics of NEEL• E-Analytics System• Case Study• Related Work• Conclusion

Page 27: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Case Study: Real-time Infection Control

WPI and UMass Medical School project: Development and Testing of an Electronic Infection Control Reminder System for Healthcare Workers . Hospital Infection Control System (HICS)

27

D. Wang, E. Rundensteiner, R. Ellison III, Active complex event processing: applications inrealtime health care, VLDB (demonstration paper), 2010.

Page 28: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Sample Queries

28

Page 29: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

SNOOP: do not support scopeSASE: only support flat queriesCayuga: apply SQL-like syntaxSEL: focus on temporal relationships onlyODE: not compact for sequence and

negation

[SASE] E. Wu, Y. Diao, and S. Rizvi, High-performance complex event processing over streams, SIGMOD, 2006, pp. 407-418.

[SEL] D. Zhu and A.S. Sethi, SEL - A New Event Pattern Specification Language for Event Correlation, Proc. ICCCN-2001, Tenth International Conference on Computer Communications and Networks, Scottsdale, AZ (Oct. 2001), pp. 586-589.[ODE] Narain H. Gehani, H. V. Jagadish, Oded Shmueli: Composite Event Specification in Active Databases: Model & Implementation. VLDB 1992, pp. 327-338

Related Work

[SNOOP] Sharma Chakravarthy, V. Krishnaprasad, etc, Composite events for active databases: semantics, contexts and detection. VLDB 1994, pp. 606-617

[Cayuga] A. J. Demers, J. Gehrke, B. Panda, M. Riedewald, V. Sharma, and W. M. White, Cayuga: A general purpose event monitoring system. in CIDR, 2007, pp. 412-422.

29

Page 30: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Conclusion

Design NEEL composed of SEQ, NEGATION, AND, OR;

Introduce the formal query semantics for NEEL;

Study issues in NEEL for predicate, negation and etc;

Design E-Analytics system; Conduct case study in health care

30

Page 31: Mo Liu 1, Elke A. Rundensteiner 1, Dan Dougherty 1, Chetan Gupta 2, Song Wang 2, Ismail Ari 3, and Abhay Mehta 2 1 Worcester Polytechnic Institute, USA

Thank You!