Drools
Encyclopedia
Drools is a business rule management system (BRMS) with a forward chaining
inference
based rules engine, more correctly known as a production rule system, using an enhanced implementation of the Rete algorithm
.
Drools supports the JSR-94
standard for its business rule
engine and enterprise framework for the construction, maintenance, and enforcement of business policies in an organization, application, or service.
. Drools 1.0 was never released as the limitations of a brute force linear search
approach were soon realised and work started on Drools 2.0, which was loosely based on the Rete algorithm
, and the project was moved to Codehaus. During the 2.0 development cycle at Codehaus Nobi Y became the project lead and moved the project to a final 2.0 release. At this point the project had become the leading Java open source
rule engine with a strong community and demand had started for commercial services. In October 2005 Drools was federated into JBoss
as part of their JEMS offering and rebranded JBoss Rules. In 2006 JBoss itself was acquired by Red Hat
. With financial backing from JBoss the JBoss Rules rewrite was possible with a full and enhanced Rete implementation with GUI tooling. Mid 2007 the Drools name was reclaimed since after two years people were still predominantly calling it Drools and having to refer to it as "Drools aka JBoss Rules", or "Drools (JBoss Rules)" was confusing.
(in a module called Fusion) and workflow capabilities (in a module called Flow).
's Rete algorithm
tailored for the Java language. Adapting Rete to an object-oriented interface allows for more natural expression of business rules with regards to business objects. Drools is written in Java, but able to run on Java and .NET
.
Drools is designed to allow pluggable language implementations. Currently, rules can be written in Java
, MVEL
, Python
, and Groovy. Drools also provides for declarative programming
and is flexible enough to match the semantics of the problem domain with domain specific languages (DSL) via XML
using a schema defined for the problem domain. DSLs consist of XML elements and attributes that represent the problem domain.
Components of the enterprise version:
Drools and Guvnor are JBoss Community open source projects. As they are mature, they are brought into the enterprise-ready product JBoss Enterprise BRMS.
Components of the JBoss Community version:
Related systems
External links
Forward chaining
Forward chaining is one of the two main methods of reasoning when using inference rules and can be described logically as repeated application of modus ponens. Forward chaining is a popular implementation strategy for expert systems, business and production rule systems...
inference
Inference
Inference is the act or process of deriving logical conclusions from premises known or assumed to be true. The conclusion drawn is also called an idiomatic. The laws of valid inference are studied in the field of logic.Human inference Inference is the act or process of deriving logical conclusions...
based rules engine, more correctly known as a production rule system, using an enhanced implementation of the Rete algorithm
Rete algorithm
The Rete algorithm is an efficient pattern matching algorithm for implementing production rule systems. The Rete algorithm was designed by Dr Charles L. Forgy of Carnegie Mellon University, first published in a working paper in 1974, and later elaborated in his 1979 Ph.D. thesis and a 1982 paper...
.
Drools supports the JSR-94
JSR-94
JSR-94 is the Java Specification Request for a Java Rules Engine API. The specification for the Java Rule Engine API , developed through the Java Community Process program, defines a Java runtime API for rule engines by providing a simple API to access a rule engine from a Java Platform, Standard...
standard for its business rule
Business rule
A Business rule is a statement that defines or constrains some aspect of the business and always resolves to either true or false. Business rules are intended to assert business structure or to control or influence the behavior of the business. Business rules describe the operations, definitions...
engine and enterprise framework for the construction, maintenance, and enforcement of business policies in an organization, application, or service.
History
The Drools Project was started by Bob McWhirter in 2001 and registered at SourceForgeSourceForge
SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...
. Drools 1.0 was never released as the limitations of a brute force linear search
Brute-force search
In computer science, brute-force search or exhaustive search, also known as generate and test, is a trivial but very general problem-solving technique that consists of systematically enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem's...
approach were soon realised and work started on Drools 2.0, which was loosely based on the Rete algorithm
Rete algorithm
The Rete algorithm is an efficient pattern matching algorithm for implementing production rule systems. The Rete algorithm was designed by Dr Charles L. Forgy of Carnegie Mellon University, first published in a working paper in 1974, and later elaborated in his 1979 Ph.D. thesis and a 1982 paper...
, and the project was moved to Codehaus. During the 2.0 development cycle at Codehaus Nobi Y became the project lead and moved the project to a final 2.0 release. At this point the project had become the leading Java open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
rule engine with a strong community and demand had started for commercial services. In October 2005 Drools was federated into JBoss
JBoss
JBoss Application Server is an open-source Java EE-based application server. An important distinction for this class of software is that it not only implements a server that runs on Java, but it actually implements the Java EE part of Java...
as part of their JEMS offering and rebranded JBoss Rules. In 2006 JBoss itself was acquired by Red Hat
Red Hat
Red Hat, Inc. is an S&P 500 company in the free and open source software sector, and a major Linux distribution vendor. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina with satellite offices worldwide....
. With financial backing from JBoss the JBoss Rules rewrite was possible with a full and enhanced Rete implementation with GUI tooling. Mid 2007 the Drools name was reclaimed since after two years people were still predominantly calling it Drools and having to refer to it as "Drools aka JBoss Rules", or "Drools (JBoss Rules)" was confusing.
Drools 5
Drools version 5.0 was released on May 19, 2009. The main goals of this version are to address complex event processingComplex Event Processing
Complex event processing consists of processing many events happening across all the layers of an organization, identifying the most meaningful events within the event cloud, analyzing their impact, and taking subsequent action in real time....
(in a module called Fusion) and workflow capabilities (in a module called Flow).
Technology
Drools is a rules engine implementation based on Charles ForgyCharles Forgy
Dr Charles L. Forgy is a computer scientist, known for developing the Rete algorithm used in his OPS5 and other production system languages used to build expert systems.- Early Life :Dr...
's Rete algorithm
Rete algorithm
The Rete algorithm is an efficient pattern matching algorithm for implementing production rule systems. The Rete algorithm was designed by Dr Charles L. Forgy of Carnegie Mellon University, first published in a working paper in 1974, and later elaborated in his 1979 Ph.D. thesis and a 1982 paper...
tailored for the Java language. Adapting Rete to an object-oriented interface allows for more natural expression of business rules with regards to business objects. Drools is written in Java, but able to run on Java and .NET
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
.
Drools is designed to allow pluggable language implementations. Currently, rules can be written in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
, MVEL
MVEL
MVFLEX Expression Language is a hybrid dynamic/statically typed, embeddable Expression Language and runtime for the Java Platform. Originally started as a utility language for an application framework, the project is now developed completely independently.MVEL is typically used for exposing basic...
, Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...
, and Groovy. Drools also provides for declarative programming
Declarative programming
In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. Many languages applying this style attempt to minimize or eliminate side effects by describing what the program should accomplish, rather than...
and is flexible enough to match the semantics of the problem domain with domain specific languages (DSL) via XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
using a schema defined for the problem domain. DSLs consist of XML elements and attributes that represent the problem domain.
JBoss Rules
JBoss Rules is a reasoning engine that includes a forward chaining rule engine based on Drools. JBoss Rules is the productised version of Drools; this means it comes with support that will last several years for that particular branch, with bug and essential feature back ports. For a time the Drools name was dropped in an attempt to fully establish the JBoss Rules brand as both the project and the product; however, two years later, the community was mostly still calling it Drools, so the name was reclaimed by the community for the project. The product name remains JBoss Rules.JBoss Enterprise BRMS
JBoss Enterprise BRMS is a business rule management system and reasoning engine for business policy and rules development, access, and change management. JBoss Enterprise BRMS is a productized version of Drools with enterprise-level support available. JBoss Rules is also a productized version of Drools, but JBoss Enterprise BRMS is the flagship product.Components of the enterprise version:
- JBoss Enterprise Web Platform – the software infrastructure, supported to run the BRMS components only
- JBoss Enterprise Application PlatformJBoss Enterprise Application PlatformThe JBoss Enterprise Application Platform is a subscription-based/open-source Java EE-based application server runtime platform used for building, deploying, and hosting highly-transactional Java applications and services. The JBoss Enterprise Application Platform is part of the JBoss Enterprise...
or JBoss Enterprise SOA PlatformJBoss Enterprise SOA PlatformThe JBoss Enterprise SOA Platform is free software/open-source Java EE-based Service Oriented Architecture software. The JBoss Enterprise SOA Platform is part of the JBoss Enterprise Middleware portfolio of software...
– the software infrastructure, supported to run the BRMS components only - Business Rules Engine – Drools Expert using the Rete algorithmRete algorithmThe Rete algorithm is an efficient pattern matching algorithm for implementing production rule systems. The Rete algorithm was designed by Dr Charles L. Forgy of Carnegie Mellon University, first published in a working paper in 1974, and later elaborated in his 1979 Ph.D. thesis and a 1982 paper...
and the Drools Rule Language (DRL) - Business Rules Manager – Drools Guvnor
- Business Rules Repository – Drools Guvnor
Drools and Guvnor are JBoss Community open source projects. As they are mature, they are brought into the enterprise-ready product JBoss Enterprise BRMS.
Components of the JBoss Community version:
- Drools Guvnor (Business Rules Manager) – a centralized repository for Drools Knowledge Bases
- Drools Expert (rule engine) – uses the rules to perform reasoning
- Drools Flow (process/workflow), or jBPM 5Jbpm5jBPM5 is business process management workflow application. It is the latest version of the jBPM project. It is based on the BPMN 2.0 specification and supports the entire life cycle of the business process, from authoring through execution to monitoring and management.The current jBPM5 snapshot...
– provides for workflow and business processes - Drools Fusion (event processing/temporal reasoning) – provides for complex event processingComplex Event ProcessingComplex event processing consists of processing many events happening across all the layers of an organization, identifying the most meaningful events within the event cloud, analyzing their impact, and taking subsequent action in real time....
- Drools Planner (automated planning) – optimizes automated planning, including NP-hardNP-hardNP-hard , in computational complexity theory, is a class of problems that are, informally, "at least as hard as the hardest problems in NP". A problem H is NP-hard if and only if there is an NP-complete problem L that is polynomial time Turing-reducible to H...
planning problems
Example
This example illustrates a simple rule to print out information about a holiday in July. It checks a condition on an instance of the Holiday class, and executes Java code if that condition is true.Related systems
- CLIPSCLIPSCLIPS is a public domain software tool for building expert systems. The name is an acronym for "C Language Integrated Production System." The syntax and name was inspired by Charles Forgy's OPS...
: public domain software tool for building expert systems. - d3webD3webd3web is a free, open-source platform for knowledge-based systems .Its core is written in Java using XML and/or Office-based formats for the knowledge storage....
: free, open-source platform for knowledge-based systems (expert systems). - JESSJess programming languageJess is a rule engine for the Java platform - it is a superset of CLIPS programming language, developed by Ernest Friedman-Hill of Sandia National Labs. It was first written in late 1995....
: a rule engine for the Java platform - it is a superset of CLIPSCLIPSCLIPS is a public domain software tool for building expert systems. The name is an acronym for "C Language Integrated Production System." The syntax and name was inspired by Charles Forgy's OPS...
programming language. - PrologPrologProlog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...
: a general purpose logic programming language. - OpenL TabletsOpenL TabletsOpenL Tablets is a business rule management system and a business rules engine based on table representation of rules. Engine implements optimized sequential algorithm...
: business centric rules and BRMS. - DTRulesDTRulesDTRules is Open Sourced Rules Engine written entirely in Java. DTRules executes Decision tables directly, and utilizes a Domain Specific Language for expressing the conditions and actions within the Decision Tables....
: a Decision Table based, open-sourced rule engine for Java. - Esper: Java open-source CEP engine http://esper.codehaus.org
External links
- Drools
- Drools 2.0 Codehaus site
- Drools Sourceforge site
- features and screenshots
- Drools Blog
- JBoss Rules
- Drools.Net
- Bob McWhirter
- Mark Proctor
- JBoss Drools vs JBoss Rules
- Implementing business logic with Drools
- Give your business logic a framework with Drools
- Drools wiki
- Article on Seam security with JBoss Rules
- Other open source projects based on Drools 5
- Realtime intelligence using Drools Fusion
- Drools State of the Union presentation at JBossWorld 2009
- Drools Rule editor in Flex
- Drools and Predictive Analytics on the Amazon Cloud
- Drools with Spring Tutorial using the JSR-standard