SlideShare a Scribd company logo
1 of 28
Download to read offline
Chapter 6
Event Patterns, Rules, and
Constraints
jwj0831@gmail.com
Topics covered in this Chapter
●
●
●
●
●
●

Familiar kinds of pattern searching
Event patterns
A strawman event pattern language
Event pattern rules
Event pattern constraints
Capturing business rules as event patterns
6.1 Common Kinds of Pattern
Searching 1/4
● We need to be able to describe a pattern of events
that we are interested in and quickly find the sets of
events that match the pattern.
● To do this, we first need a precise method to describe
event patterns.
● One way is to write the pattern in a computer language
called an event pattern language(EPL).
6.1 Common Kinds of Pattern
Searching 2/4
● Another way, which many of us are familiar with, is to
use a graphical user interface(GUI) such as those
provided in popular Web search engines.
○ Unfortunately, search GUIs usually allow only very simple
patterns to be described
6.1 Common Kinds of Pattern
Searching 3/4
● Pattern matching applied to other kinds of object than
events, such as strings and files, has been around a lot
longer than the Internet.
6.1 Common Kinds of Pattern
Searching 4/4
● In CEP we need to specify sets of events that have
certain common data in some of the events and also
have specific timing, causal, and aggregation
relationships between events.
● The need to specify sets of events that have parts in
common and specific relativities is a step beyond
string searching.
● A pattern language in which we can express such
pattherns will necessarily be more complex than string
searching language.
6.2 Event Patterns
● An event pattern is a template that matches certain
sets of events - the sets you want to find.
● It describes precisely not only the events but also their
causal dependencies, timing, data parameters, and
context.
● So an event pattern is a template for posets.
6.2 Event Patterns Example
Content-Sensitive Pattern
All orders from customer C in the last month
● To see if an order matches this pattern, we must look at
the data in the order to see if the customer is C and the
time bound is met.
6.2 Event Patterns Example
Context-Sensitive Pattern
All orders from frequent customers in the last
month
● The second pattern is similar to the first one, except
that instead of searching the data in an order to see
if the customer is C, we must evaluate the context
of the customer.
● for example, by searching a database to see if the
customer is part of the state in which the matching take
place.
6.2 Event Patterns Example
Filter Pattern 1/2
All orders from customers in response to a discount
announcement
● We interpret “in response to” as a causal relationship.
● The pattern picks out from the set of all order events
those orders that are caused by the announcement.
● It acts as a filter using the causal relationship between
an order event and the announcement event to reduce
the space of events to a small part of the incoming
events.
6.2 Event Patterns Example
Filter Pattern 2/2
Order

Confirm
Order

...
Confirm

Order

Order

...

Order

Discount

...
...

...
6.2 Event Patterns Example
Complex Pattern 1/2
All orders from customers at the regular price that have led to the
customer requesting a reduced price in response to the discount
announcement

● The fourth pattern is more complicated.
● Matching this pattern uses relationships between three
events: the order, the announcement, and the request in
the poset of incoming events.
● This kind of pattern is beyond the power of expression
of most event pattern languages.
6.2 Event Patterns Example
Complex Pattern 2/2

Discount

Order

Order

Order

Confirm

Reduction
Request
Reduction
Request

...
6.3 A Strawman Pattern Language
● A Strawman Pattern Language: STRAW-EPL
● This is not a powreful event pattern language.
● STRAW-EPL can be used to specify patterns with three
relational operators: and, or, ->(causes)

● Some examples
○ A and B and C: Matches a set of three events, A, B, C
○ A or B or C: Matches any one of A, B, or C
○ A -> B: Matches pairs of events A, B where A causes B
6.3 A Strawman Pattern Language
Four Elements of STRAW-EPL 1/2
● Variables are declared with their types:
○ A variable M of type Message: Message M;
○ A variable T of type Time: Time T;

