Classical Rule Engine Vs Decision Engine

Overview

The decision engine is designed to optimize the execution performance of your ruleset. The decision engine works in a similar way to the classic rule engine, although there are differences in the compilation and loading of the rules.

Before deployment, Decision Center and Rule Designer compile the rules to a much further state for the decision engine than for the classic rule engine.

Decision Center compiles the rules to intermediate code that requires only a final translation into executable code (Java™ bytecode) at run time.

Need for New Decision Engine

  • Ever increasing performance
  • Better Leverage of Hardware
  • Current Classical Rule Engine is developed long back

 

Compilation Process

Few basic advantages of going for a decision engine are noted below:

  • Full rewrite of compilation and execution pipeline
  • Improved scalability
  • Far less memory consumption
  • Significantly reduced ruleset loading time
  • Designed for concurrent execution
  • Architecture open for extensions
  • Migration path trivial for the vast majority of cases

 

The below screenshots shows the various steps involved in the compilation process in CRE (Classical Rule Engine) and Decision Engine (DE).

 

Classical Rule Engine Compilation Process

1

 

 

 

 

 

 

 

 

Decision Rule Engine Compilation Process

2

 

 

 

 

 

 

 

 

 

 

 

Decision Engine Compilation Process between Intermediate and ByteCode

3

 

Rule Designer compiles the rules by default to executable code. Clear the Optimize ruleset loading (Java bytecode generation) option on the Export a Ruleset Archive page to compile the rules to intermediate code.

 

 

 

 

 

 

 

 

 

 

Overall Comparison

4

 

 

 

 

 

 

 

 

 

 

 

 

 

Reference Project

We have considered the below projects for our comparison of Classical Rule Engine and Decision Engine

POC JAVA: This is the simple Java project which we make use as XOM

POC CRE POJO: This is the client project which is used to invoke the RuleApp which is created using Classical           Rule Engine.

POC DE POJO: This is the client project which is used to invoke the RuleApp which is created using Decision Engine.

POC CRE RuleApp : This is the RuleApp project created using Classcial Rule Engine

POC DE RuleApp: This is the RuleApp project created using Decision Engine

POC Rules: This is the Rules project and will be explained in detail later.

Rule Execution Server Configuration: Project to deploy the RuleApps.

 

POC Rule Project

We have considered the below rule artifacts.

  • 51 Decision Tables with 500 rows each

 

 

Procedure followed to document the results:

  1. XOM project was ready.
  2. Rule project with 51 Decision Tables were created.
  3. Initially Complied with Classical Rule Engine and a Rule App is created and deployed.
  4. Invoke the rule app with POJO implementation.
  5. Now Build and Compile the rule project with Decision Engine.
  6. Create a RuleApp and Deploy.
  7. Invoke the new rule app with POJO implementation.

 

 

 

From the results captured from the logs we can notice that the ruleset parsing time is reduced significantly and overall time for the result to be fetched when decision engine used is very less.

 

References:

IBM Impact Presentations

IBM ODM 8.7.1 Documentation

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s