drools, jbpm and optaplanner (nyc and dc sept 2017 - keynote talk video)

Post on 29-Jan-2018

474 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Mark ProctorDrools Co-creator Chief Architect BRMS and BPMS

• Co-founded Drools (early 2000)

The Journey

The Journey• Co-founded Drools (early 2000)

<import>org.drools.examples.fibonacci.Fibonacci</import>

<rule name="Bootstrap 1" salience="20"> <parameter identifier="f"> <class>Fibonacci</class> </parameter>

<java:condition>f.getSequence() == 1</java:condition> <java:condition>f.getValue() == -1</java:condition> <java:consequence> f.setValue( 1 ); System.err.println( f.getSequence() + " == " + f.getValue() ); drools.modifyObject( f ); </java:consequence> </rule>

Drools 2.x XML Syntax

The Journey• Co-founded Drools (early 2000) • JBoss (2005)

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006)

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006)

import org.drools.examples.fibonacci.FibonacciExample.Fibonacci;

rule Bootstrap when f : Fibonacci( sequence == 1 ) then modify ( f ){ value = 1 }; System.out.println( f.sequence + " == " + f.value ); end

Drools 3.x - 7.x Syntax

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007)

• Increased expressiveness • ‘from’ keyword for external data • Drools Flow • Better Performance • BRMS

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009)

• Guvnor (BRMS with extjs port) • CEP • Drools-Flow full workflow • Knowledge Agent (Provisioning)

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010)

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011)

• incorporated from drools-flow

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011)

• incorporated from drools-flow

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012)

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013)

• UberFire Workbench • Phreak • Methodolgy based:

• Author, build, deploy, utilise • Declarative

• OptaPlanner

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017)

• with dedicated QE and UXD

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

The Journey• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017) • Remote engineers

• All over the globe

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017) • Remote engineers • Multipliers

The Journey

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017) • Remote engineers • Multipliers

The Journey

14k Twitter follows

Top 20 Java influencer 2017

Java Champion

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017) • Remote engineers • Multipliers

The Journey

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

• Co-founded Drools (early 2000) • JBoss (2005) • Red Hat (2006) • Drools 3 (2006) • Drools 4 (2007) • Drools 5 (2009) • Product Manager (2010) • jBPM 5 (2011) • Polymita acquisition (2012) • Drools & jBPM 6.0 (2013) • Since 2011 tripled engineering team size (2017) • Remote engineers • Multipliers • Super Stars

The Journey

KIE

Drools jBPMOptaPlanner UberFire

Guvnor

Drools-WB jBPM-WB

KIE-WB

• CI • Jenkins • Github Integration

Agile Community

• CI • Gate Keepers

• Peer reviewedcode merges

Agile Community

• CI • Gate Keepers • Sprints

• 2 Weeks

Agile Community

• CI • Gate Keepers • Sprints • JIRA Agile boards

• Updated in sprint meeting • Includes external contributors

Agile Community

• CI • Gate Keepers • Sprints • JIRA Agile boards • Feature branches

Agile Community

• CI • Gate Keepers • Sprints • JIRA Agile boards • Feature branches • CD

Agile Community

• CI • Gate Keepers • Sprints • JIRA Agile boards • Feature branches • CD • Town Halls

Agile Community

• CI • Gate Keepers • Sprints • JIRA Agile boards • Feature branches • CD • Town Halls

• Keep brief • Not a tutorial • Relevance • Impact

Agile Community

• Branding • Project Names : Drools, jBPM, OptaPlanner • Product Names : Red Hat BRMS, Red Hat BPMS

Project and Product

• Branding • 100% Open Source

Project and Product

• Branding • 100% Open Source • Product is a branch off community

Project and Product

• Branding • 100% Open Source • Product is a branch off community • Sanity through sanitisation

Project and Product

• Branding • 100% Open Source • Product is a branch off community • Sanity through sanitisation • Cross platform and version compatibility

• Fuse, EAP

Project and Product

• Branding • 100% Open Source • Product is a branch off community • Sanity through sanitisation • Cross platform and version compatibility • 3rd party certifications

• Oracle DB

Project and Product

• Branding • 100% Open Source • Product is a branch off community • Sanity through sanitisation • Cross platform and version compatibility • 3rd party certifications • Direct impact on roadmap

Project and Product

• Branding • 100% Open Source • Product is a branch off community • Sanity through sanitisation • Cross platform and version compatibility • 3rd party certifications • Direct impact on roadmap • Community independence

Project and Product

• Drools • Rule Engine • CEP

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

• Workbench / Console

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

• Workbench / Console • Execution Server

KIE - Current Top Level Projects

• Drools • Rule Engine • CEP

• jBPM • Workflow • Human Tasks

