2. AGENDAAGENDA
I N T R O D U C T I O N TO D R O O L SI N T R O D U C T I O N TO D R O O L S
K I E P L AT FO R MK I E P L AT FO R M
D R O O L S F U S I O ND R O O L S F U S I O N
R OAD MAPR OAD MAP
C O M M U N I T Y T I M E !C O M M U N I T Y T I M E !
3. DISCLAIMERDISCLAIMER
COMMUNITY VS PRODUCTCOMMUNITY VS PRODUCT
HTTP://BLOG.ATHICO.COM/2011/04/DROOLS-JBPM-HTTP://BLOG.ATHICO.COM/2011/04/DROOLS-JBPM-
COMMUNITY-VERSUS-PRODUCT.HTMLCOMMUNITY-VERSUS-PRODUCT.HTML
4. ABOUT MYSELFABOUT MYSELF
SENIOR SOFTWARE ENGINEER @ RED HAT / JBOSSSENIOR SOFTWARE ENGINEER @ RED HAT / JBOSS
System Integrator / App Builder / Tools Dev
Author of some books about jBPM & Drools
My Blog: http://salaboy.com My twitter: @salaboy
Passionate about Drools & jBPM
5. KIEKIE (DISCLAIMER)(DISCLAIMER)
KNOWLEDGE IS EVERYTH INGKNOWLEDGE IS EVERYTH ING
Umbrella for a set of Projects
Knowledge formalisation, automation & monitoring
KIE Api is about all these projects
Open the doors for other projects sharing similar approaches
6. INTRODUCTION TO DROOLSINTRODUCTION TO DROOLS
H ISTORYH ISTORY
WHAT IS DROO LS?WHAT IS DROO LS?
H OW DO ES IT F IT I N O URH OW DO ES IT F IT I N O UR
INFRASTRUCTURE?INFRASTRUCTURE?
LE T'S WRITE SOM E RULES!LE T'S WRITE SOM E RULES!
7. HISTORYHISTORY
BEGININ GBEGININ G
2003: Created by Mark Proctor and Bob McWhirter @ Codehaus
2005: Acquired by JBoss
2008: Drools 3.x released - Rete OO initial version
8. HISTORYHISTORY
DROOLS 3.X (2009)DROOLS 3.X (2009)
Build with the Java Ecosystem in mind
First version of the RETE OO Algorithm
Big competitor of JESS -> CLIPS port for Java
Team size = 3 approx.
9. HISTORYHISTORY
DROOLS 4.X (2011)DROOLS 4.X (2011)
Focused on performance
Focused on real life implementation
Huge adoption in real life scenarios
Several Bootcamps around the world
World wide community around the project
Team size = 7 approx.
11. HISTORYHISTORY
DROOLS 6.X (201 5)DROOLS 6.X (201 5)
Focused on Infrastructure, Deployment and Tooling
KIE Platform definition & initial version
Uberfire (GWT / ERRAI)
Workbench first version
Team size = 27 approx.
12. WHAT IS DROOLS?WHAT IS DROOLS?
RU LE E NGIN E / I NFERENCE ENGINERU LE E NGIN E / I NFERENCE ENGINE
Technically depends on your needs
Core: lightweight java library that you can embed in your apps
Server: standalone server
Rule Engine -> Inference Engine
Data Driven -> Forward Chaining
Goal Driven -> Backward Chaining
Nowadays Drools is a Hybrid Engine
16. HOW DOES IT FIT?HOW DOES IT FIT?
... IN O UR IN FRASTRUCTURE ...... IN O UR IN FRASTRUCTURE ...
You choose based on your scenario
Framework approach
Server approach
Both
Hype on MicroServices
Deployment / Distribution / Scaling
Docker / Kubernetes
Openshift Origin
24. KIE APISKIE APIS
HI GH LIG HTSHI GH LIG HTS
Packaging
KJAR
kmodule.xml
Runtime
KieContainer
KieBase
KieSession
25. KIE APISKIE APIS
KIESES SIONKIESES SION
REPRESENTS ONE INSTANCE OF THE RULE ENGINEREPRESENTS ONE INSTANCE OF THE RULE ENGINE
Operations
FactHandle insert(Object fact);
delete(FactHandle handle);
update(FactHandle handle, Object fact);
fireAllRules() & fireAllRules(int max)
getQueryResults(String queryName, Object... arguments)
26. EXAMPLESEXAMPLES
... CHOOSE YOUR OWN ...... CHOOSE YOUR OWN ...
My First Drools Project: Drools + CDI + Test (Arquillian)
Drools Rules Examples: some rules examples with different filters and patterns
You can analyse these rules using phreak-inspector
KIE CI (Continuous Integration)
Packing Drools as a MicroService using Wildfly Swarm
Drools & Docker
Drools Shopping Cart Example: REST endpoint hiding Drools, intermediate rules
Drools Fusion CEP example
KIE Server & Docker
27. KIE PLATFORMKIE PLATFORM
PROJECTS/ COMPON ENTSPROJECTS/ COMPON ENTS
Drools Expert
Drools Fusion
OptaPlanner
jBPM
KIE Server
Uberfire
Workbench
KIE Workbench: Drools & jBPM Authoring + Runtime + Monitoring
Drools Workbench: Rules Authoring + KIE Server integration
OptaPlanner Future
30. ROADMAPROADMAP
COMMUNITYCOMMUNITY
Cloud Deployments (tooling for the Cloud)
Self-Service Applications
Different Vertical's Packages (Healthcare, Finance, HR, etc)
Phreak Optimisations + Tuning
API refactoring towards Services
Miscellaneous
jBPM Modeller Migration to Lienzo GWT(work in progress)
Governance revision
Migration to microservice architecture
Livespark project
31. COMMUNITYCOMMUNITY
RES OURCESRES OURCES
Official KIE Blog: http://blog.athico.com
Sites: drools.org, jbpm.org, uberfireframework.org
Report issues: http://jira.jboss.org -> please with a reproducer
Github: github.com/droolsjbpm/ -> feel free to fork and send pull requests
If you want to contribute get in touch!
IRC: freenode.net #drools #jbpm #uberfire
Look for Drools & jBPM books on Amazon
34. PHREAK ALGORITHMPHREAK ALGORITHM
RE TE EVO LUTIO NRE TE EVO LUTIO N
SMALLER TITLESMALLER TITLE
PHREAK takes some of the concepts in the RETE, RETE/UL, LEAPS and Collection Oriented
Match to optimise how the evaluations are performed.
Some characteristics:
The RETE network is still the same (it maintains the same static structure)
In runtime PHREAK performs lazy evaluations in contrast with RETE
Three levels of memory segments that can be linked/unlinked for splitting evaluations