Cache Coherency

When the JADE development environment is run in multiuser mode, it requires cache coherency to be enabled.

If you start the JADE development environment in multiuser mode with cache coherency disabled, a message box is displayed, warning you that the system is not using cache coherency. If you choose to proceed (by clicking the Yes button), a message is logged in the jommsgn.log file, indicating that you are using the JADE development environment without cache coherency.

In a multiuser JADE system, a persistent object cached in a node can be made obsolete when a process on another node updates that object. JADE provides a default mechanism that ensures that persistent objects in the object cache of a client node are always current. Automatic client cache coherency is enabled on all nodes when the AutomaticCacheCoherencyDefault parameter in the [JadeServer] section of the JADE initialization file used by the server node is set to the default value of true.

With automatic cache coherency, an object updated on another node is automatically reloaded in cache, even when it is the receiver of a method currently being executed.

The server maintains information concerning the objects that are held in the persistent object cache for each client node that has enabled automatic cache coherency. When a transaction is committed, the server sends a message to each client, identifying the objects that have been updated. On receipt of this message, the client marks all updated objects that are present in the cache as being obsolete. The next time a process on the client attempts to access the obsolete object, the updated copy is retrieved from the server.

Automatic cache coherency has been designed for applications that frequently access highly volatile data. Considerations have been made to minimize the associated overhead, especially with respect to network traffic.

Alternatively, your applications can implement a customized caching strategy. Common strategies that are often used include a combination of object locks, class notifications, object notifications, object edition checking, and calls to the Object class resynchObject method.

You can enable or disable automatic cache coherency on a specific node, regardless of the default setting on the server node, by setting the AutomaticCacheCoherency parameter in the [JadeClient] section of the JADE initialization file used by the node to true or false.

Cache coherency has no implications in locking strategies except when locks are used for cache coherence-only purposes. All locks used for update and concurrency control purposes are still necessary.

An out-of-date object can still be accessed, even when cache coherency is enabled, if the object is retrieved from the local cache while it us being updated by another node. You can guarantee that an object is not being updated by another process only by locking it.

When automatic cache coherency is enabled, calling the Object class resynch or resynchObject method has no effect.