SlideShare a Scribd company logo
Drools 6 Deep Dive
(Core Engine)
Mario Fusco
mfusco@redhat.com
Senior Software Engineer
Edson Tirelli
etirelli@redhat.com
Drools Project Lead
Principal Software Engineer
Drools 6 Deep Dive
● Core Engine Internals
 Phreak Algorithm (and ReteOO comparison)
 Set based propagation
● Deployment model
 Kjar modules
 Incremental compilation and KieScanner
 Type declarations changes from Drools 5
● Most useful less known features
 Property reactivity
 Backward chaining
 Multi-function accumulates
 Conditional named consequences
Core Engine Internals
ReteOO was cool
● Node Sharing
● Alpha Indexing
● Tree-based graphs
● Modify-in-place
● Property reactive
● Sub-networks for nested CEs
● Backward chaining support
● Lazy Truth Maintenance
● Heap based agenda
● Dynamic Rules support
But Phreak is better
● New algorithm:
 Inspired by Rete, LEAPS, Collection Oriented Match, L/R
Unlinking
● Preserves all ReteOO optimizations (that still make sense)
● Adds a whole new level of innovations:
 Full rule and segment unlinking
 Lazy evaluation, rule scoping
 Set-based propagation
● Results:
 On average, 20% faster than ReteOO*
 On specific use cases, up to 400% faster
 Reduced memory footprint
 More forgiving algorithm to badly written rules
* see the Drools blog for details
Phreak – memory structure
Phreak – in-memory network
Phreak – in-memory network
Set-based propagation
Why set-based propagation
● For large amounts of data, the number of tuples that
match individual conditions is likely to be large
● In such situations, the number of collections will be much
smaller than the number of tuples
● Collections of tuples that match individual conditions are
the unit of matching, rather than individual tuples
● Tame the combinatorial explosion, since it generates
combinations of collections instead of combinations of
tuples
From tuple-based
to set-based propagation
Deployment Model
(and build API)
Droolsand jBPM 5 - Concepts
Guvnor Application
Resources
Compiled
Resources
Packages Packages
KBases
KSessions
Client
Dependencies
Dependencies
JCR Repository
Droolsand jBPM 5 - Shortcomings
Resources
Compiled
Resources
Packages
Client
Dependencies
Dependencies
1. Java Serialization
3. Complexity
Leak
2. Dependency management
Guvnor Application
Packages
KBases
KSessions
JCR Repository
KIE 6 - Concepts
Project
Kie Workbench Application
Maven Repository
Project
KContainer
Module (kjar) Module (kjar)
Module (kjar)
Git Repository
KieWorkbench
● Source stored in GIT repositories
● Modules (kjars) stored in maven repositories
Repositories Projects Packages
KBases KSessions
contain contain
define
define
include
Kie Workbench
Module(kjar)
● Fully mavenized
● Versioned
● Standard JAR file
● Completely self-contained
● Contains:
 Source files
 Compiled classes and assets (rules, processes, etc)
 KBases and KSessions definitions (kmodule.xml)
 Module configuration and dependencies (pom.xml)
● Ready for deployment in a KContainer
Module(kjar)
● Utilizes sensible defaults
● Convention based (java, maven)
● Automatic discover:
 META-INF/kmodule.xml
