Configuration

This section describes how to configure nodes and their associated node agents. It also discusses how configuration life cycle is managed.

Node configuration

Node configuration has a configuration type of nodeconfig.

Node configuration is separated into these distinct areas:

  • Node wide values

  • Per JVM values

The node configuration is separated into these distinct areas:

  • Node description configuration

  • Memory throttling configuration

  • Shared memory IPC configuration

  • Deadlock resolution configuration

  • Default domain configuration

Table 3.3, “Node description configuration” defines the node description configuration parameters.

Table 3.3. Node description configuration

NameTypeDescription
defaultDescriptionStringNode description
propertiesArray of name/value pairs.An array of service properties. These properties are added to the node service record.

The optional memory throttling configuration controls:

  • Utilization percentage of shared memory at which to start throttling. This is set to the value of the thresholdPercentage configuration parameter.

  • Utilization percentage of shared memory at which to start stalling. This is set to the value of the thresholdPercentage plus 30 percent.

  • Utilization percentage of shared memory at which to generate a low memory warning. This is set to the value of the thresholdPercentage plus 30 percent, but not exceeding 90 percent. A low memory warning is always generated at 90 percent utilization.

Throttling and stall states are used internally to prevent memory exhaustion under extreme loads. They can also be used by an application for the same reasons using the com.kabira.platform.swbuiltin.EngineServices.throttle() API. For details on the throttle API see the product javadoc.

Table 3.4, “Memory throttling configuration” defines the memory throttling configuration parameters.

Table 3.4. Memory throttling configuration

NameTypeDescription
thresholdPercentageIntegerA number treated as a percentage at which to start shared memory throttling. The value must be between 0 and 100. There is no default value. This value is required if the memory throttling configuration block is specified.
frequencyIntegerThe number of shared memory utilization checks per second. There is no default value. This value is required if the memory throttling configuration block is specified.

Table 3.5, “Flusher configuration” defines the shared memory cache flusher configuration parameters.

Table 3.5. Flusher configuration

NameTypeDescription
flushIntervalSecondsIntegerThe number of seconds to sleep between runs of the flusher. A value of 0 disables the flusher. The default value is 1 seconds.
maximumTypesIntegerControl the number of types that will be flushed per flusher run. A value of 0 indicates that there is no limit. The default value is 0.
maximumObjectsPerTypeIntegerControl the number of objects per type that will be flushed per flusher run. A value of 0 indicates no limit. The default value is 0.

Table 3.6, “Shared memory IPC configuration” defines the shared memory IPC configuration parameters.

Table 3.6. Shared memory IPC configuration

NameTypeDescription
noDestinationTimeoutSecondsIntegerThe number of seconds to block waiting for a target JVM for a method invocation. The current transaction is aborted when the timeout value is exceeded. The default value is 10 seconds.

Table 3.7, “Deadlock resolution configuration” defines the deadlock resolution configuration parameters.

Table 3.7. Deadlock resolution configuration

NameTypeDescription
maximumBackoffMillisecondsIntegerThe maximum amount of time, in milliseconds, to backoff during deadlock resolution. Deadlock backoff times will never exceed this value. The default value is 10000 milliseconds (10 seconds).

Table 3.8, “Default domain configuration” defines the domain configuration parameters.

Table 3.8. Default domain configuration

NameTypeDescription
nameStringName of domain to join.
groupStringName of domain group to join. The group must be in the domain configured in name.

JVM configuration is defined per JVM by name. Multiple JVM configuration blocks may be defined. The JVM name is optionally defined when the JVM is deployed using the jvmname deployment tool option. If the jvmname option is not specified when the JVM is deployed, a unique name is generated automatically.

JVM configuration supports specifying:

  • Dispatch thread configuration - the simultaneous number of remote method invocations into the JVM.

  • Timer thread configuration - the number of concurrent timers, and maximum timer resolution.

  • Runtime tracing configuration

All JVM configuration values, other than the JVM name, are optional. If a JVM configuration is deactivated, all of the configuration parameters are set to their default value.