● Event types have a name and a parameter list of
variables and their types:
○ A Send event: Send(Message M, Bit B, Timt T);
○ A ReSend event: ReSend(Message M, Bit B, Time T);
6.3 A Strawman Pattern Language
Four Elements of STRAW-EPL 2/2
● A pattern is a set of event templates together with
relationships between the event templates:
○ A Send and Resend with the same message and bit,, and
possibly different timestamps: Send(M, B, T1) and ReSend(M,
B,T2)

● A context condition is a test that must be true when the
pattern is matched:
○ The time between the Send and ReSend event must
be less than a bound: 0 < T2 - T1 < 10;
6.3.1 Pattern Matching
● Each match of a pattern is a poset that is an instance of
the pattern constructed by replacing variables in the
pattern with the values.
● A variable must be replaced by the same value
wherever it occurs in the pattern.
● The process of replacing variables in a pattrn with
values is called matching.
6.3.2 Writing Patterns in STRAW-EPL
● Patterns in STRAW-EPL are written in a tabular format.
● The table gives the name of the pattern and each of its
element
● The tabular format declares
○ the variables(also called placeholders) in the pattern
together with their types,
○ the types of events in the pattern,
○ the relational operators used in the pattern,
○ the pattern,
○ and the context test.
6.3.2 Writing Patterns in STRAW-EPL
Example Pattern: Data Transfer
Pattern: Data Transfer
Element

Declarations

Variable

Data D, Bit B, Time T, Time T1, Time T2

Event types

Send(Data D, Bit B, Time T)
Receive(Data D, Bit B, Time T)
Ack(Bit B, Timt T)
RecAck(Bit B, Time T)

Relational
operators

->(causes)

Pattern

Send(D, B, T1) -> Receive(D, B, T) -> Ack(B, T) -> RecAck
(B, T2)

Context test

T2 - T1 < 10 secs
6.3.2 Writing Patterns in STRAW-EPL
Example Pattern: StockTrade Messsage Test
Pattern: StockTrade Message Test
Element

Declarations

Variable

Subject S, Message M, String Id, Time T, Time T1, Time T2

Event types

Publish(Subject S, String Id, Message M, Time T)
Receive(Subject S, String Id, Message M, Time T)

Relational
operators

and

Pattern

Publish(S, Id, M, T) and Receive(S, Id, M, T)

Context test

T2 - T1 < 35 mins and S = “StockTrade”
6.4 Event Pattern Rules 1/3
● An event pattren rule is reactive rule that specifies an
action to be taken whenever an event pattern is
matched.
● An event pattern rule implies a causal relationship
between the events that trigger it by matching its pattern
and the events that are created when the rule executes
its action.
● A reactive rule has two parts:
○ A trigger, which is an event pattern
○ An action, which is an event that is created
whenever the trigger matches
6.4 Event Pattern Rules 2/3
● The causal implication is, whenever an event pattern
rule is triggered by a poset of events, the event it
creates is caused by the triggering events.
● The triggering events are causal ancestors of the new
event.
6.4 Event Pattern Rules 3/3
● Reactive rules can be either sequential or parallel.
○ A sequential rule implies that all its triggerings take
place in a sequence, one after the other.
○ A parallel rule implies that its triggerings take place
independently, as if executed by new threads of
control.
MT502

MT513

MT502

MT502

MT513

Sequential

MT513

MT502

MT513

MT502

MT513

Parallel

MT502

MT513
6.4 Event Pattern Rules 1/2
Example Rule: Warning of late network data transfer
Element

Declarations

Variable

Node N1, N2, Data D, Bit B, Time T1, T2, T3, T4

Event types

Send(Node N1,Node N2, Data D, Bit B, Time T1)
Receive(Node N1,Node N2, Data D, Bit B, Time T1)
Ack(Node N1,Node N2, Bit B, Timt T1)
RecAck(Node N1, Node N2, Bit B, Time T)
Warning(Node N1, Node N2, Time T1, Time T2)

Relational operators ->(causes)
Pattern

Send(N1, N2, D, B, T1) -> Receive(N2, N1, D, B, T2) ->
Ack(N2, N1, B, T3) -> RecAck (N1, N2, B, T4)

