SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
JBoss Drools
     Open-Source
Business Logic Platform


                 Kris Verlaenen
                   Drools Developer
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
What is a rule ?
A principle or regulation governing conduct, action,
            procedure, arrangement, etc.

rule “RuleName”
   when
      // conditions
   then
      // actions
What is a rule ?
●
    Rule conditions = Pattern matching
       p: Person ( age > 18, $ssn: ssn )
       DriversLicense (
          type == “Category2”,
          ssn == $ssn )
●
    Rule consequence = Action
       System.out.println(p.getName());
       insert(new Person());
Drools language features
●
    Rule conditional elements
    –   And, Or, Exists, Not
    –   Accumulate, Collect
    –   From
    –   Forall
    –   Temporal rules
●
    Rule consequence
    –   Pluggable dialects (Java, MVEL)
●
    Functions, globals, queries, etc.
Drools Rule Formats
●
    DRL
●
    Domain-specific language
●
    Decision tables
●
    Guided rule editor
●
    XML
Drools Rule Language (DRL)
import org.drools.Person
global java.util.List myList


rule “RuleName” salience 20
  when
     p: Person( age > 20, name == “John” )
     r: Request( personId == (p.id) )
  then
     myList.add( r );
Domain-specific Language
Decision Tables
Guided Rule Editor
XML Rule Language
<rule name="simple_rule">
<rule-attribute name="salience" value="10" />
<lhs>
   <pattern identifier="$i" object-type="Integer">
    <from>
     <accumulate>
       <pattern object-type="Cheese"></pattern>
       <init> int total = 0; </init>
       <action> total += $cheese.getPrice(); </action>
       <result> new Integer( total ) ); </result>
     </accumulate>
    </from>
   </pattern>
</lhs>
<rhs> list1.add( $cheese ); </rhs>
</rule>
Why rules ?
●
    Separate logic from application
●
    Understandability
    –   Declarative, higher-level
●
    Speed and scalability
    –   ReteOO
●
    Global enforcement, maintainability and agility
    –   Logic is centralized, embrace change
●
    Traceability
How does a rule engine work ?
   Production rule engine using forward chaining


                    Rule Engine

          Rule                                   Working
Rules              Pattern Matcher                         Facts
          Base                                   Memory


                      Agenda




                               insert, update,
                                  remove
ReteOO
●
    Rule base is compiled into a
    discrimination network
●
    Data propagates through
    network
●
    Node sharing
Other Drools Features
●
    Static rule analysis
    –   Detect redundancy, completeness, etc.
●
    Audit (event listeners)
●
    JSR-94 compliant (Java Rule Engine API)
●
    Binary persistence strategy
●
    Community extensions
    –   Uncertainty
    –   Planning
Drools Code example
// Create a new rule base
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( ... );
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( builder.getPackage() );
// Create working memory
WorkingMemory workingMemory =
  ruleBase.newStatefulSession();
// Insert facts
Message message = new Message( "Hello World" );
workingMemory.insert( message );
// Execute
workingMemory.fireAllRules();
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
Eclipse IDE
●
    Assist developer in
    –   Authoring
    –   Executing
    –   Testing
    –   Debugging
    –   Managing
●
    Extends Eclipse workbench with specific views,
    editors, wizards, perspective, actions, builder,
    etc.
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
Drools Guvnor
Web-based rule management, storage, editing and
            deployment environment

●
    Rule editing
    –   text, guided, decision tables, etc.
●
    Version control
●
    Categorization
●
    Build and deploy
●
    Scenarios
Guvnor Rule Editing
Guvnor Categorization
Guvnor Deployment
Guvnor Test Scenarios
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
Drools Flow
A workflow engine combining processes and rules

●
    Integration
    –   From loose coupling (decision services)
    –   To advance integration (process rules)
●
    Unification
    –   Rules and processes are different types of business
        knowledge assets
    –   Tooling (IDE, repository, management, etc.)
Why use rules in processes
●
    Simplicity
    –   Complex decisions are sometimes easier to specify using rules
●
    Separate life cycle and different scope => Agility
    –   Change rules without having to change process, rules can be reused
        accross processes or outside processes
