By ODM performance architects: Pierre-Andre Paumelle and Nicolas Peulvast
The following design and development tips might help you to better meet your service level agreement (SLA).

Tip 1: Choose a XOM type with performance requirements in mind

One of the first and most important steps when building your application is to choose which XOM type to use. In some cases, you might have the freedom to make this decision from a performance standpoint. If expectation levels are very high then a Java XOM provides the best performance and scalability. The XML (or dynamic) XOM is easy to use and you might choose this option if you already have business objects in your organization that are stored in XML (XSD schemas). If you do use XML then only add what is necessary from the XSD files for your rule projects. For example, do not add all of the classes if you do not need them.

Tip 2: Use multiple projects

Divide your business logic into multiple rule projects with dependencies. If possible, use different eclipse workspaces for these projects. The size of a ruleset affects the total execution time.

Tip 3: Split your BOM into multiple projects

Split your BOM into the relevant rule projects.

Tip 4: Build incrementally

Perform the build incrementally for each project, instead of building them all at the same time. For more information on improving the performance of Rule Designer with large rule projects, see Improving performance on large rule projects.

Tip 5: Clean your BOM

Make sure that all of the entries in the BOM are needed to write business rules. Remove any artifacts that are not used in rule construction. However, make sure that the BOM is compatible with your testing and simulation needs.

Tip 6: Order your rules

In your rules, put the conditions in order of complexity, where the simplest is first and the most complex is last.

  • An example of a simple condition, checks the value of a field.
  • An example of a complex condition, checks a relationship or a collection of objects.

Rules always evaluate from top to bottom, so if the first condition evaluates to false, there is no need to evaluate the next condition. Putting the simplest condition first increases processing speed, because the more complex conditions are only evaluated when the simpler ones return true.

Tip 7: Evaluate your rules

Evaluate your rules and the impact they might have on your BOM during development. The overall goal of this task is to avoid wordiness and to make phrases shorter. Use these topics to help you carry out this task:

Tip 8: Simplify your ruleflows

Keep ruleflows simple. Complex ruleflows reduce performance, especially with the classic rule engine.

Tip 9: Use the decision engine

Select the decision engine rather than the classic rule engine. The decision engine is designed for concurrent execution and scalability and is much faster.

Tip 10: Reduce the use of dynamic selection

Use sparingly the dynamic selection of which rules to execute. Use static lists of rules, as much of possible.

Tip 11: Select the right execution mode

Choose the most appropriate execution mode for your decision service. Use the algorithm property to change the execution mode for a rule task. Fastpath is the default mode for all newly created rule tasks since V8.9.0. For rule tasks from a previous release, where RetePlus was the default mode, consider switching the tasks to Fastpath if you do not need inference. Limit the number of engine algorithms used, as this saves memory.
RetePlus is applicable for rule chaining applications. It can be useful in the case of many objects and a small number of rules. Performance is impacted as the number of rules increases. For better performance, limit the use of the “object state update” option.
Sequential is applicable for applications with a large number of rules and a small number of objects. It is efficient in multi-threaded environments.
Fastpath is applicable for applications with a large number of rules and a large number of objects. It is efficient in multi-threaded environments, and is the optimal mode for decision tables.

Tip 12: Use the right protocol for the right integration

  • Calling a Java EE product then use the Rule Execution Server API (POJO/EJB/MDB).
  • Calling a Web Service (SOAP) then use HTDS. For HTDS, JSON is the fastest format.
  • Calling a RESTful service then use HTDS REST XML or HTDS JSON (Java XOM).
  • Calling on z/OS then use zRule Execution Server or Rule Execution Server on WAS for z/OS. zRule Execution Server is the fastest of the two.

Join The Discussion

Your email address will not be published. Required fields are marked *