Context test

T4 - T1 < 1 hour

Action

create Warning(N1, N2, T1, T4)
6.4 Event Pattern Rules 2/2
Example Rule: Warning of late network data transfer

Warning

Send

Receive

Ack

TimeOut

Resend

RecAck

TimeOut
6.5 Constraints 1/3
● A constraints expresses a condition that must be
satisfied by the events observed in a system.
● Constraints can be used to specify not only how a target
system should behave, but also how its user should use
it.
● Our strawman constraints express a very simple of
condition called never constraints.
● A never constraint consists of the following:
○ The temporal operator never
○ A STRAW-EPL pattern
6.5 Constraints 2/3
Never Confirm and Then Cancel an Order
Element

Declarations

Variable

Customer Id, Item I, OrderNo N, Dollars Price, Time T1, Time T2

Event types

Confirm(Customer Id, OrderNo N, Item I, Dollars Price, Time T1)
Deny(Customer Id, OrderNo N, Item I, Dollars Price, Time T1)

Relational operators

and

Temporal operator

never

Pattern

Confirm(Id, N, I, Price, T1) and Deny(Id, N, I, Price, T2)

Context test

T1 <= T2
6.5 Constraints 3/3
● The purpose of a rule is to create new events in
response to situations.
● The purpose of a constraints is different, simply to
monitor for a situation.
● Typically, a constraint is used to express a requirement
on system behavior that is not guaranteed by the
system.

More Related Content

What's hot

Distributed Coordination
Distributed CoordinationDistributed Coordination
Distributed Coordinationsiva krishna
 
Operating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordinationOperating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordinationSyaiful Ahdan
 
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013Multi-level Elasticity Control of Cloud Services -- ICSOC 2013
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013Georgiana Copil
 
Cost-aware scalability of applications in public clouds
Cost-aware scalability of applications in public clouds Cost-aware scalability of applications in public clouds
Cost-aware scalability of applications in public clouds Daniel Moldovan
 
Supporting Cloud Service Operation Management for Elasticity
Supporting Cloud Service Operation Management for Elasticity Supporting Cloud Service Operation Management for Elasticity
Supporting Cloud Service Operation Management for Elasticity Georgiana Copil
 
SYBL: An extensible language for elasticity specifications in cloud applicati...
SYBL: An extensible language for elasticity specifications in cloud applicati...SYBL: An extensible language for elasticity specifications in cloud applicati...
SYBL: An extensible language for elasticity specifications in cloud applicati...Georgiana Copil
 
Improving predictability and performance by relating the number of events and...
Improving predictability and performance by relating the number of events and...Improving predictability and performance by relating the number of events and...
Improving predictability and performance by relating the number of events and...Asoka Korale
 
On Analyzing Elasticity Relationships of Cloud Services
On Analyzing Elasticity Relationships of Cloud ServicesOn Analyzing Elasticity Relationships of Cloud Services
On Analyzing Elasticity Relationships of Cloud ServicesDaniel Moldovan
 
Concurrency control
Concurrency controlConcurrency control
Concurrency controlkansel85
 
Distributed Database Design and Relational Query Language
Distributed Database Design and Relational Query LanguageDistributed Database Design and Relational Query Language
Distributed Database Design and Relational Query LanguageAAKANKSHA JAIN
 
Predictive Business Process Monitoring with LSTM Neural Networks
Predictive Business Process Monitoring with LSTM Neural NetworksPredictive Business Process Monitoring with LSTM Neural Networks
Predictive Business Process Monitoring with LSTM Neural NetworksMarlon Dumas
 
A Framework for Performance Analysis of Computing Clouds
A Framework for Performance Analysis of Computing CloudsA Framework for Performance Analysis of Computing Clouds
A Framework for Performance Analysis of Computing Cloudsijsrd.com
 
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...Georgiana Copil
 
Learning Accurate LSTM Models of Business Processes
Learning Accurate LSTM Models of Business ProcessesLearning Accurate LSTM Models of Business Processes
Learning Accurate LSTM Models of Business ProcessesMarlon Dumas
 
