O'Reilly logo

Drools JBoss Rules 5.X Developer's Guide by Michal Bali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Left and right unlinking

This is another feature of Drools that helps to reduce the amount of memory, especially for large knowledge bases with lots of rules. Its principle is simple. As we know, beta nodes have left and right memory, every time a fact propagates, it is added to the right memory, and every time a tuple propagates, it is added to the left memory. However, if a fact/tuple is being propagated and the opposite left/right memory is empty, there can't be any match. The fact/tuple would normally enter the right/left memory and it would wait there until the opposite memory gets filled, so a match can be attempted. What Drools can do instead is that it can unlink the current (left or right) memory. This will save us unnecessary node memory ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required