Developing Apama Applications > Developing Apama Applications in EPL > Using Correlator Plug-ins in EPL > Using the MemoryStore > Using the distributed MemoryStore > Configuration files for distributed stores > BigMemory Max driver specific details
BigMemory Max driver specific details
You can create configuration files for BigMemory Max when using Apama in Software AG Designer. The BigMemory Max installation directory (where the zip files were unpacked) needs to be specified as the providerDir property.
See the BigMemory Max documentation for information about the following:
*The .properties file for a distributed store contains an option for choosing consistency. The options are STRONG or EVENTUAL consistency you will want to understand the trade-offs between these two modes.
*You can set BigMemory Max driver properties (described in the table below) in the -spring.xml configuration file. Alternatively, you can specify many of these properties in an ehcache.xml configuration file and then specify the path for that file in the -spring.xmlconfiguration file using the ehcacheConfigFile property. If this is done, many of the properties in the spring.xml configuration file will be ignored; the settings derived from the ehcache.xml file will be used instead.
*Use the storeName-spring.properties file to set configuration properties for the BigMemory Max driver.
*Using off-heap storage requires setting -XX:MaxDirectMemorySize=. Specify this in the command line for starting the correlator as -J-XX:MaxDirectMemorySize=. The documentation provides recommendations for specifying the value of this property. When you add a correlator to a correlator launch configuration in Software AG Designer, you can select the Maximum Java off-heap storage in Mb option. See Correlator arguments.
For more information on Ehcache types, see the Ehcache Javadoc and search for the required type such as CacheConfiguration.
Property Name
Type
Description
cacheConfiguration
CacheConfiguration
Ehcache CacheConfiguration bean, shared by all caches (Tables). Typically used as a compound bean name, for example, cacheConfiguration. overflowToOffHeap.
cacheDecoratorFactory
String
Name of a class to use as a cacheDecoratorFactory. The named class must be on the classpath and must implement Ehcache's CacheDecoratorFactory interface.
cacheDecoratorFactoryProperties
Properties
Properties to pass to a cacheDecoratorFactory. Allows use of the same class for many caches.
clusterName
String
Comma-separated list of host:port identifiers for the servers, or a tc-config.xml file name. Best practice is to list all Terracotta Server Array (TSA) nodes.
configuration
Configuration
Ehcache Configuration bean. Typically used as a compound bean name, for example, configuration.monitoring.
maxMBLocalOffHeap
long
Number of MB of local off-heap data. Total across all tables, per correlator process.
pinning
String
Either an attribute value of "inCache" (default) or "localMemory" or a <null/> XML element (i.e.<property name="pinning"><null/></property>.) Pinning prevents eviction if the cache size exceeds the configured maximum size. Recommended if the cache is being used as a system of record
terracottaConfiguration
TerracottaConfiguration
Ehcache TerracottaConfiguration bean. Typically used as a compound bean name, for example, terracottaConfiguration. consistency.
ehcacheConfigFile
String
Path to an ehcache.xml configuration file.
Note: If this is specified, any other properties listed in this table will be ignored.
You can set the following BigMemory Max driver properties in the spring.xml configuration file, but not in the ehcache.xml configuration file as they modify how the driver accesses the BigMemory Max Cache.
Property Name
Type
Description
backupCopies
int
Ignored. Not supported. The number of backups is governed by the TSA topology defined in the BigMemory Max documentation and used to configure the TSA nodes.
initialMinClusterSize
int
The minimum cluster size (number of correlators) that must be connected for prepare to finish.
logLevel
String
The log level.
rowChangedOldValueRequired
boolean
Whether to expose old values in rowChanged events. Must be set to false.
useCompareAndSwap
boolean
Whether to use compare and swap (CaS) operations or just put/remove. Some versions of BigMemory Max support only CaS in
Strong
consistency.
useCompareAndSwapMap
Map(String, Boolean)
Per-table (cache) configuration for whether to use CaS or put/remove.
exposeSearchAttributes
boolean
Enable exposing search attributes. If true, then the MemoryStore schema columns are exposed as BigMemory search attributes and are indexed, so that other clients of BigMemory can perform searches on the data set. If exposeSearchAttributesSet is non-empty, then only the named columns are exposed as BigMemory search attributes. See notes below about non-Apama applications accessing the data in a BigMemory cluster.
exposeSearchAttributesSet
Set(String)
Limits the set of columns in each table that should be exposed as search attributes. Entries are in the form tableName.columnName. If empty, all schema columns are exposed as search attributes. There is an incremental cost per column that is exposed, so for performance, only expose the columns which need to be used in searches.
For example, to expose only the "Surname" and "FirstName" columns of "myTable":

<property name="exposeSearchAttributes" value="true"/>
<property name="exposeSearchAttributesSet">
<set>
<value>myTable.Surname</value>
<value>myTable.FirstName</value>
</set>
</property>
The following compound properties are also exposed in the .properties file, or set by default in the spring.xmlconfiguration file:
Property Name
Type
Notes
cacheConfiguration.eternal
boolean
Disables expiration (removing old, unused values) of entries if true. Set to true in the default spring.xml configuration file.
cacheConfiguration.
maxEntriesLocalHeap
int
The number of entries for each table.
This is the maxEntriesLocalHeap entry in the .properties file.
cacheConfiguration.
overflowToOffHeap
boolean
Whether to use off-heap storage. For scenarios where data is fast changing and being written from multiple correlators, the cache may perform better if this is disabled.
This is the cacheConfiguration.overflowToOffHeap entry in the .properties file.
pinning
String
Set to inCache by default.
terracottaConfiguration.
localCacheEnabled
boolean
Whether to cache entries in the correlator process. Set to true in the default spring.xml configuration file.
terracottaConfiguration.
clustered
boolean
Whether to use a TSA. Set to true in the default spring.xml configuration file.
terracottaConfiguration.
consistency
String
Either 'STRONG' or 'EVENTUAL'. STRONG gives MemoryStore-like guarantees, while EVENTUAL is faster but may have stale values read.
This is the terracottaConfiguration.consistency entry in the .properties file.
terracottaConfiguration.
synchronousWrites
boolean
If true, then data is guaranteed to be out of process by the time a Row.commit() action completes. Disabling this can increase speed.
This is the terracottaConfiguration.synchronousWrites entry in the .properties file.
Note the following when using the BigMemory Max driver:
All correlators accessing the same data in a BigMemory cluster must have the same configuration. If accessing from non-Apama applications, clients will need the correct cache configuration (available from the Terracotta Management Console) and have the appropriate Apama classes available on their classpath (available in the distmemstore and ap-distmemstore-bigmemory.jar files) in order to access the cache.
For reference, the following table maps Apama MemoryStore terminology to BigMemory Max classes; this may be useful when referring to the BigMemory Max documentation:
MemoryStore Event Object
BigMemory Max Class
Store
CacheManager
Table
Cache
Row
Element
By default, a distributed MemoryStore Store uses the BigMemory Max default cache manager. To specify the use of a different cache manager, specify the name property on the configuration bean. For example:
<property name="configuration.name" value="myCacheManager"/>
In a cluster, if one correlator calls subscribeRowChanged() for a given MemoryStore table, then all correlators in that cluster that modify the entries in that table must also call subscribeRowChanged() on that table even if they do not consume the events.
Iterating over a table may require pulling the entire table into memory. It may fail if the table is being modified.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.