Concurrency of Issues of Distributed Advance Transaction
Concurrency of Issues of Distributed Advance TransactionConcurrency of Issues of Distributed Advance Transaction
Concurrency of Issues of Distributed Advance TransactionAbdelhafiz Khoudour
 
Jerry banks introduction to simulation
Jerry banks   introduction to simulationJerry banks   introduction to simulation
Jerry banks introduction to simulationsarubianoa
 
Realtime systems chapter 1
Realtime systems chapter 1Realtime systems chapter 1
Realtime systems chapter 1Binay Ghimire
 

What's hot (20)

Distributed Coordination
Distributed CoordinationDistributed Coordination
Distributed Coordination
 
Operating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordinationOperating System : Ch18 distributed coordination
Operating System : Ch18 distributed coordination
 
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013Multi-level Elasticity Control of Cloud Services -- ICSOC 2013
Multi-level Elasticity Control of Cloud Services -- ICSOC 2013
 
Cost-aware scalability of applications in public clouds
Cost-aware scalability of applications in public clouds Cost-aware scalability of applications in public clouds
Cost-aware scalability of applications in public clouds
 
Supporting Cloud Service Operation Management for Elasticity
Supporting Cloud Service Operation Management for Elasticity Supporting Cloud Service Operation Management for Elasticity
Supporting Cloud Service Operation Management for Elasticity
 
SYBL: An extensible language for elasticity specifications in cloud applicati...
SYBL: An extensible language for elasticity specifications in cloud applicati...SYBL: An extensible language for elasticity specifications in cloud applicati...
SYBL: An extensible language for elasticity specifications in cloud applicati...
 
Improving predictability and performance by relating the number of events and...
Improving predictability and performance by relating the number of events and...Improving predictability and performance by relating the number of events and...
Improving predictability and performance by relating the number of events and...
 
On Analyzing Elasticity Relationships of Cloud Services
On Analyzing Elasticity Relationships of Cloud ServicesOn Analyzing Elasticity Relationships of Cloud Services
On Analyzing Elasticity Relationships of Cloud Services
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Distributed Database Design and Relational Query Language
Distributed Database Design and Relational Query LanguageDistributed Database Design and Relational Query Language
Distributed Database Design and Relational Query Language
 
OSCh17
OSCh17OSCh17
OSCh17
 
Predictive Business Process Monitoring with LSTM Neural Networks
Predictive Business Process Monitoring with LSTM Neural NetworksPredictive Business Process Monitoring with LSTM Neural Networks
Predictive Business Process Monitoring with LSTM Neural Networks
 
A Framework for Performance Analysis of Computing Clouds
A Framework for Performance Analysis of Computing CloudsA Framework for Performance Analysis of Computing Clouds
A Framework for Performance Analysis of Computing Clouds
 
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...
Controlling Cloud Services Elasticity in Heterogeneous Clouds - UCC 2014 - Cl...
 
Learning Accurate LSTM Models of Business Processes
Learning Accurate LSTM Models of Business ProcessesLearning Accurate LSTM Models of Business Processes
Learning Accurate LSTM Models of Business Processes
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Concurrency of Issues of Distributed Advance Transaction
Concurrency of Issues of Distributed Advance TransactionConcurrency of Issues of Distributed Advance Transaction
Concurrency of Issues of Distributed Advance Transaction
 
Jerry banks introduction to simulation
Jerry banks   introduction to simulationJerry banks   introduction to simulation
Jerry banks introduction to simulation
 
Realtime systems chapter 1
Realtime systems chapter 1Realtime systems chapter 1
Realtime systems chapter 1
 
Real Time System
Real Time SystemReal Time System
Real Time System
 

Similar to The Power Of Event Chapter 6

CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.pptArumugam90
 
Algorithm & data structure lec2
Algorithm & data structure lec2Algorithm & data structure lec2
Algorithm & data structure lec2Abdul Khan
 
Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Muhammad Hammad Waseem
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdfMemMem25
 