●
    Declarative and higher-level
    –   Focus on what instead of how, rules are additive
●
    Granularity
    –   Easy to write rules for specific circumstances, processes should be more
        generic
●
    Performance
Drools Flow
●
    Unifies rules and processes in a single engine
    –   Ability to use rules everywhere in your process
         ●
             Decision nodes, constraints, exception and event
             handling, task assignment, etc.
    –   Processes and rules see, reason and react on the
        same data
         ●
             No data passing or synchronization
    –   Processes and rules interact
    –   Integrated tooling
Drools Flow
●
    Control flow
    –   Sequence, Paralellism
    –   Choice, Looping
●
    Data flow (variables)
●
    Nodes
    –   Action, Milestone
        (State), Subflow,
        Timer, Composite,
        Human Tasks
    –   Exceptions, Timers
Additional Features
●
    Extensible process framework
    –   Reusable set of core nodes
●
    Binary persistence of process instances
●
    Domain-specific work items
    –   Plug in your own work nodes
    –   Simplifies integration and testing
●
    Integrated debug and audit
Domain-specific Processes
Integrated debug and audit
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
Drools Fusion
       Temporal reasoning system to provide
     Complex Event Processing (CEP) capabilities

●
    Processing multiple events from an event cloud
    with the goal of identifying the meaningful
    events within the event cloud.
    –   Event detection
    –   Event correlation
    –   Event abstraction
Requirements for event processing
●
    Event Detection
     –   From an event cloud, select all the meaningful
         events and only them.
●
    [Temporal] Event Correlation
     –   Ability to correlate events and facts declaring
         temporal and non-temporal constraints between
         them.
     –   Ability to reason over event aggregation
●
    Event Abstraction
     –   Ability to declare composite complex events from
         simple atomic events
Requirements for event processing
●
    Event Detection
     –   Leverages all the power and expressiveness of the
         rule language
     –   Extension for stream support: entry-points
●
    [Temporal] Event Correlation
     –   Temporal extension to Rete Algorithm: before, after,
         meets, met-by, overlaps, overlapped-by, during,
         contains, starts, started-by, finishes, finished-by,
         concurrent
●
    Event Abstraction
     –   Sliding window support
Overview
●
    Drools Expert
    –   What is a rule?
    –   Why rules?
    –   How does a rule engine work?
●
    Drools Eclipse IDE
●
    Drools Guvnor
●
    Drools Flow
●
    Drools Fusion
Questions ?
Drools Homepage
  http://www.jboss.org/drools/
Drools Blog
  http://blog.athico.com/
Drools Chat
  irc.codehaus.org #drools
Drools Mailing List
  rules-users@lists.jboss.org

Weitere ähnliche Inhalte

Was ist angesagt?

Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools Ajay Mahajan
 
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + DemosDrools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + DemosMauricio (Salaboy) Salatino
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorialSrinath Perera
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools Introductionlakshmi1693
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools IntroductionJBug Italy
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep diveMario Fusco
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)martincabrera
 
Developing Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools IntegrationDeveloping Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools IntegrationBonitasoft
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01Ivan Ma
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3mihirio
 
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastKerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastJorge Lopez-Malla
 

Was ist angesagt? (18)

Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools
 
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + DemosDrools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
 
Drools Ecosystem
Drools EcosystemDrools Ecosystem
Drools Ecosystem
 
Drools presentation
Drools presentationDrools presentation
Drools presentation
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools Introduction
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools Introduction
 
Drools
DroolsDrools
Drools
 
Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
Drools
DroolsDrools
Drools
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep dive
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)
 
Developing Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools IntegrationDeveloping Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools Integration
 
Di and Dagger
Di and DaggerDi and Dagger
Di and Dagger
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
 
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastKerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
 

Andere mochten auch

Buenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationBuenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationMark Proctor
 
UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)Mark Proctor
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Mark Proctor
 
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Guillaume Laforge
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Mark Proctor
 
groovy rules
groovy rulesgroovy rules
groovy rulesPaul King
 

Andere mochten auch (6)

Buenos Aires Drools Expert Presentation
Buenos Aires Drools Expert PresentationBuenos Aires Drools Expert Presentation
Buenos Aires Drools Expert Presentation
 
UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016
 
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
groovy rules
groovy rulesgroovy rules
groovy rules
 

Ähnlich wie JBoss Drools - Open-Source Business Logic Platform

Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...
Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...
Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...Srinath Perera
 
Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)Geoffrey De Smet
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info SheetMark Proctor
 
Doing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesDoing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesSrinath Perera
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projectsIBACZ
 
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEtsurdilovic
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)Eran Levy
 
End to end MLworkflows
End to end MLworkflowsEnd to end MLworkflows
End to end MLworkflowsAdam Gibson
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersnuppla
 
µServices Architecture @ EPAM WOW 2015
µServices Architecture @ EPAM WOW 2015µServices Architecture @ EPAM WOW 2015
µServices Architecture @ EPAM WOW 2015Izzet Mustafaiev
 
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...Liming Zhu
 
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...Denodo
 
Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With GatlingKnoldus Inc.
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoFrank van der Linden
 
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®Serdar Basegmez
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Movel
 
7 tools for your devops stack
7 tools for your devops stack7 tools for your devops stack
7 tools for your devops stackKris Buytaert
 

Ähnlich wie JBoss Drools - Open-Source Business Logic Platform (20)

Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...
Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...
Dissertation Defence: Enforcing User-Defined Management Logic in Large Scale ...
 
Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
Doing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesDoing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & Rules
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projects
 
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
 
End to end MLworkflows
End to end MLworkflowsEnd to end MLworkflows
End to end MLworkflows
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
 
µServices Architecture @ EPAM WOW 2015
µServices Architecture @ EPAM WOW 2015µServices Architecture @ EPAM WOW 2015
µServices Architecture @ EPAM WOW 2015
 
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
POD-Diagnosis: Error Detection and Diagnosis of Sporadic Operations on Cloud ...
 
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
 
Gatling
Gatling Gatling
Gatling
 
Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With Gatling
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on Domino
 
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
 
7 tools for your devops stack
7 tools for your devops stack7 tools for your devops stack
7 tools for your devops stack
 
Praes
PraesPraes
Praes
 

Mehr von elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

