| ILOG JRules User Guide > Optimizing Execution > Concepts > Performance and Scalability |
Performance and Scalability |
PREVIOUS NEXT |
Performance and scalability depend on several factors. JRules plays only one part in the overall picture. Data access is usually the bottleneck among the factors affecting the performance and scalability of an application. The amount of time spent on data access depends on the means to access the data. The operating system and application server contribute to the performance and scalability of the overall application.
Scalability is the ability of a system to adapt to changing workloads while maintaining system efficiency. A fully scalable system can be upgraded easily and transparently, without shutting it down. Scalability is often more important than initial capacity to the business production cycle.
In terms of the architecture design, scalability can be achieved through the use of threads or a rule engine pool (context pooling). Context pooling allows a fixed maximum number of rule engines to be maintained at the server. This will ensure that the performance of the server will not deteriorate drastically when there is a sudden surge in the number of requests. Requests not served by any engine are put on hold, and the waiting time for these requests will not be significant if the time needed for the engine to fire the rules is negligible.
Using a pool of rule engines also helps to shorten the response time to a request. This is because the rules used for the engine pool are usually preloaded and cached by the time the engines in the pool are listening for requests from the application. Time is not spent on loading the rules once a request arrives, and the rules can be fired immediately.
Performance can also be improved by careful design of the deployment of business rules. The rules in an application can be divided and grouped into rulesets based on a particular set of objects. This enables efficient tests to be carried out and allows a ruleset to be executed independently instead of having to execute all the rules in the application, a process that may involve irrelevant rules and objects that take up resources. Ruleflow structures are another way to improve processing efficiency.
Consider the following figure illustrating how optimization techniques can improve performance and scalability.
Increasing the number of servers, CPUs, and system memory should improve the system performance. The rule engine performance will always depend on the number of rules and objects. The time taken to process the rules increases with the number of rules and objects involved. The faster it takes for the rule engine to access the rules, the shorter time it takes to process them.
To improve performance, the rules can be ordered in such a way that:
At run time, the rule engine can load the rule engine as interpreted rules or generated bytecode. Using dynamic bytecode generation can improve the performance of applications with many objects and complex rules by a factor ranging from four to more than ten.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |