Copyright © TIBCO Software Inc. All Rights Reserved |
In the post RTC phase, the cache is updated, outgoing events are sent, the backing store is updated, and locks (if any) are released. TIBCO BusinessEvents handles outgoing events on a separate set of threads, in both the write-behind and cache-aside options. However, each option handles writing to cache and to the backing store differently, as shown next.With cache-aside strategy, inference agents manage writes to the cache, the local L1 cache, and the backing store, in the post RTC phase.Releasing locks and the actual end of the RTC waits for the three tasks to complete. Acknowledgements are sent after the locks are released.When writing to the database, TIBCO BusinessEvents does the following actions in a single transaction:Multiple transactions can be committed in one batch. The size of the batch is controlled by the Agent.AgentClassName.dbOpsBatchSize property as shown in the section Tuning Properties for Cache-aside Strategy.Add to a CDD property sheet, at the level of Agent Classes, Processing Units, or Cluster, depending on the scope of the setting. For example to apply the settings to all agents in a cluster, set the property at the cluster level. You can also override the value at a lower level:Agent.AgentClassName.dbthreadcountAgent.AgentClassName.dbOpsQueueSizeAgent.AgentClassName.dbOpsBatchSizeSee Inference, Query, and Cache Agent Properties for details.
• Provides database transaction control, making sure transactions, including deletes, are performed following an RTC.
• Offers the ability to use the database as the primary storage, and to use cache secondarily, to pass the objects between the Rete network and the database. This strategy is useful in some usage scenarios.
• There are really no disadvantages in comparison with write behind. Cache aside is a later implementation to offer improved controls based on experiences with the earlier write-behind strategy.With write-behind strategy, cache agents handle writes to cache and to the backing store. First the inference agent writes data to the cache and then the cache agent or agents write that data to the backing store.For inserts and updates, one write-behind thread is used for each entity type. Deletes are performed by the distributed cache threads (configurable) and they are synchronously deleted from the database.
• Batches writes during the delay period which increases database call efficiency and minimizes network traffic.
• If enough cache agents fail, the cache management layer won’t be able to persist a write that was done previously, resulting in an inconsistent DB.Specifies the number of Coherence daemon threads used by the distributed cache service. If zero, all relevant tasks are performed on the service thread.
Copyright © TIBCO Software Inc. All Rights Reserved |