Drools Fusion

Complex Event Process
What is Event Processing (or Complex Event Processing, CEP)?
Use Cases

Complex Event Processing

In the Drools' vision of a unified behavioral modelling platform, Drools Fusion is the module responsible for enabling event processing capabilities.

What is Event Processing (or Complex Event Processing, CEP)?

According to wikipedia (http://en.wikipedia.org/wiki/Complex_Event_Processing):

"Complex Event Processing, or CEP, is primarily an event processing concept that deals with the task of processing multiple events with the goal of identifying the meaningful events within the event cloud. CEP employs techniques such as detection of complex patterns of many events, event correlation and abstraction, event hierarchies, and relationships between events such as causality, membership, and timing, and event-driven processes."

According to the Complex Event Processing (http://complexevents.com/?page_id=3) website, by Research Professor David Luckham:

“Complex Event Processing (CEP) is an emerging technology for building and managing information systems including:
  • Business Activity Monitoring
  • Business Process Management
  • Enterprise Application Integration
  • Event-Driven Architectures
  • Network and business level Security
  • Real time conformance to regulations and policies.”

Drools Fusion Vision

The vision on Drools 5 of a Behavioural Modeling Platform can only be achieved by moving away from any of the narrow modeling perspectives that see only Rules, or Processes, or Events as their main modeling concept. To effectively achieve the flexibility and power of behavioural modeling, a platform must understand all of these concepts as primary concepts and allow them to leverage on each other strengths.

Drools Fusion, in this scenario, is an independent module, but still completely integrated with the rest of the platform, that adds a set of features to enable it:

  • understand and handle events as first class citizens of the platform

  • select a set of interesting events in a cloud or stream of events

  • detect the relevant relationships (patterns) among these events

  • take appropriate actions based on the patterns detected

Drools Fusion Features

  • Events as first class citizens: events are a special entity that are a record of a significant change of state in the application domain. They have several unique and distinguishing characteristics, like being usually immutable, having strong temporal constraints and relationships. Drools Fusion understand events by what they are and allow users to model business rules, queries and processes depending on the occurence or absence of them
  • Support asynchronous multi-thread streams: events may arrive at any time and from multiple sources (or streams). They can also be stored in cloud-like structures. Drools Fusion supports both work with streams and clouds of events. In case of streams it supports asynchronous, multi-thread feeding of events.

  • Support for temporal reasoning: events usually have strong temporal relationships and constraints. Drools Fusion adds a complete set of temporal operators to allow modelling and reasoning over temporal relationships between events.

  • Support events garbage collection: events grow old, quickly or slow, but they do grow old. Drools Fusion is able to identify the events that are no longer needed and dispose them as a way of freeing resources and scaling well on growing volumes.

  • Support reasoning over absence of events: the same way in that it is necessary to model rules and processes that react to the presence of events, it is necessary to model rules and processes that react to the absence of events. Example: "If the temperature goes over the threshold and no contention measure is taken within 10 seconds, then sound the alarm". Drools Fusion leverages on the capabilities of the Drools Expert engine, allowing it complete and flexible reasoning over the absence of events, including the transparent delaying of rules in case of events that require a waiting period before firing the absence.

  • Support to Sliding Windows: a especially common scenario on Event Processing applications is the requirement of doing calculations on moving windows of interest, be it temporal or length-based windows. Drools Fusion has complete support for Sliding Windows, providing out of the box aggregation functions as well as leveraging the plugable function framework to allow for the use of users defined custom functions.

Drools Fusion Use Cases

Drools Fusion has a double goal: first is to enhance the capabilities of the Drools Expert module with features like temporal reasoning, that are useful not only when dealing with events, but with regular facts too. And second, allow Drools as a platform to enable modeling of CEP scenarios. Scenarios that are very frequent in business environments and that can benefit from the higher level modeling and advanced processing capabilities of the platform. Examples like:

  • Algorithmic Trading

  • Telecom Rating

  • Fraud Detection

  • Content Based Routing

  • Credit Approval

  • Insurance Pricing

  • Risk Assessment

  • and many many more

Drools ability to process both streams and clouds of events allow for flexibility on modeling scenarios that range from batch to near-real time processing. And best of all, it is all Open Source.