Mehr von elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Kürzlich hochgeladen

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Kürzlich hochgeladen (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

JBoss Drools - Open-Source Business Logic Platform

  • 1. JBoss Drools Open-Source Business Logic Platform Kris Verlaenen Drools Developer
  • 2. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 3. What is a rule ? A principle or regulation governing conduct, action, procedure, arrangement, etc. rule “RuleName” when // conditions then // actions
  • 4. What is a rule ? ● Rule conditions = Pattern matching p: Person ( age > 18, $ssn: ssn ) DriversLicense ( type == “Category2”, ssn == $ssn ) ● Rule consequence = Action System.out.println(p.getName()); insert(new Person());
  • 5. Drools language features ● Rule conditional elements – And, Or, Exists, Not – Accumulate, Collect – From – Forall – Temporal rules ● Rule consequence – Pluggable dialects (Java, MVEL) ● Functions, globals, queries, etc.
  • 6. Drools Rule Formats ● DRL ● Domain-specific language ● Decision tables ● Guided rule editor ● XML
  • 7. Drools Rule Language (DRL) import org.drools.Person global java.util.List myList rule “RuleName” salience 20 when p: Person( age > 20, name == “John” ) r: Request( personId == (p.id) ) then myList.add( r );
  • 11. XML Rule Language <rule name="simple_rule"> <rule-attribute name="salience" value="10" /> <lhs> <pattern identifier="$i" object-type="Integer"> <from> <accumulate> <pattern object-type="Cheese"></pattern> <init> int total = 0; </init> <action> total += $cheese.getPrice(); </action> <result> new Integer( total ) ); </result> </accumulate> </from> </pattern> </lhs> <rhs> list1.add( $cheese ); </rhs> </rule>
  • 12. Why rules ? ● Separate logic from application ● Understandability – Declarative, higher-level ● Speed and scalability – ReteOO ● Global enforcement, maintainability and agility – Logic is centralized, embrace change ● Traceability
  • 13. How does a rule engine work ? Production rule engine using forward chaining Rule Engine Rule Working Rules Pattern Matcher Facts Base Memory Agenda insert, update, remove
  • 14. ReteOO ● Rule base is compiled into a discrimination network ● Data propagates through network ● Node sharing
  • 15. Other Drools Features ● Static rule analysis – Detect redundancy, completeness, etc. ● Audit (event listeners) ● JSR-94 compliant (Java Rule Engine API) ● Binary persistence strategy ● Community extensions – Uncertainty – Planning
  • 16. Drools Code example // Create a new rule base PackageBuilder builder = new PackageBuilder(); builder.addPackageFromDrl( ... ); RuleBase ruleBase = RuleBaseFactory.newRuleBase(); ruleBase.addPackage( builder.getPackage() ); // Create working memory WorkingMemory workingMemory = ruleBase.newStatefulSession(); // Insert facts Message message = new Message( "Hello World" ); workingMemory.insert( message ); // Execute workingMemory.fireAllRules();
  • 17. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 18. Eclipse IDE ● Assist developer in – Authoring – Executing – Testing – Debugging – Managing ● Extends Eclipse workbench with specific views, editors, wizards, perspective, actions, builder, etc.
  • 19.
  • 20.
  • 21. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 22. Drools Guvnor Web-based rule management, storage, editing and deployment environment ● Rule editing – text, guided, decision tables, etc. ● Version control ● Categorization ● Build and deploy ● Scenarios
  • 27. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 28. Drools Flow A workflow engine combining processes and rules ● Integration – From loose coupling (decision services) – To advance integration (process rules) ● Unification – Rules and processes are different types of business knowledge assets – Tooling (IDE, repository, management, etc.)
  • 29. Why use rules in processes ● Simplicity – Complex decisions are sometimes easier to specify using rules ● Separate life cycle and different scope => Agility – Change rules without having to change process, rules can be reused accross processes or outside processes ● Declarative and higher-level – Focus on what instead of how, rules are additive ● Granularity – Easy to write rules for specific circumstances, processes should be more generic ● Performance
  • 30. Drools Flow ● Unifies rules and processes in a single engine – Ability to use rules everywhere in your process ● Decision nodes, constraints, exception and event handling, task assignment, etc. – Processes and rules see, reason and react on the same data ● No data passing or synchronization – Processes and rules interact – Integrated tooling
  • 31.
  • 32. Drools Flow ● Control flow – Sequence, Paralellism – Choice, Looping ● Data flow (variables) ● Nodes – Action, Milestone (State), Subflow, Timer, Composite, Human Tasks – Exceptions, Timers
  • 33. Additional Features ● Extensible process framework – Reusable set of core nodes ● Binary persistence of process instances ● Domain-specific work items – Plug in your own work nodes – Simplifies integration and testing ● Integrated debug and audit
  • 36. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 37. Drools Fusion Temporal reasoning system to provide Complex Event Processing (CEP) capabilities ● Processing multiple events from an event cloud with the goal of identifying the meaningful events within the event cloud. – Event detection – Event correlation – Event abstraction
  • 38. Requirements for event processing ● Event Detection – From an event cloud, select all the meaningful events and only them. ● [Temporal] Event Correlation – Ability to correlate events and facts declaring temporal and non-temporal constraints between them. – Ability to reason over event aggregation ● Event Abstraction – Ability to declare composite complex events from simple atomic events
  • 39. Requirements for event processing ● Event Detection – Leverages all the power and expressiveness of the rule language – Extension for stream support: entry-points ● [Temporal] Event Correlation – Temporal extension to Rete Algorithm: before, after, meets, met-by, overlaps, overlapped-by, during, contains, starts, started-by, finishes, finished-by, concurrent ● Event Abstraction – Sliding window support
  • 40. Overview ● Drools Expert – What is a rule? – Why rules? – How does a rule engine work? ● Drools Eclipse IDE ● Drools Guvnor ● Drools Flow ● Drools Fusion
  • 41. Questions ? Drools Homepage http://www.jboss.org/drools/ Drools Blog http://blog.athico.com/ Drools Chat irc.codehaus.org #drools Drools Mailing List rules-users@lists.jboss.org