Data Structure and Algorithm chapter two, This material is for Data Structure...
Data Structure and Algorithm chapter two, This material is for Data Structure...Data Structure and Algorithm chapter two, This material is for Data Structure...
Data Structure and Algorithm chapter two, This material is for Data Structure...bekidea
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modelingMinal Maniar
 
Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesFellowBuddy.com
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithmsAsen Bozhilov
 
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksApplying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksLawrence Takeuchi
 
Affine cascade models for term structure dynamics of sovereign yield curves
Affine cascade models for term structure dynamics of sovereign yield curvesAffine cascade models for term structure dynamics of sovereign yield curves
Affine cascade models for term structure dynamics of sovereign yield curvesLAURAMICHAELA
 
Vldb 2010 event processing tutorial
Vldb 2010 event processing tutorialVldb 2010 event processing tutorial
Vldb 2010 event processing tutorialOpher Etzion
 
Chapter 1 Data structure.pptx
Chapter 1 Data structure.pptxChapter 1 Data structure.pptx
Chapter 1 Data structure.pptxwondmhunegn
 
Machine learning Investigative Reporting NorthBaySolutions.pdf
Machine learning Investigative Reporting NorthBaySolutions.pdfMachine learning Investigative Reporting NorthBaySolutions.pdf
Machine learning Investigative Reporting NorthBaySolutions.pdfssusera5352a2
 
Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLVijaySharma802
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxcuddietheresa
 
Discrete structure ch 3 short question's
Discrete structure ch 3 short question'sDiscrete structure ch 3 short question's
Discrete structure ch 3 short question'shammad463061
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overviewIshraq Al Fataftah
 
Theory of algorithms final
Theory of algorithms final Theory of algorithms final
Theory of algorithms final Dgech
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Ricardo Quintero
 

Similar to The Power Of Event Chapter 6 (20)

CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
 
Pdp12
Pdp12Pdp12
Pdp12
 
Algorithm & data structure lec2
Algorithm & data structure lec2Algorithm & data structure lec2
Algorithm & data structure lec2
 
Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 
Data Structure and Algorithm chapter two, This material is for Data Structure...
Data Structure and Algorithm chapter two, This material is for Data Structure...Data Structure and Algorithm chapter two, This material is for Data Structure...
Data Structure and Algorithm chapter two, This material is for Data Structure...
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modeling
 
Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture Notes
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksApplying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
 
Affine cascade models for term structure dynamics of sovereign yield curves
Affine cascade models for term structure dynamics of sovereign yield curvesAffine cascade models for term structure dynamics of sovereign yield curves
Affine cascade models for term structure dynamics of sovereign yield curves
 
Vldb 2010 event processing tutorial
Vldb 2010 event processing tutorialVldb 2010 event processing tutorial
Vldb 2010 event processing tutorial
 
Chapter 1 Data structure.pptx
Chapter 1 Data structure.pptxChapter 1 Data structure.pptx
Chapter 1 Data structure.pptx
 
Machine learning Investigative Reporting NorthBaySolutions.pdf
Machine learning Investigative Reporting NorthBaySolutions.pdfMachine learning Investigative Reporting NorthBaySolutions.pdf
Machine learning Investigative Reporting NorthBaySolutions.pdf
 
Different Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIMLDifferent Models Used In Time Series - InsideAIML
Different Models Used In Time Series - InsideAIML
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Discrete structure ch 3 short question's
Discrete structure ch 3 short question'sDiscrete structure ch 3 short question's
Discrete structure ch 3 short question's
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overview
 
Theory of algorithms final
Theory of algorithms final Theory of algorithms final
Theory of algorithms final
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5
 

More from Woojin Joe

Angular Seminar [한빛미디어 리얼타임 세미나]
Angular Seminar [한빛미디어 리얼타임 세미나]Angular Seminar [한빛미디어 리얼타임 세미나]
Angular Seminar [한빛미디어 리얼타임 세미나]Woojin Joe
 