Table 3.9, “JVM configuration” defines the JVM configuration parameters.

Table 3.9. JVM configuration

NameTypeDescription
jvmNameStringJVM name. This parameter is required.
minimumDispatchThreadsIntegerMinimum number of dispatch threads. This value is optional. Default value is 10.
maximumDispatchThreadsIntegerMaximum number of dispatch threads. This value is optional. Default value is 2000.
timerParallelismIntegerNumber of timers that can be executing concurrently. This value is optional. Default value is 1.
timerResolutionMillisecondsIntegerThe maximum timer resolution. This is the interval at which timers are examined. Higher resolution timers have more impact on system performance. This value is optional. Default value is 1000.
traceFatalFilterBit stringTrace flag for fatal messages. This value is optional. Default value is 0x3FFFFFF.
traceWarningFilterBit stringTrace flag for warning messages. This value is optional. Default value is 0x3FFFFFF.
traceInfoFilterBit stringTrace flag for informational messages. This value is optional. Default value is 0x3FFFFFF.
traceDebugFilterBit stringTrace flag for debug messages. This value is optional. Default value is 0x0 (all messages disabled).

The bit field values for the trace configuration parameters are defined in Table 3.10, “Trace flag values”.

Table 3.10. Trace flag values

ValueDescription
0x00000001System services. Low level operating system abstraction layer in runtime.
0x00000002Event bus. Shared memory inter-process dispatch mechanism.
0x00000004Object services. Managed object runtime component.
0x00000008System management.
0x00000100Distribution.
0x00000400Exceptions.
0x00004000Java. Class loader and JVM interaction with runtime.
0x00008000System coordinator.
0x00010000Engine. Process container for a JVM.
0x00020000Shared memory allocator.
0x00100000Distributed discovery.
0x00200000Distribution protocol. Trace the distribution Protocol Data Units.
0x01000000Security.

Example 3.1, “Node configuration example” is an example node and JVM configuration.

Example 3.1. Node configuration example

configuration "Node A" version "3.0" type "nodeconfig"
{
     configure switchadmin
     {
          configure Node
          {
               //
               //     Set the node description and add
               //     a service property of foo=bar to the
               //     node service record
               //
               Description
               {
                    defaultDescription = "Development";
                    properties =
                    {
                         {
                              name = "foo";
                              value = "bar";
                         }
                    };
               };

               //
               //     Shared memory flusher control
               //
               Flusher
               {
                    flushIntervalSeconds = 2;
                    maximumTypes = 3;
                    maximumObjectsPerType = 4;
               };

               //
               //     Set a memory utilization threshold of 50%
               //     and check 5 times a second
               //
               MemoryThrottle
               {
                    thresholdPercentage = 50;
                    frequency = 5;
               };

               //
               //     Set the no destination timeout value to 10 seconds
               //     for the Shared memory IPC mechanism
               //
               EventBus
               {
                    noDestinationTimeoutSeconds = 10;
               };


               //
               //    Set the maximum deadlock backoff resolution to 5 seconds
               //
               Deadlock
               {
                    maximumBackoffMilliseconds = 5000;
               };

               //
               //     Join the Application Cluster group in 
               //     the Development domain
               //
               Domain
               {
                    name = "Development";
                    group = "Application Cluster";
               };
          };

    };

    configure switchadmin
    {
          JVM
          {
               jvmName = "My JVM";

               //
               //    Configure dispatch threads
               //
               minimumDispatchThreads = 8;
               maximumDispatchThreads = 16;

               //
               //    Allow four concurrent timers with a 500 millisecond resolution
               //
               timerParallelism = 4;
               timerResolutionMilliseconds = 500;

               //
               //    Update runtime trace flags
               //
               traceDebugFilter = 0x0;
               traceInfoFilter = 0x3FFFFFF;
               traceWarningFilter = 0x3FFFFFF;
               traceFatalFilter = 0x3FFFFFF;
          };
     };
};

Node agent configuration

Node agent configuration has a configuration type of nodeagent.

Table 3.11, “Node agent configuration” defines the node agent configuration parameters.

