Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 10 Threading Models and Tuning : Post-RTC and Epilog Handling and Tuning Options

Post-RTC and Epilog Handling and Tuning Options
This section shows how TIBCO BusinessEvents handles post-RTC and epilog actions differently in cache aside and write behind options.
For most use cases, use cache-aside strategy  Cache aside is a later implementation than write behind. Cache-aside strategy offers improved controls.
Cache-Aside Options
With cache-aside strategy, inference agents manage writes to the cache, the local L1 cache, and the backing store, in the post-RTC phase. Cache aside can be used with parallel or sequential operations (see Parallel and Sequential Operations). Parallel operations is illustrated and discussed in this section.
Parallel and Sequential Operations
Use of parallel or sequential operations is set using the following boolean property in the CDD file:
Agent.agentClassName.enableParallelOps
Parallel operations is only used with cache aside (defaults to false for write behind). It is an agent level property, so you can set it differently on each agent, depending on the needs. For reference documentation, see Table 57, CDD Agent Classes Tab Inference Agent and Query Agent Properties in TIBCO BusinessEvents Developer’s Guide.
Message Acknowledgment  With both parallel and sequential operations, message acknowledgement and releasing locks (epilog actions) wait for the three post-RTC tasks to complete. Note the following exceptions:
Parallel Operations  When the enableParallelOps property is set to true, parallel operations are used. Parallel operations is shown in the diagram for this section. It uses multiple threads and queues for more efficient processing during the post-RTC phase.
Sequential Operations  When the enableParallelOps property is set to false, sequential operations are used. This means that all post-RTC phase operations are done on a single thread. Sequential operations ensures that the system waits to send a reply event confirming that some work has been done, until the result of the work can be seen in the cache.
Advantages
Disadvantages
Tuning Properties for Cache-aside Strategy
Tuning properties are set using CDD properties or settings at the appropriate level, depending on the scope. See Chapter 29, Agent and Processing Unit Configuration and Chapter 29, Agent and Processing Unit Configuration in TIBCO BusinessEvents Developer’s Guide for reference details.
Cache writer thread tuning  One cache writer property is available. It is set at the agent class level:
Agent.AgentClassName.threadcount
Database writes tuning  For details about database writer thread and queue tuning see Database Write Tuning Options for Cache Aside.
Parallel or Sequential Operations  For details on the Agent.agentClassName.enableParallelOps property, see Parallel and Sequential Operations.
For reference documentation see Table 50, CDD Cluster Tab Backing Store Properties in TIBCO BusinessEvents Developer’s Guide.
Write Behind Options
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 the diagram legend, see Cache-Aside Options.) For backing store 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.
Advantages
Disadvantages
Tuning Properties for Write-behind Strategy with Coherence Cache Provider
Note that with write behind strategy, sequential operations are used by default, instead of parallel operations (that is Agent.agentClassName.enableParallelOps=false).
There are no tuning properties for write behind and TIBCO BusinessEvents DataGrid. The following properties are used with the Coherence cache provider:
Cache service thread tuning  Uses the following cluster-wide property:
tangosol.coherence.distributed.threads
Specifies the number of Coherence daemon threads used by the distributed cache service (per processing unit). If zero, all relevant tasks are performed on the service thread. For reference documentation see Table 47, CDD Cluster Tab Coherence Properties in TIBCO BusinessEvents Developer’s Guide.
Database writes batch size tuning   When Coherence provides many updates, the backing store commits the writes to the database after each be.backingstore.commitSize batch size is reached. For reference documentation see Table 50, CDD Cluster Tab Backing Store Properties in TIBCO BusinessEvents Developer’s Guide.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved