Reducing the size of stored rule agent state

For solutions that have many entities and that rely heavily on rule agents, you can reduce the size of the database significantly by changing the format of the memento to JSON.

About this task

The externalized state of the rule engine is referred to as memento. Decision Server Insights stores the memento for each entity / rule agent or shared aggregate pair in the database to be able to recover the data from the system after a disaster.

By default, the memento is stored in XML. The JSON format is more concise and reduces the size of the data that is communicated between the agents and the database, and the time to load and save the memento. JSON parsing and generation are also faster than XML. The more entity/rule agent pairings there are, the more useful it is to switch to the JSON format.

It is recommended to switch to the JSON format in all cases, except if your solutions are deployed from a version of Decision Server Insights that is less than 8.9.1. The JSON format can be used only in the following cases:

  • All servers are greater than or equal to 8.9.1.
  • The solution is produced by a designer greater than or equal to 8.9.1.
Restriction: If you activate the storage of the memento in JSON, you cannot roll back your solution to one that came from a designer version less than 8.9.1.

Procedure

  1. Set the value of the mementoDatabaseFormat system property to json. For example, run the propertyManager set command.
    propertyManager set mementoDatabaseFormat=json
    Or you can add the property directly to the server.xml file in all of the runtime servers.
    <ia_runtime mementoDatabaseFormat="json"/>
  2. Stop and restart the cluster.

Results

The activation of the storage of the memento in JSON is effective after the restart of the entire grid.