자바 네트워크 소녀 Netty 리뷰
자바 네트워크 소녀 Netty 리뷰자바 네트워크 소녀 Netty 리뷰
자바 네트워크 소녀 Netty 리뷰Woojin Joe
 
The Power Of Event Chapter 3
The Power Of Event Chapter 3The Power Of Event Chapter 3
The Power Of Event Chapter 3Woojin Joe
 
Fusion prj-proposal for 10 2 class
Fusion prj-proposal for 10 2 classFusion prj-proposal for 10 2 class
Fusion prj-proposal for 10 2 classWoojin Joe
 
신학과 사회에 대한 성경의 가르침
신학과 사회에 대한 성경의 가르침신학과 사회에 대한 성경의 가르침
신학과 사회에 대한 성경의 가르침Woojin Joe
 
ITBC Orientation
ITBC OrientationITBC Orientation
ITBC OrientationWoojin Joe
 
2010년 여름 신입부원 프로젝트 제안서(수정)
2010년 여름 신입부원 프로젝트 제안서(수정)2010년 여름 신입부원 프로젝트 제안서(수정)
2010년 여름 신입부원 프로젝트 제안서(수정)Woojin Joe
 

More from Woojin Joe (7)

Angular Seminar [한빛미디어 리얼타임 세미나]
Angular Seminar [한빛미디어 리얼타임 세미나]Angular Seminar [한빛미디어 리얼타임 세미나]
Angular Seminar [한빛미디어 리얼타임 세미나]
 
자바 네트워크 소녀 Netty 리뷰
자바 네트워크 소녀 Netty 리뷰자바 네트워크 소녀 Netty 리뷰
자바 네트워크 소녀 Netty 리뷰
 
The Power Of Event Chapter 3
The Power Of Event Chapter 3The Power Of Event Chapter 3
The Power Of Event Chapter 3
 
Fusion prj-proposal for 10 2 class
Fusion prj-proposal for 10 2 classFusion prj-proposal for 10 2 class
Fusion prj-proposal for 10 2 class
 
신학과 사회에 대한 성경의 가르침
신학과 사회에 대한 성경의 가르침신학과 사회에 대한 성경의 가르침
신학과 사회에 대한 성경의 가르침
 
ITBC Orientation
ITBC OrientationITBC Orientation
ITBC Orientation
 
2010년 여름 신입부원 프로젝트 제안서(수정)
2010년 여름 신입부원 프로젝트 제안서(수정)2010년 여름 신입부원 프로젝트 제안서(수정)
2010년 여름 신입부원 프로젝트 제안서(수정)
 

Recently uploaded

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