Table 3.11. Node agent configuration

NameTypeDescription
enableEventForwardingBooleanA value of true enables the node agent network listener. A value of false disables the node agent event listener preventing events from being published to Domain Managers.
enableTraceToEventBooleanA value of true enables publishing of log file entries as events. A value of false disables the publishing of log file entries as events.
numberOfMessagesIntegerThe size of the log file trace buffer in number of messages. If the number of messages in the trace buffer exceed this value, new messages are discarded until there is room in the buffer.
listenAddressStringThe node agent network listener address. The format of this string is <protocol>:<host name>:<port number>. A value of "0" for the port number field will cause the node agent to pick a random port number. Protocol must be one of TCP or SSL.
topicNameListString listList of event topics. All events on these topics will be sent to remote Domain Managers.

[Warning]

The node agent listenAddress configuration must match the Domain Manager nodeAgentAddress (see Table 2.3, “Node configuration”) configuration value if service discovery is not being used for managed node discovery. If these two values do not match, events will not be forwarded to the Domain Manager by the node. The listenAddress configuration value defines a network listener. The nodeAgentAddress configuration value defines the remote address that the Domain Manager, acting as a network client, should connect with to communicate with the node.

Example 3.2, “Example node agent configuration” is an example node agent configuration.

Example 3.2. Example node agent configuration

configuration "nodeagent" version "2.0" type "nodeagent"
{
     configure nodeagent
     {
          NodeAgentConfiguration
          {
               enableEventForwarding = true;
               enableTraceToEvent = true;
               numberOfMessages = 1000;
               listenAddress = "TCP::0";
               topicNameList =
               {
                    "kabira.kis",
                    "kabira.kts"
               };
          };
     };
};

Managing configuration

A complete discussion of configuration life cycle can be found in the TIBCO BusinessEvents® Extreme Java Developer's Guide. In summary configuration follows this life-cycle:

  • Configuration is loaded into a node

  • Configuration is activated

  • Configuration is deactivated

  • Configuration is removed from a node

Configuration is loaded into a node using either the TIBCO BusinessEvents® Extreme Administrator dialog show in Figure 3.10, “Loading configuration” or this command:

administrator servicename=A load configuration source=myConfiguration.kcs

The Ignore memory threshold check box is used to allow configuration data to be loaded in shared memory even if the configured shared memory throttle utilization is exceeded (see Table 3.4, “Memory throttling configuration”). Without this override, attempting to load configuration data into congested shared memory will fail.

Loading configuration

Figure 3.10. Loading configuration


All loaded configuration data can be displayed from the Configuration tab for a node as shown in Figure 3.11, “Loaded configuration”, or using this command:

administrator servicename=A display configuration

This information is displayed for each loaded configuration file:

  • Type - Configuration type.

  • Name - Configuration name.

  • Version - Configuration version.

  • State - Current state.

  • State Change Time - Time of last state change.

  • Load Time - Time configuration file was loaded.

  • Initial Activation Time - Initial time configuration was activated.

  • Source - Configuration source file path.

  • Number of Configuration Objects - Number of objects created from the configuration file.

  • Principal - User that last changed configuration state.

Loaded configuration

Figure 3.11. Loaded configuration


Configuration activation, deactivation, and removal is done from the TIBCO BusinessEvents® Extreme Administrator configuration screen show in Figure 3.12, “Managing configuration”.

Managing configuration

Figure 3.12. Managing configuration


Configuration state changes and also be done using these commands:

//
//  Activate a deactive configuration
//
administrator servicename=A activate configuration type=distribution name=distribution version=1.0

//
//  Deactivate an active configuration
//
administrator servicename=A deactivate configuration type=distribution name=distribution version=1.0

//
//  Remove configuration from shared memory
//
administrator servicename=A remove configuration type=distribution name=distribution version=1.0

The View Source... button shown in Figure 3.12, “Managing configuration” can be used to export loaded configuration in a format that can be modified and reloaded. Configuration can also be exported using this command:

administrator servicename=A export configuration type=distribution name=distribution version=1.0