Optional: Enabling distributed caching for Decision Center
You can enable distributed caching to reduce the amount of information retrieved from the Decision Center database.
The cache is provided by Infinispan libraries (see Infinispan: In-Memory Distributed Data Store
), and shared by
all the Decision Center modules
connected to the schema of the database.
When you launch Decision Center, all the branches, projects, user management (users and roles), and user settings are stored in the cache. Versionable elements, including rules, rule packages, and ruleflows, are stored in the cache when they are queried from the database. Old versions of these elements are not stored in the cache if they are not accessed. Operations that need to access a large amount of baselines, such as the Library tab, display faster because of the cache access. It primarily benefits configurations in which a network delay between the Decision Center applications and the database adds to the overhead of the database access.
Setting up the cache
You enable the distributed cache by setting the
system property com.ibm.rules.decisioncenter.distributedCacheService.enable to
true in the server startup configuration.
In a cluster, if one of the Decision Center nodes is set up to use the distributed cache, all the nodes in the cluster should be configured to use the cache. If one of the nodes is not connected to the Infinispan cache, updates from this node are not written to the cache.
Infinispan uses the JGroups library to establish communication among the nodes in the cluster. A
JGroups configuration file can be provided for Decision Center by using the system property
com.ibm.rules.decisioncenter.services.jgroupsCfg. This setting provides a file
name that must be available in the Decision Center classpath. For more
information on JGroups, including samples, see Reliable group
communication with JGroups
.
If this
property is not specified, the Infinispan default configuration file
/default-configs/default-jgroups-udp.xml is used. This file is available in the
Infinispan JAR file.
If a setting is used to specify the configuration file, this setting is displayed when Decision Center is launched, for example:
Mar 23, 2024 11:19:30 PM com.ibm.rules.decisioncenter.services.CacheService getJGroupsCfg INFO: JGroups configuration file name is set to '/configs/dc-jgroups-udp.xml', this file should be packaged in the application classpath.
If this is the first node started in the cluster, it is designated as the coordinator:
Mar 23, 2024 11:19:34 PM org.jgroups.logging.Slf4jLogImpl info INFO: <hostname>-30867: no members discovered after 2002 ms: creating cluster as coordinator.
A single node should be defined as a coordinator. If communication is not established properly, the other nodes are not able to detect the coordinator and one of them becomes the coordinator. You can check the status of the nodes in the server log file.
A diagnostic is also provided to highlight the issue. The following output is available in the Business console:

Since Decision Center deployment usually consists of at least the Business console and the REST API modules, communication should be properly defined between these two modules. This configuration is not specific to a cluster environment.
For
more information about how to configure the modules, see Reliable
group communication with JGroups: Overview
.