The Power Of Event Chapter 6

  • 1. Chapter 6 Event Patterns, Rules, and Constraints jwj0831@gmail.com
  • 2. Topics covered in this Chapter ● ● ● ● ● ● Familiar kinds of pattern searching Event patterns A strawman event pattern language Event pattern rules Event pattern constraints Capturing business rules as event patterns
  • 3. 6.1 Common Kinds of Pattern Searching 1/4 ● We need to be able to describe a pattern of events that we are interested in and quickly find the sets of events that match the pattern. ● To do this, we first need a precise method to describe event patterns. ● One way is to write the pattern in a computer language called an event pattern language(EPL).
  • 4. 6.1 Common Kinds of Pattern Searching 2/4 ● Another way, which many of us are familiar with, is to use a graphical user interface(GUI) such as those provided in popular Web search engines. ○ Unfortunately, search GUIs usually allow only very simple patterns to be described
  • 5. 6.1 Common Kinds of Pattern Searching 3/4 ● Pattern matching applied to other kinds of object than events, such as strings and files, has been around a lot longer than the Internet.
  • 6. 6.1 Common Kinds of Pattern Searching 4/4 ● In CEP we need to specify sets of events that have certain common data in some of the events and also have specific timing, causal, and aggregation relationships between events. ● The need to specify sets of events that have parts in common and specific relativities is a step beyond string searching. ● A pattern language in which we can express such pattherns will necessarily be more complex than string searching language.
  • 7. 6.2 Event Patterns ● An event pattern is a template that matches certain sets of events - the sets you want to find. ● It describes precisely not only the events but also their causal dependencies, timing, data parameters, and context. ● So an event pattern is a template for posets.
  • 8. 6.2 Event Patterns Example Content-Sensitive Pattern All orders from customer C in the last month ● To see if an order matches this pattern, we must look at the data in the order to see if the customer is C and the time bound is met.
  • 9. 6.2 Event Patterns Example Context-Sensitive Pattern All orders from frequent customers in the last month ● The second pattern is similar to the first one, except that instead of searching the data in an order to see if the customer is C, we must evaluate the context of the customer. ● for example, by searching a database to see if the customer is part of the state in which the matching take place.
  • 10. 6.2 Event Patterns Example Filter Pattern 1/2 All orders from customers in response to a discount announcement ● We interpret “in response to” as a causal relationship. ● The pattern picks out from the set of all order events those orders that are caused by the announcement. ● It acts as a filter using the causal relationship between an order event and the announcement event to reduce the space of events to a small part of the incoming events.
  • 11. 6.2 Event Patterns Example Filter Pattern 2/2 Order Confirm Order ... Confirm Order Order ... Order Discount ... ... ...
  • 12. 6.2 Event Patterns Example Complex Pattern 1/2 All orders from customers at the regular price that have led to the customer requesting a reduced price in response to the discount announcement ● The fourth pattern is more complicated. ● Matching this pattern uses relationships between three events: the order, the announcement, and the request in the poset of incoming events. ● This kind of pattern is beyond the power of expression of most event pattern languages.
  • 13. 6.2 Event Patterns Example Complex Pattern 2/2 Discount Order Order Order Confirm Reduction Request Reduction Request ...
  • 14. 6.3 A Strawman Pattern Language ● A Strawman Pattern Language: STRAW-EPL ● This is not a powreful event pattern language. ● STRAW-EPL can be used to specify patterns with three relational operators: and, or, ->(causes) ● Some examples ○ A and B and C: Matches a set of three events, A, B, C ○ A or B or C: Matches any one of A, B, or C ○ A -> B: Matches pairs of events A, B where A causes B
  • 15. 6.3 A Strawman Pattern Language Four Elements of STRAW-EPL 1/2 ● Variables are declared with their types: ○ A variable M of type Message: Message M; ○ A variable T of type Time: Time T; ● Event types have a name and a parameter list of variables and their types: ○ A Send event: Send(Message M, Bit B, Timt T); ○ A ReSend event: ReSend(Message M, Bit B, Time T);
  • 16. 6.3 A Strawman Pattern Language Four Elements of STRAW-EPL 2/2 ● A pattern is a set of event templates together with relationships between the event templates: ○ A Send and Resend with the same message and bit,, and possibly different timestamps: Send(M, B, T1) and ReSend(M, B,T2) ● A context condition is a test that must be true when the pattern is matched: ○ The time between the Send and ReSend event must be less than a bound: 0 < T2 - T1 < 10;
  • 17. 6.3.1 Pattern Matching ● Each match of a pattern is a poset that is an instance of the pattern constructed by replacing variables in the pattern with the values. ● A variable must be replaced by the same value wherever it occurs in the pattern. ● The process of replacing variables in a pattrn with values is called matching.
  • 18. 6.3.2 Writing Patterns in STRAW-EPL ● Patterns in STRAW-EPL are written in a tabular format. ● The table gives the name of the pattern and each of its element ● The tabular format declares ○ the variables(also called placeholders) in the pattern together with their types, ○ the types of events in the pattern, ○ the relational operators used in the pattern, ○ the pattern, ○ and the context test.
  • 19. 6.3.2 Writing Patterns in STRAW-EPL Example Pattern: Data Transfer Pattern: Data Transfer Element Declarations Variable Data D, Bit B, Time T, Time T1, Time T2 Event types Send(Data D, Bit B, Time T) Receive(Data D, Bit B, Time T) Ack(Bit B, Timt T) RecAck(Bit B, Time T) Relational operators ->(causes) Pattern Send(D, B, T1) -> Receive(D, B, T) -> Ack(B, T) -> RecAck (B, T2) Context test T2 - T1 < 10 secs
  • 20. 6.3.2 Writing Patterns in STRAW-EPL Example Pattern: StockTrade Messsage Test Pattern: StockTrade Message Test Element Declarations Variable Subject S, Message M, String Id, Time T, Time T1, Time T2 Event types Publish(Subject S, String Id, Message M, Time T) Receive(Subject S, String Id, Message M, Time T) Relational operators and Pattern Publish(S, Id, M, T) and Receive(S, Id, M, T) Context test T2 - T1 < 35 mins and S = “StockTrade”
  • 21. 6.4 Event Pattern Rules 1/3 ● An event pattren rule is reactive rule that specifies an action to be taken whenever an event pattern is matched. ● An event pattern rule implies a causal relationship between the events that trigger it by matching its pattern and the events that are created when the rule executes its action. ● A reactive rule has two parts: ○ A trigger, which is an event pattern ○ An action, which is an event that is created whenever the trigger matches
  • 22. 6.4 Event Pattern Rules 2/3 ● The causal implication is, whenever an event pattern rule is triggered by a poset of events, the event it creates is caused by the triggering events. ● The triggering events are causal ancestors of the new event.
  • 23. 6.4 Event Pattern Rules 3/3 ● Reactive rules can be either sequential or parallel. ○ A sequential rule implies that all its triggerings take place in a sequence, one after the other. ○ A parallel rule implies that its triggerings take place independently, as if executed by new threads of control. MT502 MT513 MT502 MT502 MT513 Sequential MT513 MT502 MT513 MT502 MT513 Parallel MT502 MT513
  • 24. 6.4 Event Pattern Rules 1/2 Example Rule: Warning of late network data transfer Element Declarations Variable Node N1, N2, Data D, Bit B, Time T1, T2, T3, T4 Event types Send(Node N1,Node N2, Data D, Bit B, Time T1) Receive(Node N1,Node N2, Data D, Bit B, Time T1) Ack(Node N1,Node N2, Bit B, Timt T1) RecAck(Node N1, Node N2, Bit B, Time T) Warning(Node N1, Node N2, Time T1, Time T2) Relational operators ->(causes) Pattern Send(N1, N2, D, B, T1) -> Receive(N2, N1, D, B, T2) -> Ack(N2, N1, B, T3) -> RecAck (N1, N2, B, T4) Context test T4 - T1 < 1 hour Action create Warning(N1, N2, T1, T4)
  • 25. 6.4 Event Pattern Rules 2/2 Example Rule: Warning of late network data transfer Warning Send Receive Ack TimeOut Resend RecAck TimeOut
  • 26. 6.5 Constraints 1/3 ● A constraints expresses a condition that must be satisfied by the events observed in a system. ● Constraints can be used to specify not only how a target system should behave, but also how its user should use it. ● Our strawman constraints express a very simple of condition called never constraints. ● A never constraint consists of the following: ○ The temporal operator never ○ A STRAW-EPL pattern
  • 27. 6.5 Constraints 2/3 Never Confirm and Then Cancel an Order Element Declarations Variable Customer Id, Item I, OrderNo N, Dollars Price, Time T1, Time T2 Event types Confirm(Customer Id, OrderNo N, Item I, Dollars Price, Time T1) Deny(Customer Id, OrderNo N, Item I, Dollars Price, Time T1) Relational operators and Temporal operator never Pattern Confirm(Id, N, I, Price, T1) and Deny(Id, N, I, Price, T2) Context test T1 <= T2
  • 28. 6.5 Constraints 3/3 ● The purpose of a rule is to create new events in response to situations. ● The purpose of a constraints is different, simply to monitor for a situation. ● Typically, a constraint is used to express a requirement on system behavior that is not guaranteed by the system.