Presentation is loading. Please wait.

Presentation is loading. Please wait.

SYSTEMATIC THOUGHT LEADERSHIP FOR INNOVATIVE BUSINESS Blending Complex Event Processing with the RETE Algorithm 2008 Kay-Uwe Schmidt, SAP Research.

Similar presentations


Presentation on theme: "SYSTEMATIC THOUGHT LEADERSHIP FOR INNOVATIVE BUSINESS Blending Complex Event Processing with the RETE Algorithm 2008 Kay-Uwe Schmidt, SAP Research."— Presentation transcript:

1 SYSTEMATIC THOUGHT LEADERSHIP FOR INNOVATIVE BUSINESS Blending Complex Event Processing with the RETE Algorithm iCEP@FIS 2008 Kay-Uwe Schmidt, SAP Research 28.09.2008 Addl. Authors: Roland Stühmer (SAP), Ljiljana Stojanovic (FZI)

2 © SAP 2008 / Kay-Uwe Schmidt / Page 2 1.The Evolution of Rule-based Web Applications 2.State of the Art in Combining CEP and Rete 3.Enhancing RETE with SnoopIB 4.Evaluation and Conclusions Agenda

3 © SAP 2008 / Kay-Uwe Schmidt / Page 3 From Server- to Client-side Adaptive Hypermedia Systems (AHSs) Traditional adaptation strategies have been intensively studied Web Page Paradigm: Every Web page in a series of pages is downloaded separately. Conventional architecture: tracking of user clicks, the user modeling, as well as the adaptation take place on the server. Limited user tracking possibilities User requests seen by the server Subset of user clicks Adaptation only on behalf of an explicit user request On-the-fly adaptation not obtainable

4 © SAP 2008 / Kay-Uwe Schmidt / Page 4 From Server- to Client-side Adaptive Hypermedia Systems (AHSs) RIAs / AJAX New user tracking possibilities New user interface adaptation possibilities Look and feel of desktop applications Highly responsive user interfaces Adaptation rules still on the server On-the-fly adaptation not obtainable

5 © SAP 2008 / Kay-Uwe Schmidt / Page 5 From Server- to Client-side Adaptive Hypermedia Systems (AHSs) Client-side rule processing Reduction of client-server-communication to a minimum Enhanced user tracking capabilities In-time response to user actions On-the-fly adaptation is obtainable

6 © SAP 2008 / Kay-Uwe Schmidt / Page 6 Run-time Architecture

7 © SAP 2008 / Kay-Uwe Schmidt / Page 7 1.The Evolution of Rule-based Web Applications 2.State of the Art in Combining CEP and Rete 3.Enhancing RETE with SnoopIB 4.Evaluation and Conclusions Agenda

8 © SAP 2008 / Kay-Uwe Schmidt / Page 8 State of the Art: Production Rule Systems Pattern Recognition Algorithms RETE algorithm [1, 2] Others TREAT [3], LEAPS [4] or GATOR [5] CA-Rules OPS5 [6] Scope Long-living Business Objects 1. Charles L. Forgy. On the efficient implementation of production systems. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA, 1979. 2. Charles L. Forgy. Rete: a fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19:17- 37, 1982. 3. Daniel P. Miranker. Treat: A better match algorithm for ai production system matching. In AAAI, pages 42-47, 1987. 4. Don Batory. The leaps algorithms. Technical report, University of Texas at Austin, Austin, TX, USA, 1994. 5. E. N. Hanson and M. S. Hasan. Gator: An optimized discrimination network for active database rule condition testing, technical report tr-93-036. Technical report, CIS Department, University of Florida, 1993. 6. Charles L. Forgy. The ops5 user's manual. technical report cmu-cs-81-135, 1981.

