Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA)...
Transcript of Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA)...
![Page 1: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/1.jpg)
The Role of Rules in CEP
Paul Vincent,
CTO Business Rules and CEP, TIBCO Software
^ and Rule Standards^ and Rule Standards^ and Rule Standards^ and Rule Standards
![Page 2: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/2.jpg)
2 © 2008 TIBCO Software Inc.
Presenter
� Paul Vincent, MSc, BSc, MBCS, CEng
� Business Rules and Complex Event Processing specialist
� Contributor to relevant standards (OMG PRR, W3C RIF)
and industry consortia (EPTS)
� Contributor to http://tibcoblogs.com/cep/
� TIBCO Software
� Provides enterprise software that helps companies achieve
service-oriented architecture (SOA) and business process management (BPM) success
� Over 3,000 customers and offices in 40 countries
� 3 main technology areas: SOA, BPM and Business Optimization
� CEP: TIBCO BusinessEvents
� CEP Customers: Telco, Finance, Manufacturing/RFID, Transport/Logistics
� Contributor to / member of OMG, OASIS, W3C, etc
![Page 3: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/3.jpg)
3 © 2008 TIBCO Software Inc.
Complex Event Processing
ContinuousEventProcessing
NewOrderNew
OrderNew
Order
(Lots ofEvents)
EventStore
Complex Patterns of Events
Business Processes:BPM & Workflow Processes
IT Services: SOA & traditional Data Processing
PersistenceServices
Sense and Respond
Track and Trace
Situational Awareness
![Page 4: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/4.jpg)
4 © 2008 TIBCO Software Inc.
Complex Event Processing
Processing type:
DecisionProcessing
EventProcessing
![Page 5: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/5.jpg)
5 © 2008 TIBCO Software Inc.
Complex Business Problems
� Fraud / Theft� Thousands-to-millions of high-value small-size product
items or transactions
� How do you identify known patterns of “suspicious”behavior?
� Logistics / Scheduling� Raw material, production & delivery scheduling and
resources are complex and prone to change
� How do we reallocate resources to handle business and production changes?
� Activity Monitoring� Complex production and supply process with multiple
actors
� How to measure and action Key Performance Indicators?
Product location change
Relevant event of interest
Resource, requirement change
Process data change
![Page 6: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/6.jpg)
6 © 2008 TIBCO Software Inc.
Associated Events
� Positive Events
� Product item X arrives at Production station S from Store T
� Production worker Y arrives at Production station S
� Production contract for item Z by time T is posted
� Negative Events
� Product item X has been in transit to Store T for >15 minutes
� Subcomponent Y hasn’t arrived at the Production station by the ETA
� Delivery of contract Z has not taken place
� Sets of Events
� 5+ items of Product item type Y failed to arrive at destination
� Supplier Y was 5 mins late for 1 delivery, but made it early to the next
� Return rate on component Z exceeds SLA %
![Page 7: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/7.jpg)
7 © 2008 TIBCO Software Inc.
Significant features of these Events
� Time Sensitivity
� A thief may leave the building at the same time as stolen product
� A product should take 40 minutes to travel a given production line
segment
� Distributed Event Sources
� A series of produced items fails at various QA stages, and their
common attribute was a storage location
� Multiple suppliers for a subcomponent are reporting delivery delays
15:39:26.41315:39:26.41315:39:26.41315:39:26.413
Dec 24Dec 24Dec 24Dec 24
ERP Supplier
![Page 8: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/8.jpg)
8 © 2008 TIBCO Software Inc.
CEP Technologies are diverse
� CEP applies pattern detection (including filtration) to the event cloud / streams / history thereof
� Multiple modelling + execution paradigms available for pattern detection
� No single standard likely to suffice
NewOrderNew
OrderEvent Cloud
Event Streams
IT
![Page 9: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/9.jpg)
9 © 2008 TIBCO Software Inc.
His
tory
an
d C
ac
he
“Requirements for CEP Technology”
� Access and Monitor the “Event Cloud”
� JMS, RV, MQ, TCP/IP, etc…
� Timers to detect lack of events
� Determine event state changes
� Match Patterns, Apply Business Logic
� Detect events
� Detect event patterns
� Maintain State and Facts over time
� Update Detection algorithms as events
change
Pattern Detection Model
for recognizing patterns,
defining actions
Temporal Model
for determining time-dependent info
Event and Data Model
for information modeling
Event Bus or Source
Low-latency reliable
message delivery
![Page 10: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/10.jpg)
10 © 2008 TIBCO Software Inc.
CEP Problem Characteristics
Events throughputper second
Processingcomplexityper event Problem A
Problem B
![Page 11: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/11.jpg)
11 © 2008 TIBCO Software Inc.
Different CEP Implementations
Event Sources
Event Consumers
EventCache
EventBus
Eve
nt
Bu
s
Event Services Cache Types of CEP Agents / Processes
Rule-Driven CEP
State Engine
Inference
Rule Engine
State Model
Rulebase
Event Stream Processing CEP
ProcessFlow
of queriesStream Queries
Neural Net CEP
Neural Net Network
![Page 12: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/12.jpg)
12 © 2008 TIBCO Software Inc.
Advanced CEP Architectures
Event Sources
Event Consumers
EventCache
EventBus
Eve
nt
Bu
s
Rule-Driven CEP
State Engine
Inference
Rule Engine
State Model
Rulebase
BI / Analytics tools
Graphical
Queries
Dashboard
Graphical
Reports
Other real-time optimization tools
Machine Learning
Ontologies,
Logic MetaRules
Distributed
BPM / SOA infrastructure control
![Page 13: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/13.jpg)
13 © 2008 TIBCO Software Inc.
CEP (4)
CEP (3)
CEP (2)
CEP and Other Architectures
Event Sources
Event Consumers
EventCacheEvent
Bus
Eve
nt
Bu
s
Complex Event
ProcessingAgent (1)
Distributed
HelperProcesses
andServices
Business ProcessManagement
SOA Services
Data Services
![Page 14: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/14.jpg)
14 © 2008 TIBCO Software Inc.
Example Related Standards
History and Cache
Pattern Detection Model
for recognizing patterns,
defining actions
Temporal Model
for determining
time-dependent info
Event and Data Model
for information modeling
Event Bus or Source
Low-latency reliable
message delivery
OMG EMP(RFP in progress)
OMG UML2Class Models
OMG UML2
State Models
JMS
![Page 15: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/15.jpg)
15 © 2008 TIBCO Software Inc.
Rule
Rule-oriented view of CEP Patterns
History and Cache
Pattern Detection Model
for recognizing patterns,
defining actions
Temporal Model
for determining
time-dependent info
Event and Data Model
for information modeling
Event Bus or Source
Low-latency reliable
message delivery
Complex Patterns
NewOrderNew
OrderNew
Order
(Lots ofEvents)
Reaction
![Page 16: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/16.jpg)
16 © 2008 TIBCO Software Inc.
Rule Representation options
Common representations:
Continuous Query Languages
Production Rule Conditions
…
Common representations:
Script languages
Java-based languages
…
Common execution semantics:
Orchestration/ordering of queries
Rete-based inferencing
…
![Page 17: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/17.jpg)
17 © 2008 TIBCO Software Inc.
Rule types for CEP
DerivationRule ReactionRuleIntegrityRule
SQL:1999
Assertion
ProductionRule
ECARule
SQL: 1999 Trigger
SQL:1999 View
OCL 2.0 Invariant
XSB 2.6 Prolog
Rule Jess 3.4 Rule
ECAPRule
TransformationRule
XSL 1.0 Rule
MS Outlook 6 RuleOracle 10g
SQL View
ILOG JRule
Rule
InferenceRule ProdeduralRule
{OR}
Rule classification
per Gerd Wagner, RuleML
TIBCO Rule
BlazeAdvisorRule
![Page 18: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/18.jpg)
18 © 2008 TIBCO Software Inc.
Current Standards for Rules (per OMG MDA)
Code / Execution
PlatformSpecificModels (PSM)
UML Models -platform specific
Model Driven Architecture (MDA)
ComputationIndependentModels (CIM)
Business Models
PlatformIndependentModels (PIM)
UML Models
Semantics for Business
Vocabulary and Rules (SBVR)
Production RuleRepresentation
(PRR)
RuleInterchange Format
(RIF)
JSR-94
To
p-d
ow
n a
na
lys
is a
nd
de
ve
lop
me
nt
![Page 19: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/19.jpg)
19 © 2008 TIBCO Software Inc.
OMG MDA and Class/Object/Data Models
Platform
Independent
Models (PIM)
Computation
Independent
Models (CIM)
SBVRSemantics for Business Vocabularies and Rules
Platform
Specific
Models (PSM)
OMG W3C
UML2Class Models
SUN Java SQL MS .NET W3C WSDL W3C XML
Withplatform-specific
extensions
W3C RDF
ODMOntology Definition Metamodel
OWLWeb Ontology Language
![Page 20: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/20.jpg)
20 © 2008 TIBCO Software Inc.
OMG MDA and Rule Models
Platform
Independent
Models (PIM)
Computation
Independent
Models (CIM)
SBVRSemantics for Business Vocabularies and Rules
Platform
Specific
Models (PSM)
OMG W3C
PRRProduction Rule Representation
RIFRule Interchange Format
OWLWeb Ontology Language
BlazeILOGDROOLSJESSPega
OCLObject Constraint Language
TIBCO
![Page 21: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/21.jpg)
21 © 2008 TIBCO Software Inc.
MDA PIM: OMG PRR
� Formal UML model for production rules
� Defined in UML
� Extends UML so production rules are
1st class citizens alongside objects
� Vendor-neutral UML-friendly rule representation
� Rules specified via tools, not manually!
� 2 rule “semantics” (types):
1. Forward chaining inference rules
(e.g. Rete-model)
2. Sequentially processed procedural rules
(e.g. scripts)
� Import/export for rule modeling
� XMI between UML tools and BREs
objects
rules
Production RuleRepresentation
(PRR)
![Page 22: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/22.jpg)
22 © 2008 TIBCO Software Inc.
PRR metamodel
� Ruleset = collection of Rule
� Rule is (for RuleVariables) if <Condition> then <Actions>
Complex Patterns
![Page 23: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/23.jpg)
23 © 2008 TIBCO Software Inc.
MDA PSM: W3C Rule Interchange Format
� Rule Interchange Format proposed as a cross-vendor and cross-rule-type rule interchange representation
� Consortium of developers and researchers
from the
� rule vendor community (TIBCO, Fair Isaac, Ilog,
Oracle, etc)
� research community (RuleML.org, DERI,
REWERSE, IBM R&D, etc)
� end-user community (MISMO, Betfair, MITRE, etc)
� CEP members include TIBCO, Prova
Ruleml.org
RuleInterchange Format
(RIF)
![Page 24: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/24.jpg)
24 © 2008 TIBCO Software Inc.
RIF = Superset rule language
� A format (but actually a language itself)
� Allows rules written for one application to be published, shared, and re-
used in other applications and other rule engines.
� Part of W3C's larger mission of enabling the sharing of information in
forms suited to machine processing
� Includes semantic web rule languages as well as commercial tools
Application A
Rules
DataRule
system 1
Application B
Rules
DataRule
system 2
<RIF doc>maps maps
![Page 25: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/25.jpg)
25 © 2008 TIBCO Software Inc.
Equivalences in PRR and RIF
W3C technology stackOMG modeling stack
PRR RIF
PRR v1
PRR v2
usingRIF expr lang
RIF Dialect
for PR(PRD)
RIF Dialect
for logic rules
Modeling: design time Interchange: run time
Shared metamodel
Shared expressionlanguage
Equivalent semantics
+Simple
Translation
![Page 26: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/26.jpg)
26 © 2008 TIBCO Software Inc.
Timeline for Rule Stds
common community
Java Community Process
2006200520042003200220012000
W3C RIF WG
OMGBusiness RulesWorking Group
Business Modeling and IntegrationBMI
JSR-94 Rule Engine API
PRRPRR RFP
SBVRBSBR RFP
RIF
JSR-94
RuleML.org
BMM
RuleML schema
Organizations
Standards
2007 2008
![Page 27: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/27.jpg)
27 © 2008 TIBCO Software Inc.
Summary
� Rules are a relevant pattern for CEP modeling + implementation
� Rule standards now in development by a large, active community
� CEP members include: TIBCO, Prova
� Vendors involved who have other groups doing CEP: Oracle, IBM
� Standardization process improves communication among vendors,
academics � better understanding of rules and rule uses
� PRR and RIF PRD kept in sync by common membership
� Timescale: PRR1.0 finalization, PRD Draft in 2008
![Page 28: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/28.jpg)
28 © 2008 TIBCO Software Inc.
The End
Q&A
![Page 29: Role of Rules in CEP v1 1 - TIBCO Software · 2019-01-09 · service-oriented architecture (SOA) and business process management (BPM) success Over 3,000 customers and offices in](https://reader033.fdocuments.us/reader033/viewer/2022060410/5f10628c7e708231d448d909/html5/thumbnails/29.jpg)
29 © 2008 TIBCO Software Inc.
References & Q&A
� OMG = http://www.omg.org
� OMG BMI = http://bmi.omg.org/
includes the Business Rules Working Group (PRR and SBVR standards)
as well as BPMI (BPMN standard)
� OMG PRR details [OMG only] =
http://www.omg.org/techprocess/meetings/schedule/Prod._Rule_Representation_RFP.html
� W3C = http://www.w3.org
� W3C RIF = http://www.w3.org/2005/rules/wg
� Java JSR-94 = http://www.jcp.org/en/jsr/detail?id=94
� Academic Community
� RuleML = http://www.ruleml.org/
� Related EU projects: http://rewerse.net/