Top Banner
Rules with Drools Gaurav Kohli Saket Vishal
22

Rules With Drools

Apr 14, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rules With Drools

Rules with Drools

Gaurav KohliSaket Vishal

Page 2: Rules With Drools

Recognize this?

3.1732

Page 3: Rules With Drools

What about this?

Akshay Kumar,32, Chandini Chowk,

Delhi, 110006

Page 4: Rules With Drools

Lets talk about

Akshay Kumar

Page 5: Rules With Drools

Some rules on names• First Name + Last Name• First Name + First Name + Last Name• (First Name)+ + Last Name

• First Name + First Name– Saket Vishal

Page 6: Rules With Drools

Implementing these rules in Java

Page 7: Rules With Drools

Demo

Page 8: Rules With Drools

Problems in implementing with Java

• Frequent changes to rules(conditions)• Lack of centralization of rules– Difficult to analyse and manage

• Non technical people(Business Analysts ..) can't create/update rules

• Performance

Page 9: Rules With Drools

Introducing DroolsBasically, a rule engine

Rule Engine: Platform that provides functionality to manage rules

Rule: An if else condition (Business Logic)

Page 10: Rules With Drools

Rules in Drools

Page 11: Rules With Drools

Demo

Page 12: Rules With Drools

The Big Picture

Page 13: Rules With Drools

Back to rules in DroolsDSL – Domain Specific Languages– Human readable rules

Page 14: Rules With Drools

Demo

Page 15: Rules With Drools

Behind Drools• RETE

Page 16: Rules With Drools

Behind Drools

Page 17: Rules With Drools

If your business logic is well defined/static and doesn't change often, you don't need to change rules at run-time.

If your rules are simple, self-contained, and usually spanning only a single object (for example, a check that user's age is less than 21).

If you have a memory constrained environment.

If your project is a one-shot effort and it will never be used again ormaintained over time.

When not to use Drools

Page 18: Rules With Drools

ILOG (now IBM)—JRules

Fair Isaac—Blaze Advisor

Corticon's BRMS,

Haley (now Oracle) Business Rules Engine

Pegasystems—PegaRules,

Production Systems Technologies—OPSJ

CLIPS

OpenRules or Jess

Alternatives to Drools

Page 19: Rules With Drools

Advanced Drools• Drools Flow – Loan approval

• Drools Fusion– Fraud detection

• Drools Guvnor– BRMS

Page 20: Rules With Drools

?

Page 21: Rules With Drools

References• Drools

• http://www.jboss.org/drools• Drools JBoss Rules 5.0 Developer's Guide

• RETE• http://en.wikipedia.org/wiki/Rete_algorithm

Page 22: Rules With Drools

Thank You!