Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[KieLive#21] Drools Deep Dive with Mario Fusco

[KieLive#21] Drools Deep Dive with Mario Fusco

In this session, Mario illustrates Drools internal algorithms and provide a few suggestions on how to write effective and efficient rules

This presentation: http://red.ht/KieLive21

[KieLive#21] Drools Deep Dive

Drools is Red Hat’s rule engine and we constantly work to implement new features, improve its usability and increment its performances. After a quick introduction explaining what a rule engine is, illustrating which are the main components of a generic engine and clarifying for which use cases you should consider using one, we will explore in more details the internal algorithms of Drools. We will discuss the original ReteOO algorithm, how it evolved in the one currently in use, named Phreak and which are the key features and advantages of the second.

We will also investigate how Drools internally manages concurrency and the experiments in progress to make the engine fully parallel. Finally, also leveraging these knowledges, we will go through some of the best practices to write maintainable and performant rules.

Link to the live streaming: http://red.ht/KieLive21

About the speaker:
Mario is a principal software engineer at Red Hat working as Drools project lead. Among his interests there are also functional programming and Domain Specific Languages. He is also a Java Champion, the JUG Milano coordinator, a frequent speaker and the co-author of "Modern Java in Action" published by Manning.

KIE Community

January 12, 2021
Tweet

More Decks by KIE Community

Other Decks in Technology

Transcript

  1. A method must be called directly ... … specifying the

    argument passed to it A rule cannot be called directly Specific instances cannot be passed but are automatically selected with pattern-matching
  2. Entry-point All facts are inserted here Type Nodes Discriminate on

    fact type Alpha Network Evaluate Terminal Nodes Put activated rule into the agenda Beta Network Evaluate
  3. INACTIVE FIRING_ALL_RULES FIRING_UNTIL_HALT endFiring fireAllRules / fireUntilHalt fireUntilHalt FORCE_HALTING halt

    REST_HALTING tryHalt tryHalt endFiring fireUntilHalt EXECUTING_TASK fireAllRules executeTask endExecution FIRING or REST_HALTING PropagationQueue yes => enqueue no => execute WAIT fireAllRules fireAllRules