● No need to programatically build (although supported)
● Supports inheritance and composition (includes)
● Allows for multiple named entities
Meaningful defaults
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession();
kSession.fireAllRules();
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession();
kSession.fireAllRules();
<kmodule
xmlns="http://jboss.org/kie/6.0.0/kmodule">
</kmodule>
<kmodule
xmlns="http://jboss.org/kie/6.0.0/kmodule">
</kmodule>
Definingmultiplenamed
Kiebasesand KieSessions
<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/kie/6.0.0/kmodule">
<kbase name="ServerKB" packages="org.myproject.example.server,
org.myproject.example.server.model"
eventProcessingMode="stream" equalsBehavior="identity">
<ksession name="ServerKS" default="true" />
</kbase>
<kbase name="ClientKB" packages="org.myproject.example.client">
<ksession name="StatefulClientKS" type="stateful"/>
<ksession name="StatelessClientKS" type="stateless"/>
</kbase>
</kmodule>
<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/kie/6.0.0/kmodule">
<kbase name="ServerKB" packages="org.myproject.example.server,
org.myproject.example.server.model"
eventProcessingMode="stream" equalsBehavior="identity">
<ksession name="ServerKS" default="true" />
</kbase>
<kbase name="ClientKB" packages="org.myproject.example.client">
<ksession name="StatefulClientKS" type="stateful"/>
<ksession name="StatelessClientKS" type="stateless"/>
</kbase>
</kmodule>
KieContainer kc = KieServices.Factory.get().getKieClasspathContainer();
KieSession serverKsession = kc.newKieSession( "ServerKS" );
KieSession clientKsession = kc.newKieSession( "StatelessClientKS" );
KieContainer kc = KieServices.Factory.get().getKieClasspathContainer();
KieSession serverKsession = kc.newKieSession( "ServerKS" );
KieSession clientKsession = kc.newKieSession( "StatelessClientKS" );
Loadinga KieModulefrom Maven
<dependency>
<groupId>org.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0.0</version>
</dependency>
KieServices ks = KieServices.Factory.get();
KieContainer kContainer =
ks.newKieContainer(ks.newReleaseId("org.mycompany",
"myproject",
"1.0.0"));
KieSession kSession = kContainer.newKieSession("ksession1");
KieServices ks = KieServices.Factory.get();
KieContainer kContainer =
ks.newKieContainer(ks.newReleaseId("org.mycompany",
"myproject",
"1.0.0"));
KieSession kSession = kContainer.newKieSession("ksession1");
Don't forget to add kie-ci
(maven integration module)
to your dependencies!
Incremental compilation &
KieScanner
Incremental Compilation
KieServices ks = KieServices.Factory.get();
ReleaseId rel1 = ks.newReleaseId( "org.mycompany", "myproject", "1.0.0" );
// creates a KieContainer for the project identified by rel1
KieContainer kc = ks.newKieContainer( rel1 );
// instance the default KieSession from the KieContainer ...
KieSession ksession = kc.newKieSession();
// … and do some work on that KieSession
// programmatically upgrade the KieContainer to a newer version
ReleaseId rel2 = ks.newReleaseId( "org.mycompany", "myproject", "1.1.0" );
kc.updateToVersion( rel2 );
// the rule base used by the KieSession is dynamically updated
// so you can keep using the same KieSession instance with newer rules
KieServices ks = KieServices.Factory.get();
ReleaseId rel1 = ks.newReleaseId( "org.mycompany", "myproject", "1.0.0" );
// creates a KieContainer for the project identified by rel1
KieContainer kc = ks.newKieContainer( rel1 );
// instance the default KieSession from the KieContainer ...
KieSession ksession = kc.newKieSession();
// … and do some work on that KieSession
// programmatically upgrade the KieContainer to a newer version
ReleaseId rel2 = ks.newReleaseId( "org.mycompany", "myproject", "1.1.0" );
kc.updateToVersion( rel2 );
// the rule base used by the KieSession is dynamically updated
// so you can keep using the same KieSession instance with newer rules
KieScanner
● Allows continuous monitoring of your Maven repository to
check whether a new release of a Kie project is available
● When it finds a newer version of the project used by the
KieContainer on which it has been registered, automatically
downloads it and triggers an incremental build
● Can be configured to run with a fixed time interval, but it is
also possible to run it on demand
KieServices kieServices = KieServices.Factory.get();
ReleaseId releaseId = kieServices.newReleaseId( "org.mycompany",
"myproject",
"LATEST" );
KieContainer kContainer = kieServices.newKieContainer( releaseId );
KieScanner kScanner = kieServices.newKieScanner( kContainer );
// Start the KieScanner polling the Maven repository every 10 seconds
kScanner.start( 10000L );
KieServices kieServices = KieServices.Factory.get();
ReleaseId releaseId = kieServices.newReleaseId( "org.mycompany",
"myproject",
"LATEST" );
KieContainer kContainer = kieServices.newKieContainer( releaseId );
KieScanner kScanner = kieServices.newKieScanner( kContainer );
// Start the KieScanner polling the Maven repository every 10 seconds
kScanner.start( 10000L );
Use maven
version range
Type declarations changes
In Drools5 typedeclarationswerecompiled at
runtime
package org.mypackage
declare Person
name : String
age : int
end
rule "Find adults" when
Person( age > 18,
$name : name )
then
System.out.println( $name );
end
package org.mypackage
declare Person
name : String
age : int
end
rule "Find adults" when
Person( age > 18,
$name : name )
then
System.out.println( $name );
end
// a knowledge base with a declared type:
KieBase kbase = ...
// get the declared FactType
FactType personType =
kbase.getFactType( "org.mypackage",
"Person" );
// handle the type as necessary:
// create instances:
Object bob = personType.newInstance();
// set attributes values
personType.set( bob, "name", "Bob" );
personType.set( bob, "age", 42 );
// insert fact into a session
KieSession ksession = ...
ksession.insert( bob );
ksession.fireAllRules();
// a knowledge base with a declared type:
KieBase kbase = ...
// get the declared FactType
FactType personType =
kbase.getFactType( "org.mypackage",
"Person" );
// handle the type as necessary:
// create instances:
Object bob = personType.newInstance();
// set attributes values
personType.set( bob, "name", "Bob" );
personType.set( bob, "age", 42 );
// insert fact into a session
KieSession ksession = ...
ksession.insert( bob );
ksession.fireAllRules();
Type declarations can
be used in Java code
only via reflection
In Drools6 typedeclarationsareadded tothe
kjar at compiletime
package org.mypackage
declare Person
name : String
age : int
end
rule "Find adults" when
Person( age > 18,
$name : name )
then
System.out.println( $name );
end
package org.mypackage
declare Person
name : String
age : int
end
rule "Find adults" when
Person( age > 18,
$name : name )
then
System.out.println( $name );
end
import org.mypackage.Person;
// create new instance of a plain Java class
Person bob = new Person();
// set attributes values
bob.setName( “Bob” );
bob.setAge( 2 );
// insert fact into a session
KieSession ksession = ...
ksession.insert( bob );
ksession.fireAllRules();
import org.mypackage.Person;
// create new instance of a plain Java class
Person bob = new Person();
// set attributes values
bob.setName( “Bob” );
bob.setAge( 2 );
// insert fact into a session
KieSession ksession = ...
ksession.insert( bob );
ksession.fireAllRules();
<dependency>
<groupId>org.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0.0</version>
</dependency>
Type declarations is compiled
and added to the kjar so you
can use it as a plain Java class
Property Reactivity
Solvingloop problems
rule “Salary award for min 2 years service”
when
e : Employee( lengthOfService > 2 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
Solvingloop problems
rule “Salary award for min 2 years service” no-loop
when
e : Employee( lengthOfService > 2 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
Solvingloop problems
rule “Salary award for min 2 years service” no-loop
when
e : Employee( lengthOfService > 2 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
rule “Salary award for min 8 years service” no-loop
when
e : Employee( lengthOfService > 8 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
Solvingloop problems
rule “Salary award for min 2 years service” when
e : Employee( lengthOfService > 2 )
not SalaryMin2Years( employee == e )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
insert ( new SalaryMin2Years(e) );
end
rule “Salary award for min 8 years service” when
e : Employee( lengthOfService > 8 )
not SalaryMin8Years( employee == e )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
insert ( new SalaryMin8Years(e) );
end
Solvingloop problems
rule “Year End” when
d : ChangeDate( )
e : Employee( )
then
modify( e ) { lengthOfService(
d.getYear() - e.getStartYear() ) };
end
Property Reactive
● Annotate the class:
 Java:
 DRL:
@PropertyReactive
public class Employee {
int salary;
int lengthOfService;
// … getters/setters
}
@PropertyReactive
public class Employee {
int salary;
int lengthOfService;
// … getters/setters
}
declare Employee
@PropertyReactive
salary : int
lengthOfService : int
}
declare Employee
@PropertyReactive
salary : int
lengthOfService : int
}
Property Reactive– problem solved
rule “Salary award for min 2 years service”
when
e : Employee( lengthOfService > 2 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
rule “Salary award for min 8 years service”
when
e : Employee( lengthOfService > 8 )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
Property Reactive– @Watch
rule “Record Salary Changes”
when
e : Employee( ) @Watch( salary )
then
insert( new SalaryChange( e, e.getSalary() );
end
Property Reactive– @Watch
rule “Salary award for min 2 years service”
when
e : Employee( salary < 1000, lengthOfService > 2 ) @Watch( !salary )
then
modify( e ) { setSalary( e.getSalary() * 1.05 ) };
end
Property Reactive - @Watch
@Watch( salary, lengthOfService, age )
@Watch( * )
@Watch( !* )
@Watch( *, !salary )
@Watch( !*, salary )
Backward Chaining
Forward and Backward Chaining
● Forward Chaining starts with facts/data and trigger actions
or output conclusions
● Backward Chaining starts with goals and search how to
satisfy them (e.g. Prolog)
● Drools is a Hybrid Chaining Systems meaning that it allows
to mix these 2 strategies
● Backward-Chaining is often referred to as derivation queries
and then Drools implements with the query construct
● A query is a simple way to search the working memory for
facts that match the stated conditions
● A query is just a rule with no consequence. It collects all the
results and returns them to the caller
A Backward Chaining example
query isContainedIn( String x, String y )
Location( x, y; )
or
( Location( z, y; ) and isContainedIn( x, z; ) )
end
query isContainedIn( String x, String y )
Location( x, y; )
or
( Location( z, y; ) and isContainedIn( x, z; ) )
end
rule “Print all things contained in the Office” when
isContainedIn(thing, "Office"; )
then
System.out.println( "thing " + thing + " is in the Office" );
end
rule “Print all things contained in the Office” when
isContainedIn(thing, "Office"; )
then
System.out.println( "thing " + thing + " is in the Office" );
end
thing Key is in the Office
thing Computer is in the Office
thing Draw is in the Office
thing Desk is in the Office
thing Chair is in the Office
Out Var
(unbuond)
In Var
(buond)
Multi-function Accumulates
Drools 6 – Multi-function accumulates
rule “accumulate in Drools 5”
when
$s : Number() from accumulate( $p : Product(),
sum( $p.price ) )
$a : Number() from accumulate( $p : Product(),
average( $p.price ) )
then ...
rule “accumulate in Drools 6”
when
acc( $p : Product(),
$s : sum( $p.price ),
$a : average( $p.price ) )
then ...
(Conditional) Named
Consequences
Why more than one consequence?
rule "Give 10% discount to customers older than 60"
when
$customer : Customer( age > 60 )
then
modify($customer) { setDiscount( 0.1 ) };
end
rule "Give free parking to customers older than 60"
when
$customer : Customer( age > 60 )
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
end
rule "Give 10% discount to customers older than 60"
when
$customer : Customer( age > 60 )
then
modify($customer) { setDiscount( 0.1 ) };
end
rule "Give free parking to customers older than 60"
when
$customer : Customer( age > 60 )
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
end
Sometimes the constraint of having one single
consequence for each rule can be somewhat limiting and
leads to verbose and difficult to be maintained repetitions
Named Consequences
rule "Give 10% discount and free parking to customers older than 60"
when
$customer : Customer( age > 60 )
do[giveDiscount]
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
then[giveDiscount]
modify($customer) { setDiscount( 0.1 ) };
end
rule "Give 10% discount and free parking to customers older than 60"
when
$customer : Customer( age > 60 )
do[giveDiscount]
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
then[giveDiscount]
modify($customer) { setDiscount( 0.1 ) };
end
When the pattern matching
evaluation reaches this point
activate the named consequence
and continue evaluation
Give 10% discount to a customer
older than 60 regardless
if he owns a car or not
Conditional Named Consequences
rule "Give free parking and 10% discount to over 60
Golden customer and 5% to Silver ones"
when
$customer : Customer( age > 60 )
if ( type == "Golden" ) do[giveDiscount10]
else if ( type == "Silver" ) break[giveDiscount5]
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
then[giveDiscount10]
modify($customer) { setDiscount( 0.1 ) };
then[giveDiscount5]
modify($customer) { setDiscount( 0.05 ) };
endd
rule "Give free parking and 10% discount to over 60
Golden customer and 5% to Silver ones"
when
$customer : Customer( age > 60 )
if ( type == "Golden" ) do[giveDiscount10]
else if ( type == "Silver" ) break[giveDiscount5]
$car : Car ( owner == $customer )
then
modify($car) { setFreeParking( true ) };
then[giveDiscount10]
modify($customer) { setDiscount( 0.1 ) };
then[giveDiscount5]
modify($customer) { setDiscount( 0.05 ) };
endd
If the condition evaluates to
true activate the named
consequence and continue
Else If this other condition is
met activate the named
consequence and but block
any further evaluation
Thanks … Questions?
Edson Tirelli
etirelli@redhat.com
Mario Fusco
mfusco@redhat.com
Q A

More Related Content

What's hot

Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
Mark Proctor
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
Jesus Perez Franco
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in Javascript
David Semeria
 
Building secure applications with keycloak
Building secure applications with keycloak Building secure applications with keycloak
Building secure applications with keycloak
Abhishek Koserwal
 
Drools5 Community Training: Module 1.5 - Drools Expert First Example
Drools5 Community Training: Module 1.5 - Drools Expert First ExampleDrools5 Community Training: Module 1.5 - Drools Expert First Example
Drools5 Community Training: Module 1.5 - Drools Expert First Example
Mauricio (Salaboy) Salatino
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
Julien Pivotto
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query Language
Tim Davis
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
viniciusban
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
Vahid Rahimian
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern Javascript
Wojciech Dzikowski
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass Slides
Nir Kaufman
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
Rafael Casuso Romate
 
Rate limits and all about
Rate limits and all aboutRate limits and all about
Rate limits and all about
Alexander Tokarev
 
Clean code
Clean codeClean code
Clean code
Arturo Herrero
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
Akshay Mathur
 
Asynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingAsynchronous JavaScript Programming
Asynchronous JavaScript Programming
Haim Michael
 

What's hot (20)

Web workers
Web workersWeb workers
Web workers
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Drools
DroolsDrools
Drools
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in Javascript
 
Building secure applications with keycloak
Building secure applications with keycloak Building secure applications with keycloak
Building secure applications with keycloak
 
webworkers
webworkerswebworkers
webworkers
 
Drools5 Community Training: Module 1.5 - Drools Expert First Example
Drools5 Community Training: Module 1.5 - Drools Expert First ExampleDrools5 Community Training: Module 1.5 - Drools Expert First Example
Drools5 Community Training: Module 1.5 - Drools Expert First Example
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query Language
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern Javascript
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass Slides
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
 
Rate limits and all about
Rate limits and all aboutRate limits and all about
Rate limits and all about
 
Clean code
Clean codeClean code
Clean code
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Asynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingAsynchronous JavaScript Programming
Asynchronous JavaScript Programming
 

Similar to Drools 6 deep dive

Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch IIKubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
Kumton Suttiraksiri
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
DoKC
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
DoKC
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeAcademy
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
A Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in JavaA Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in Java
VMware Tanzu
 
Your Developers Can Be Heroes on Kubernetes
Your Developers Can Be Heroes on KubernetesYour Developers Can Be Heroes on Kubernetes
Your Developers Can Be Heroes on Kubernetes
Ambassador Labs
 
Top 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus FeaturesTop 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus Features
jclingan
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
Robert Barr
 
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerJDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
PROIDEA
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
Inhye Park
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
Michel Schildmeijer
 
Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23
msohn
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
oci-container-engine-oke-100.pdf
oci-container-engine-oke-100.pdfoci-container-engine-oke-100.pdf
oci-container-engine-oke-100.pdf
NandiniSinghal16
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
Ivan Ma
 

Similar to Drools 6 deep dive (20)

Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch IIKubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
A Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in JavaA Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in Java
 
Your Developers Can Be Heroes on Kubernetes
Your Developers Can Be Heroes on KubernetesYour Developers Can Be Heroes on Kubernetes
Your Developers Can Be Heroes on Kubernetes
 
Top 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus FeaturesTop 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus Features
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul BakkerJDD2015: Kubernetes - Beyond the basics - Paul Bakker
JDD2015: Kubernetes - Beyond the basics - Paul Bakker
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
 
oci-container-engine-oke-100.pdf
oci-container-engine-oke-100.pdfoci-container-engine-oke-100.pdf
oci-container-engine-oke-100.pdf
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 

More from Mario Fusco

Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automation
Mario Fusco
 
Let's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java APILet's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java API
Mario Fusco
 
How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...
Mario Fusco
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
Mario Fusco
 
Lazy java
Lazy javaLazy java
Lazy java
Mario Fusco
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
Mario Fusco
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better Programmer
Mario Fusco
 
Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...
Mario Fusco
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
Mario Fusco
 
Java 8 Workshop
Java 8 WorkshopJava 8 Workshop
Java 8 Workshop
Mario Fusco
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Mario Fusco
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongMario Fusco
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondMario Fusco
 
Why we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingWhy we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingMario Fusco
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageMario Fusco
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing DroolsMario Fusco
 
Java 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardJava 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardMario Fusco
 
Hammurabi
HammurabiHammurabi
Hammurabi
Mario Fusco
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife SpringMario Fusco
 

More from Mario Fusco (20)

Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automation
 
Let's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java APILet's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java API
 
How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
 
Lazy java
Lazy javaLazy java
Lazy java
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better Programmer
 
Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
 
Java 8 Workshop
Java 8 WorkshopJava 8 Workshop
Java 8 Workshop
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
 
Monadic Java
Monadic JavaMonadic Java
Monadic Java
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are Wrong
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyond
 
Why we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingWhy we cannot ignore Functional Programming
Why we cannot ignore Functional Programming
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same language
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
 
Java 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardJava 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forward
 
Hammurabi
HammurabiHammurabi
Hammurabi
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 

Drools 6 deep dive

  • 1. Drools 6 Deep Dive (Core Engine) Mario Fusco mfusco@redhat.com Senior Software Engineer Edson Tirelli etirelli@redhat.com Drools Project Lead Principal Software Engineer
  • 2. Drools 6 Deep Dive ● Core Engine Internals  Phreak Algorithm (and ReteOO comparison)  Set based propagation ● Deployment model  Kjar modules  Incremental compilation and KieScanner  Type declarations changes from Drools 5 ● Most useful less known features  Property reactivity  Backward chaining  Multi-function accumulates  Conditional named consequences
  • 4. ReteOO was cool ● Node Sharing ● Alpha Indexing ● Tree-based graphs ● Modify-in-place ● Property reactive ● Sub-networks for nested CEs ● Backward chaining support ● Lazy Truth Maintenance ● Heap based agenda ● Dynamic Rules support
  • 5. But Phreak is better ● New algorithm:  Inspired by Rete, LEAPS, Collection Oriented Match, L/R Unlinking ● Preserves all ReteOO optimizations (that still make sense) ● Adds a whole new level of innovations:  Full rule and segment unlinking  Lazy evaluation, rule scoping  Set-based propagation ● Results:  On average, 20% faster than ReteOO*  On specific use cases, up to 400% faster  Reduced memory footprint  More forgiving algorithm to badly written rules * see the Drools blog for details
  • 6.
  • 7. Phreak – memory structure
  • 11. Why set-based propagation ● For large amounts of data, the number of tuples that match individual conditions is likely to be large ● In such situations, the number of collections will be much smaller than the number of tuples ● Collections of tuples that match individual conditions are the unit of matching, rather than individual tuples ● Tame the combinatorial explosion, since it generates combinations of collections instead of combinations of tuples
  • 14. Droolsand jBPM 5 - Concepts Guvnor Application Resources Compiled Resources Packages Packages KBases KSessions Client Dependencies Dependencies JCR Repository
  • 15. Droolsand jBPM 5 - Shortcomings Resources Compiled Resources Packages Client Dependencies Dependencies 1. Java Serialization 3. Complexity Leak 2. Dependency management Guvnor Application Packages KBases KSessions JCR Repository
  • 16. KIE 6 - Concepts Project Kie Workbench Application Maven Repository Project KContainer Module (kjar) Module (kjar) Module (kjar) Git Repository
  • 17. KieWorkbench ● Source stored in GIT repositories ● Modules (kjars) stored in maven repositories Repositories Projects Packages KBases KSessions contain contain define define include Kie Workbench
  • 18. Module(kjar) ● Fully mavenized ● Versioned ● Standard JAR file ● Completely self-contained ● Contains:  Source files  Compiled classes and assets (rules, processes, etc)  KBases and KSessions definitions (kmodule.xml)  Module configuration and dependencies (pom.xml) ● Ready for deployment in a KContainer
  • 19. Module(kjar) ● Utilizes sensible defaults ● Convention based (java, maven) ● Automatic discover:  META-INF/kmodule.xml ● No need to programatically build (although supported) ● Supports inheritance and composition (includes) ● Allows for multiple named entities
  • 20. Meaningful defaults KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession(); kSession.fireAllRules(); KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession(); kSession.fireAllRules(); <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> </kmodule> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> </kmodule>
  • 21. Definingmultiplenamed Kiebasesand KieSessions <kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="ServerKB" packages="org.myproject.example.server, org.myproject.example.server.model" eventProcessingMode="stream" equalsBehavior="identity"> <ksession name="ServerKS" default="true" /> </kbase> <kbase name="ClientKB" packages="org.myproject.example.client"> <ksession name="StatefulClientKS" type="stateful"/> <ksession name="StatelessClientKS" type="stateless"/> </kbase> </kmodule> <kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="ServerKB" packages="org.myproject.example.server, org.myproject.example.server.model" eventProcessingMode="stream" equalsBehavior="identity"> <ksession name="ServerKS" default="true" /> </kbase> <kbase name="ClientKB" packages="org.myproject.example.client"> <ksession name="StatefulClientKS" type="stateful"/> <ksession name="StatelessClientKS" type="stateless"/> </kbase> </kmodule> KieContainer kc = KieServices.Factory.get().getKieClasspathContainer(); KieSession serverKsession = kc.newKieSession( "ServerKS" ); KieSession clientKsession = kc.newKieSession( "StatelessClientKS" ); KieContainer kc = KieServices.Factory.get().getKieClasspathContainer(); KieSession serverKsession = kc.newKieSession( "ServerKS" ); KieSession clientKsession = kc.newKieSession( "StatelessClientKS" );
  • 22. Loadinga KieModulefrom Maven <dependency> <groupId>org.mycompany</groupId> <artifactId>myproject</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.mycompany</groupId> <artifactId>myproject</artifactId> <version>1.0.0</version> </dependency> KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.mycompany", "myproject", "1.0.0")); KieSession kSession = kContainer.newKieSession("ksession1"); KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.mycompany", "myproject", "1.0.0")); KieSession kSession = kContainer.newKieSession("ksession1"); Don't forget to add kie-ci (maven integration module) to your dependencies!
  • 24. Incremental Compilation KieServices ks = KieServices.Factory.get(); ReleaseId rel1 = ks.newReleaseId( "org.mycompany", "myproject", "1.0.0" ); // creates a KieContainer for the project identified by rel1 KieContainer kc = ks.newKieContainer( rel1 ); // instance the default KieSession from the KieContainer ... KieSession ksession = kc.newKieSession(); // … and do some work on that KieSession // programmatically upgrade the KieContainer to a newer version ReleaseId rel2 = ks.newReleaseId( "org.mycompany", "myproject", "1.1.0" ); kc.updateToVersion( rel2 ); // the rule base used by the KieSession is dynamically updated // so you can keep using the same KieSession instance with newer rules KieServices ks = KieServices.Factory.get(); ReleaseId rel1 = ks.newReleaseId( "org.mycompany", "myproject", "1.0.0" ); // creates a KieContainer for the project identified by rel1 KieContainer kc = ks.newKieContainer( rel1 ); // instance the default KieSession from the KieContainer ... KieSession ksession = kc.newKieSession(); // … and do some work on that KieSession // programmatically upgrade the KieContainer to a newer version ReleaseId rel2 = ks.newReleaseId( "org.mycompany", "myproject", "1.1.0" ); kc.updateToVersion( rel2 ); // the rule base used by the KieSession is dynamically updated // so you can keep using the same KieSession instance with newer rules
  • 25. KieScanner ● Allows continuous monitoring of your Maven repository to check whether a new release of a Kie project is available ● When it finds a newer version of the project used by the KieContainer on which it has been registered, automatically downloads it and triggers an incremental build ● Can be configured to run with a fixed time interval, but it is also possible to run it on demand KieServices kieServices = KieServices.Factory.get(); ReleaseId releaseId = kieServices.newReleaseId( "org.mycompany", "myproject", "LATEST" ); KieContainer kContainer = kieServices.newKieContainer( releaseId ); KieScanner kScanner = kieServices.newKieScanner( kContainer ); // Start the KieScanner polling the Maven repository every 10 seconds kScanner.start( 10000L ); KieServices kieServices = KieServices.Factory.get(); ReleaseId releaseId = kieServices.newReleaseId( "org.mycompany", "myproject", "LATEST" ); KieContainer kContainer = kieServices.newKieContainer( releaseId ); KieScanner kScanner = kieServices.newKieScanner( kContainer ); // Start the KieScanner polling the Maven repository every 10 seconds kScanner.start( 10000L ); Use maven version range
  • 27. In Drools5 typedeclarationswerecompiled at runtime package org.mypackage declare Person name : String age : int end rule "Find adults" when Person( age > 18, $name : name ) then System.out.println( $name ); end package org.mypackage declare Person name : String age : int end rule "Find adults" when Person( age > 18, $name : name ) then System.out.println( $name ); end // a knowledge base with a declared type: KieBase kbase = ... // get the declared FactType FactType personType = kbase.getFactType( "org.mypackage", "Person" ); // handle the type as necessary: // create instances: Object bob = personType.newInstance(); // set attributes values personType.set( bob, "name", "Bob" ); personType.set( bob, "age", 42 ); // insert fact into a session KieSession ksession = ... ksession.insert( bob ); ksession.fireAllRules(); // a knowledge base with a declared type: KieBase kbase = ... // get the declared FactType FactType personType = kbase.getFactType( "org.mypackage", "Person" ); // handle the type as necessary: // create instances: Object bob = personType.newInstance(); // set attributes values personType.set( bob, "name", "Bob" ); personType.set( bob, "age", 42 ); // insert fact into a session KieSession ksession = ... ksession.insert( bob ); ksession.fireAllRules(); Type declarations can be used in Java code only via reflection
  • 28. In Drools6 typedeclarationsareadded tothe kjar at compiletime package org.mypackage declare Person name : String age : int end rule "Find adults" when Person( age > 18, $name : name ) then System.out.println( $name ); end package org.mypackage declare Person name : String age : int end rule "Find adults" when Person( age > 18, $name : name ) then System.out.println( $name ); end import org.mypackage.Person; // create new instance of a plain Java class Person bob = new Person(); // set attributes values bob.setName( “Bob” ); bob.setAge( 2 ); // insert fact into a session KieSession ksession = ... ksession.insert( bob ); ksession.fireAllRules(); import org.mypackage.Person; // create new instance of a plain Java class Person bob = new Person(); // set attributes values bob.setName( “Bob” ); bob.setAge( 2 ); // insert fact into a session KieSession ksession = ... ksession.insert( bob ); ksession.fireAllRules(); <dependency> <groupId>org.mycompany</groupId> <artifactId>myproject</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.mycompany</groupId> <artifactId>myproject</artifactId> <version>1.0.0</version> </dependency> Type declarations is compiled and added to the kjar so you can use it as a plain Java class
  • 30. Solvingloop problems rule “Salary award for min 2 years service” when e : Employee( lengthOfService > 2 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end
  • 31. Solvingloop problems rule “Salary award for min 2 years service” no-loop when e : Employee( lengthOfService > 2 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end
  • 32. Solvingloop problems rule “Salary award for min 2 years service” no-loop when e : Employee( lengthOfService > 2 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end rule “Salary award for min 8 years service” no-loop when e : Employee( lengthOfService > 8 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end
  • 33. Solvingloop problems rule “Salary award for min 2 years service” when e : Employee( lengthOfService > 2 ) not SalaryMin2Years( employee == e ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; insert ( new SalaryMin2Years(e) ); end rule “Salary award for min 8 years service” when e : Employee( lengthOfService > 8 ) not SalaryMin8Years( employee == e ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; insert ( new SalaryMin8Years(e) ); end
  • 34. Solvingloop problems rule “Year End” when d : ChangeDate( ) e : Employee( ) then modify( e ) { lengthOfService( d.getYear() - e.getStartYear() ) }; end
  • 35.
  • 36. Property Reactive ● Annotate the class:  Java:  DRL: @PropertyReactive public class Employee { int salary; int lengthOfService; // … getters/setters } @PropertyReactive public class Employee { int salary; int lengthOfService; // … getters/setters } declare Employee @PropertyReactive salary : int lengthOfService : int } declare Employee @PropertyReactive salary : int lengthOfService : int }
  • 37. Property Reactive– problem solved rule “Salary award for min 2 years service” when e : Employee( lengthOfService > 2 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end rule “Salary award for min 8 years service” when e : Employee( lengthOfService > 8 ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end
  • 38. Property Reactive– @Watch rule “Record Salary Changes” when e : Employee( ) @Watch( salary ) then insert( new SalaryChange( e, e.getSalary() ); end
  • 39. Property Reactive– @Watch rule “Salary award for min 2 years service” when e : Employee( salary < 1000, lengthOfService > 2 ) @Watch( !salary ) then modify( e ) { setSalary( e.getSalary() * 1.05 ) }; end
  • 40. Property Reactive - @Watch @Watch( salary, lengthOfService, age ) @Watch( * ) @Watch( !* ) @Watch( *, !salary ) @Watch( !*, salary )
  • 42. Forward and Backward Chaining ● Forward Chaining starts with facts/data and trigger actions or output conclusions ● Backward Chaining starts with goals and search how to satisfy them (e.g. Prolog) ● Drools is a Hybrid Chaining Systems meaning that it allows to mix these 2 strategies ● Backward-Chaining is often referred to as derivation queries and then Drools implements with the query construct ● A query is a simple way to search the working memory for facts that match the stated conditions ● A query is just a rule with no consequence. It collects all the results and returns them to the caller
  • 43. A Backward Chaining example query isContainedIn( String x, String y ) Location( x, y; ) or ( Location( z, y; ) and isContainedIn( x, z; ) ) end query isContainedIn( String x, String y ) Location( x, y; ) or ( Location( z, y; ) and isContainedIn( x, z; ) ) end rule “Print all things contained in the Office” when isContainedIn(thing, "Office"; ) then System.out.println( "thing " + thing + " is in the Office" ); end rule “Print all things contained in the Office” when isContainedIn(thing, "Office"; ) then System.out.println( "thing " + thing + " is in the Office" ); end thing Key is in the Office thing Computer is in the Office thing Draw is in the Office thing Desk is in the Office thing Chair is in the Office Out Var (unbuond) In Var (buond)
  • 45. Drools 6 – Multi-function accumulates rule “accumulate in Drools 5” when $s : Number() from accumulate( $p : Product(), sum( $p.price ) ) $a : Number() from accumulate( $p : Product(), average( $p.price ) ) then ... rule “accumulate in Drools 6” when acc( $p : Product(), $s : sum( $p.price ), $a : average( $p.price ) ) then ...
  • 47. Why more than one consequence? rule "Give 10% discount to customers older than 60" when $customer : Customer( age > 60 ) then modify($customer) { setDiscount( 0.1 ) }; end rule "Give free parking to customers older than 60" when $customer : Customer( age > 60 ) $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; end rule "Give 10% discount to customers older than 60" when $customer : Customer( age > 60 ) then modify($customer) { setDiscount( 0.1 ) }; end rule "Give free parking to customers older than 60" when $customer : Customer( age > 60 ) $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; end Sometimes the constraint of having one single consequence for each rule can be somewhat limiting and leads to verbose and difficult to be maintained repetitions
  • 48. Named Consequences rule "Give 10% discount and free parking to customers older than 60" when $customer : Customer( age > 60 ) do[giveDiscount] $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; then[giveDiscount] modify($customer) { setDiscount( 0.1 ) }; end rule "Give 10% discount and free parking to customers older than 60" when $customer : Customer( age > 60 ) do[giveDiscount] $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; then[giveDiscount] modify($customer) { setDiscount( 0.1 ) }; end When the pattern matching evaluation reaches this point activate the named consequence and continue evaluation Give 10% discount to a customer older than 60 regardless if he owns a car or not
  • 49. Conditional Named Consequences rule "Give free parking and 10% discount to over 60 Golden customer and 5% to Silver ones" when $customer : Customer( age > 60 ) if ( type == "Golden" ) do[giveDiscount10] else if ( type == "Silver" ) break[giveDiscount5] $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; then[giveDiscount10] modify($customer) { setDiscount( 0.1 ) }; then[giveDiscount5] modify($customer) { setDiscount( 0.05 ) }; endd rule "Give free parking and 10% discount to over 60 Golden customer and 5% to Silver ones" when $customer : Customer( age > 60 ) if ( type == "Golden" ) do[giveDiscount10] else if ( type == "Silver" ) break[giveDiscount5] $car : Car ( owner == $customer ) then modify($car) { setFreeParking( true ) }; then[giveDiscount10] modify($customer) { setDiscount( 0.1 ) }; then[giveDiscount5] modify($customer) { setDiscount( 0.05 ) }; endd If the condition evaluates to true activate the named consequence and continue Else If this other condition is met activate the named consequence and but block any further evaluation
  • 50. Thanks … Questions? Edson Tirelli etirelli@redhat.com Mario Fusco mfusco@redhat.com Q A