9 © SAP 2008 / Kay-Uwe Schmidt / Page 9 Event Condition Action Rules First mention of the ECA paradigm by U. Dayal, A. P. Buchmann, and D. R. McCarthy in 1988 Rules are objects too: A knowledge model for an active, object-oriented databasesystem. In Lecture notes in computer science on Advances in object-oriented database systems, pages 129-143, New York, NY, USA, 1988. Springer-Verlag New York, Inc. This paper describes work in progress on the knowledge model (an extended data model that includes constructs for representing rules) of HiPAC, an active, object-oriented DBMS. Central to our knowledge model is the concept of event-condition-action (ECA) rules, which generalizes the many different mechanisms introduced previously in the literature to support active DBMS functions. The event part of an ECA rule specifies database operations, temporal events, or signals from arbitrary processes; the condition part specifies database queries; and the action part specifies a program. When the event occurs (is signaled, the condition is evaluated; if the condition is satisfied, the action isexecuted. ON event IF condition DO action

10 © SAP 2008 / Kay-Uwe Schmidt / Page 10 Event Processing The two kinds of event processing: Complex Event Processing (CEP) Event Stream Processing (ESP) Dealing with different problems in event processing using different approaches ESP – extraction of simple events from a stream Events are totally ordered by time Emphasis of ESP on efficiency for high throughput and low latency Algorithmic stock trading CEP – extraction of complex event patterns from a cloud Only a partial temporal order of events Other partial order of interest for CEP is for instance causality More time and memory needed Business Process Monitoring CEP is a superset of ESP CEP and ESP nowadays adopt each others approaches

11 © SAP 2008 / Kay-Uwe Schmidt / Page 11 Event Detection Languages Development for active databases in the late 80s and early 90s Use complex event specifications to facilitate database triggers Simple events carry a type, their occurrence time and possibly other parameters Creation of complex nested expressions, using operators like And, Or, Sequence, and others Complex events are detected from occurrences of one or more of simple or complex events Structure of event patterns: event operators A nested event operator might have several event types as arguments An event detector for the given pattern functions as a stream pattern matcher and listens for events that satisfy the type constraints and together satisfy the semantics of the given operator, e.g. occurred in sequence

12 © SAP 2008 / Kay-Uwe Schmidt / Page 12 Complex Event Detection Algorithms Finite State Automata Ode 1992 Transformation of complex event expressions into deterministic finite automata Convenient model to define the semantics of complex event operators Downside no acceptance of overlapping occurrences of the same complex event Colored Petri Nets SAMOS 1994 Convenient model to define the semantics of complex event operators Also the detection of overlapping occurrences is possible Graph-based Approaches

13 © SAP 2008 / Kay-Uwe Schmidt / Page 13 Graph-based Approaches Sentinel based on Snoop, SnoopIB in the mid 90s Construction of the graph from the event expressions Example: (E1,E2);E3 The graph is a directed acyclic graph and generally does not form a tree Nodes may have several parents, when their represented expression is part of more than one complex events There is no single root node, when there is no overarching, single most complex event. ;, E3E1E2

14 © SAP 2008 / Kay-Uwe Schmidt / Page 14 Overview of the State of the Art in Event Processing Graph-based Approaches Finite State Automata Colored Petri Nets Pattern Matching in Streams then DB Tables, Sliding Windows StreamSQL Event Processing Complex Event Processing Event Stream Processing

15 © SAP 2008 / Kay-Uwe Schmidt / Page 15 Adding Complex Event Processing to Rete Research Question How can both pattern recognition algorithms be integrated in an efficient manner? Different approaches Merging of event processing into rule processing Merging of rule processing into event processing Loose coupling of event with rule processing

16 © SAP 2008 / Kay-Uwe Schmidt / Page 16 Conceptual Differences between Facts and Events 7. Opher Etzion. On events and data. Online Article. http://epthinking.blogspot.com/2008/07/on-events-and-data.html, July 2008. 8. Francois Bry and Michael Eckert. Twelve theses on reactive rules for the web. In Torsten Grust, Hagen Höpfner, Arantza Illarramendi, Stefan Jablonski, Marco Mesiti, Sascha Müuller, Paula-Lavinia Patranjan, Kai-Uwe Sattler, Myra Spiliopoulou, and Jef Wijsen, editors, EDBT Workshops, volume 4254 of Lecture Notes in Computer Science, pages 842{854. Springer, 2006. [7] [8]

17 © SAP 2008 / Kay-Uwe Schmidt / Page 17 Maloof 93 Maloof et al. [9] Reasoning about relative time representations Temporal operators before, during and after Interval-based semantics Details of implementation unclear 9. M.A. Maloof and K.J. Kochut. Modifying rete to reason temporally. Tools with Artificial Intelligence, 1993. TAI '93. Proceedings., Fifth International Conference on, pages 472-473, Nov 1993.

18 © SAP 2008 / Kay-Uwe Schmidt / Page 18 Berstel 02 Berstel [10] Temporal operators before and after Time-point-based semantics (no correct detection of sequences) Garbage-collection mechanism Events are special facts which are asserted through a special API 10. Bruno Berstel. Extending the rete algorithm for event management. In Proc. Ninth International Symposium on Temporal Representation and Reasoning TIME 2002, pages 49-51, Washington, DC, USA, 7{9 July 2002. IEEE Computer Society.

19 © SAP 2008 / Kay-Uwe Schmidt / Page 19 Walzer 08 Walzer [11, 12] 13 temporal relations from Allen [13] – all relations intervals can have Temporal operators for each of the 13 relations are introduced, e.g. equal, before, after, during, overlaps, etc. Interval-based semantics Sliding window garbage collector 11. Karen Walzer, Alexander Schill, and Alexander Löser. Temporal constraints for rule-based event processing. In Aparna S. Varde and Jian Pei, editors, PIKM, pages 93-100. ACM, 2007. 12. Karen Walzer, Tino Breddin, and Matthias Groch. Relative temporal constraints in the rete algorithm for complex event detection. In DEBS '08: Proceedings of the second international conference on Distributed event-based systems, pages 147- 155, New York, NY, USA, 2008. ACM. 13. James F. Allen. Maintaining knowledge about temporal intervals. Commun. ACM, 26(11):832-843, 1983.

20 © SAP 2008 / Kay-Uwe Schmidt / Page 20 Comparison Time-point vs. interval-based semantics Number of temporal operators Working memory holds all events Garbage collection No real publish / subscribe New rules can match events from the past Retained by an already existing rule The match of the new rule might depend on older ones Unclear semantics Events are not facts Immutable Modify and Retract operation seem not applicable No notion of event selection and consumption

21 © SAP 2008 / Kay-Uwe Schmidt / Page 21 Implications of Holding Events in Working Memory Garbage collection No real publish / subscribe New rules can match events from the past Retained by an already existing rule The match of the new rule might depend on older ones Unclear semantics Events are immutable Modify and Retract operation seem not applicable No notion of event selection and consumption Contexts: recent, chronicle, continuous, cumulative [18] 18. Sharma Chakravarthy, V. Krishnaprasad, Eman Anwar, and S. K. Kim. Composite events for active databases: Semantics, contexts and detection. In Jorge B. Bocca, Matthias Jarke, and Carlo Zaniolo, editors, 20th International Conference on Very Large Data Bases, September 12-15, 1994, Santiago, Chile proceedings, pages 606-617, Los Altos, CA 94022, USA, 1994. Morgan Kaufmann Publishers.

22 © SAP 2008 / Kay-Uwe Schmidt / Page 22 1.The Evolution of Rule-based Web Applications 2.State of the Art in Combining CEP and Rete 3.Enhancing RETE with SnoopIB 4.Evaluation and Conclusions Agenda

23 © SAP 2008 / Kay-Uwe Schmidt / Page 23 Coupling RETE with CEP The RETE network, depicted at the top, is responsible for rule conditions and finds matching facts fulfilling rule conditions. The event-detection graph, at bottom left, is responsible for event specifications and finds events matching an event pattern. Both RETE and the event graph propagate their results to newly introduced top nodes. These nodes trigger rule actions. Figure: (E1,E2);E3 x.y=1 & x.z=2 Action Example:

24 © SAP 2008 / Kay-Uwe Schmidt / Page 24 Advantages The event graph can have nodes with more than two input edges This more closely resembles higher-level event operators from Snoop which we are using. Also garbage-collection comes more naturally Events are stored and discarded in the queues of event nodes where they are still needed. There is no global repository for unused or partially unused events like the working memory from RETE. Consumption modes are selectable (on a per-node basis, if necessary) This allows for the controlled selection of events from a stream, if more than one events have arrived and might be fitting for a match. For an ECA rule action to fire, an event must be detected, and for its complete interval, the condition must be fulfilled Vice versa this means that no events need to be correlated as long as RETE supplies no matched tokens.

25 © SAP 2008 / Kay-Uwe Schmidt / Page 25 1.The Evolution of Rule-based Web Applications 2.State of the Art in Combining CEP and Rete 3.Enhancing RETE with SnoopIB 4.Evaluation and Conclusions Agenda

26 © SAP 2008 / Kay-Uwe Schmidt / Page 26 Conclusions Rete seems not a natural fit for doing event processing Reasoning over persistent and mutable vs. transient and immutable facts Many changes towards temporal capabilities as well as event expiry must be added Our approach: Blending CEP with RETE Solution to avoid the indicated mismatch of requirements Combination of dedicated event processing nodes with RETE nodes Pending evaluation

27 © SAP 2008 / Kay-Uwe Schmidt / Page 27 Questions? Thank you!

28 © SAP 2008 / Kay-Uwe Schmidt / Page 28 Contexts

29 © SAP 2008 / Kay-Uwe Schmidt / Page 29 Copyright 2007 SAP AG All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned and associated logos displayed are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. The information in this document is proprietary to SAP. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden. Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte können länderspezifische Unterschiede aufweisen. Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderen Vereinbarung mit SAP. Dieses Dokument enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend, einen bestimmten Geschäftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht die Richtigkeit oder Vollständigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewähr, weder ausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts. SAP übernimmt keine Haftung für Schäden jeglicher Art, einschließlich und ohne Einschränkung für direkte, spezielle, indirekte oder Folgeschäden im Zusammenhang mit der Verwendung dieser Unterlagen. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit. Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über Internetseiten Dritter ab. Alle Rechte vorbehalten.


Download ppt "SYSTEMATIC THOUGHT LEADERSHIP FOR INNOVATIVE BUSINESS Blending Complex Event Processing with the RETE Algorithm 2008 Kay-Uwe Schmidt, SAP Research."

Similar presentations


Ads by Google