The Business Rule Beans (BRBeans) framework allows you to specify where to fire a particular rule. This determines where the rule implementor is instantiated and invoked. The following lists the possible values for the firing location:
For simple rule implementors that do not perform any server-intensive work, specifying Local usually results in the best performance. This is true both without and with caching. A complete comparison of local firing versus remote firing must consider four cases: local and remote firing without caching and local and remote firing with caching. A description of these four cases follow:
Remote call without caching
Without caching, the work done to fire a rule remotely involves the following:
Local call without caching
Without caching the work done to fire a rule locally involves the following:
Local call with caching
With caching, local firing results in even more dramatic improvements. The work done to fire a rule remotely involves the following:
Remote call with caching
The work done to fire a rule locally with caching involves the following:
There may be some cases where a rule implementor must perform some work that requires significant interaction with the server. In these cases, it may be beneficial to have rules using this rule implementor defined to be fired remotely. This might make the server interaction performed by the implementor more efficient.
Note: In addition to performance, maintenance also must be considered in relation to specifying a firing location. The rule implementor classes for rules that are defined to be fired locally must be present on any client system that tries to fire those rules. Otherwise, the implementor cannot be instantiated when the rule is fired. This can result in maintenance problems when the rule implementors are changed since they must be updated on many different systems.