PHREAK improvements over RETE
Most of the topics introduced so far in this chapter are not exclusive to the PHREAK algorithm. And this is not really a surprise; after all, the PHREAK algorithm is an evolution of the RETE algorithm implementation from previous versions of Drools (RETEOO). Even if both algorithms have a lot in common, PHREAK introduces some interesting modifications in the way the network of nodes is evaluated. Let's cover the most important improvements of PHREAK over RETEOO.
Delayed rule evaluation
When the PHREAK engine is started, all the rules are said to be unlinked. An unlinked rule is never going to be evaluated by Drools. When the insert, update, and/or delete actions modify the state of a KIE Session, the modification is only propagated up to the alpha sub-network and queued before it enters the beta sub-network. Unlike RETEOO, in PHREAK no Beta Node is then evaluated as a consequence of any of these operations. A heuristic determines which rule is the most likely...