• Optaplanner • Optimisation with Constraint Solving

• Workbench / Console • Execution Server • AppFormer

• Coming Soon

KIE - Current Top Level Projects

• UberFire • Will become AppFormer-Core

KIE - Projects to be renamed / moved

• UberFire • Guvnor

• Terminated • Merged into other projects

KIE - Projects to be renamed / moved

• UberFire • Guvnor • DashBuilder

• Moved to AppFormer - Insight

KIE - Projects to be renamed / moved

• Cognitive Platform • e.g. CDSS

KIE AI - Knowledge is Everything

Because not everyoneis as smart as House

• Cognitive Platform • Knowledge Representation and Reasoning (KRR)

• Core AI

KIE AI - Knowledge is Everything

• Cognitive Platform • Knowledge Representation and Reasoning (KRR) • Hybrid and Integrated Reasoning

• Hybrid - forward, backward, relational, object graph, defeasible, beliefs

• Integrated - Drools integration with jBPM, Optaplanner, Bayesian Networks

KIE AI - Knowledge is Everything

• Cognitive Platform • Knowledge Representation and Reasoning (KRR) • Hybrid and Integrated Reasoning

• Hybrid - forward, backward, relational, object graph, defeasible, beliefs

• Integrated - Drools integration with jBPM, OptaPlanner, Bayesian Networks

• Coming Soon • Bayesian Networks • PMML • Imperfect Reasoning (fuzzy, probability, certainty factors)

KIE AI - Knowledge is Everything

7.x

Workbench / Data Modeller

Reporting

Execution Server

Workbench

BPM Designer

BPM Designer

DashBuilder

Forms

Old Forms

Bootstrap Grid Views

Bootstrap Grid Views

Web Forms for Java Developers

• Pojo • JPA • Bean Validator

Web Forms for Java Developers

Decision Tables

V&V

• For entire Table. • Rows subsuming each other. • Row redundancy. • Conflicting rows. • Unique single hit. • Missing range (gap analysis) when row contains

• current supports booleans, number and dates. • other types on way, such as enumerations

• For each row • Missing actions/conditions • Redundant actions/conditions • Conflicting conditions

Supported Validation and Verification

Data Sources

Datasource management perspective

Datasource management: New driver

Datasource management: New datasource

Datasource management: datasource editor

Datasource management: Browse schema

Datasource management: Browse tables

Datasource management: Browse data

Executable Model

Executable Model Rule rule = rule( "beta" )

.view(

expr("exprA", markV, p -> p.getName().equals("Mark"))

.indexedBy( String.class, ConstraintType.EQUAL, Person::getName, "Mark" )

.reactOn( "name", "age" ), // also react on age, see RuleDescr.lookAheadFieldsOfIdentifier

expr("exprB", olderV, p -> !p.getName().equals("Mark"))

.indexedBy( String.class, ConstraintType.NOT_EQUAL, Person::getName, "Mark" )

.reactOn( "name" ),

expr("exprC", olderV, markV, (p1, p2) -> p1.getAge() > p2.getAge())

.indexedBy( int.class, ConstraintType.GREATER_THAN, Person::getAge, Person::getAge )

.reactOn( "age" )

)

Thread Safety

State Transition

INACTIVE

FIRE_ALL_RULES FIRE_UNTIL_HALT

HALTING

EXECUTE_TASK

fireAllRules fireUntilHalt

at rest

halt halt

executeTask

Multi Core Scalability

• Immutable Data • Supports revision, if new instance provided

• Partitions the rules • Propagation queue per partition • Partitioning for most used class + field

• As long as that field is used in each pattern for that class. And each constraint on that field is equality, ‘==‘.

• Round robin rule allocation for all other rules • Downsides is all data goes to all partitions.

Only shows an advantage if a partition has enough match attempts to justify the cost of parallelising.

Focus on Immutable CEP use cases

Units, Guards and OOPath

Unit

unit HouseUnit

rule WhileAlarmOn when /house/alarm[power == on]then drools.guard( new AlarmUnit(persons, c.age) );end

unit AlarmUnit

rule TurnSprinklerOn when when /home/alarm[status == ALERT] s : /rooms/sprinklers[status == OFF]then s.sprinkler(ON)end

rule TurnSprinklerOf when /home/alarm[status == NORMAL] s : /rooms/sprinklers[status == ON]then s.sprinkler(OFF)end

public class HouseUnit implements RuleUnit { private House house; private DataSource<Room> rooms;

public HouseUnit( House house DataSource<Room> rooms ) { this.house = house; }. . .

public class AlarmUnit implements RuleUnit { private House house; private DataSource<Room> rooms;

public AlarmUnit( House house DataSource<Room> rooms ) { this.house = house; }. . .

top related