In This Section

Overview

This section provides a high level overview of how X Platform components are configured. It also serves as a reference for the configuration properties supported by the various components.

 

Configuration Repository

The diagram above provides a high level depiction of the X Platform's configuration architecture. Salient aspects of this architecture are:

Application Lifecycle

The configuration of X Platform components is tied very closely to the application's lifecycle. 

This document is only concerned with the Configure Phase

Populating the Repository

X supports different ways to populate a configuration repository depending on whether X is being used in an embedded or non-embedded manner and, if embedded, how the configuration information is distributed and managed. 

Embedded Use

X should be used in an embedded manner when the application's main entry point is in the application code. When used in this manner, the following are the supported mechanisms by which the configuration repository can be populated.

Non-Embedded Use

The X Platform is considered to be used in a non-embedded manner when the application's main entry point is in a Talon Server. When used in this manner, the configuration repository is initialized from external storage via the configured persistence pluginIt is recommended that Robin be used for the configuration, deployment, and management of X applications when X is used in a non-embedded manner. The Robin framework uses the same XML descriptor as described above to configure the platform. However, it processes the XML descriptor in a manner that allows for the platform configuration and application code to be deployed using independent channels such that the configuration materializes in the Talon server from external storage when the server is launched. Refer to the Robin documentation for further information on how to use the X Platform in a non-embedded manner.

Note: It is possible to materialize configuration into the repository from external storage even when operating in embedded mode. However, that puts the burden of responsibility of managing, distributing and storing the platform configuration in the appropriate format and location external to the process so that the configuration is picked up correctly from the external storage. This responsibility is picked up by Robin when operating in non-embedded mode.

The XML Configuration Descriptor

X supports describing and initializing platform configuration using XML via its Domain Descriptor Language schema (x-ddl.xsd). This section describes commonly used DDL configuration elements. More detail can be found in DDL Schema Reference, which discusses all of the attributes in more detail. 

Overview

The XML document above is a sample configuration document. The document describes a multi-agent application scenario. 

<?xml version="1.0"?>
<model xmlns="http://www.neeveresearch.com/schema/x-ddl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <buses>
        <bus name="frontoffice" descriptor="${FRONTOFFICE_BUSDESCRIPTOR::falcon://fastmachine:8040}">
            <channels>
                <channel id="1" name="orders">
                    <qos>Guaranteed</qos>
                </channel>
                <channel id="3" name="events">
                    <qos>BestEffort</qos>
                </channel>
            </channels>
        </bus>
    </buses>
    <apps>
        <app name="forwarder" mainClass="com.neeve.samples.Forwarder">
            <messaging>
                <buses> 
                  <bus name="frontoffice">
                    <channels>
                        <channel name="orders" join="true"/>
                        <channel name="events" join="false"/>
                    </channels>
                    <detachedSend enabled="${FORWARDER_FRONTOFFICEDETACHEDSEND::true}">
                        <queueDepth>1024</queueDepth>
                        <queueOfferStrategy>SingleThreaded</queueOfferStrategy>
                        <queueWaitStrategy>BusySpin</queueWaitStrategy>
                        <queueDrainerCpuAffinityMask>${FORWARDER_FRONTOFFICEDETACHEDSENDCPUAFFMASK::0}</queueDrainerCpuAffinityMask>
                    </detachedSend>
                  </bus>
                </buses>
            </messaging>
            <storage>
            	<clustering>
            	   <localIfAddr>${FORWARDER_REPLICATION_INTERFACE::localhost}</localIfAddr>
	       	       <localPort>12000</localPort>
       		    </clustering>
                <persistence>
                    <pageSize>16384</pageSize>
                    <detachedPersist enabled="false"/>
                </persistence>
            </storage>
        </app>

        <app name="receiver" mainClass="com.neeve.samples.Receiver">
            <messaging>
                <bus name="frontoffice">
                    <channels>
                        <channel name="orders" join="true"/>
                    </channels>
                </bus>
            </messaging>
        </app>

        <app name="sender" mainClass="com.neeve.samples.Sender">
            <messaging>
                <bus name="frontoffice">
                    <channels>
                        <channel name="orders" join="false"/>
                        <channel name="events" join="true"/>
                    </channels>
                </bus>
            </messaging>
        </app>
    </apps>

    <servers>
        <server name="forwarder1">
            <apps>
                <app name="forwarder" autoStart="true"/>
            </apps>
        </server>

        <server name="forwarder2">
            <apps>
                <app name="forwarder" autoStart="true"/>
            </apps>
        </server>

        <server name="receiver">
            <apps>
                <app name="receiver" autoStart="true"/>
            </apps>
        </server>

        <server name="sender">
            <apps>
                <app name="sender" autoStart="true"/>
            </apps>
        </server>
    </servers>
</model>

Messaging Buses & Connection Descriptors

<bus name="frontoffice" descriptor="${FRONTOFFICE_BUSDESCRIPTOR::falcon://fastmachine:8040}">
    <channels>
        <channel id="1" name="orders">
            <qos>Guaranteed</qos>
        </channel>
        <channel id="3" name="events">
            <qos>BestEffort</qos>
        </channel>
    </channels>
</bus>

The 'buses' section configures the various messaging buses in use in the scenario. For example, the above configures a messaging bus named 'frontoffice' that: 

 

When configuring the platform using the VMConfigurer class, the environment is the composition of the user property table, process environment, and Java system properties, in that order of precedence.

Applications (AEP Engines)

<apps>
    <app name="forwarder" mainClass="com.neeve.samples.Forwarder">
        <messaging>
          <buses> 
            <bus name="frontoffice">
                <channels>
                    <channel name="orders" join="true"/>
                    <channel name="events" join="false/">
                </channels>
                <detachedSend enabled="${FORWARDER_FRONTOFFICEDETACHEDSEND::true}">
                    <queueDepth>1024</queueDepth>
                    <queueOfferStrategy>SingleThreaded</queueOfferStrategy>
                    <queueWaitStrategy>BusySpin</queueWaitStrategy>
                    <queueDrainerCpuAffinityMask>${FORWARDER_FRONTOFFICEDETACHEDSENDCPUAFFMASK::0}</queueDrainerCpuAffinityMask>
                </detachedSend>
            </bus>
          </buses> 
        </messaging>
        <storage>
            <clustering>
               <localIfAddr>${FORWARDER_REPLICATION_INTERFACE::localhost}</localIfAddr>
	           <localPort>12000</localPort>
            </clustering>
            <persistence>
                <pageSize>16384</pageSize>
                <detachedPersist enabled="false"/>
            </persistence>
        </storage>
    </app>

    <app name="receiver" mainClass="com.neeve.samples.Receiver">
       .
       .
       .
    </app>

    <app name="sender" mainClass="com.neeve.samples.Sender">
       .
       .
       .
    </app>
</apps>

The 'app's section configures the various applications in the scenario. An application is synonymous with an AEP engine. For example, the above configures three applications (i.e. engines).

 

An application's entry point is used by a Talon Server as the main application class to load.

Messages associated with channels indicate the default channel over which a message is sent and which forms part of messaging ROE between application agents.

Talon Servers (XVMs)

<servers>
    <server name="forwarder1">
        <apps>
            <app name="forwarder" autoStart="true"/>
        </apps>
    </server>

    <server name="forwarder2">
        <apps>
            <app name="forwarder" autoStart="true"/>
        </apps>
    </server>

    <server name="receiver">
        <apps>
            <app name="receiver" autoStart="true"/>
        </apps>
    </server>

    <server name="sender">
        <apps>
            <app name="sender" autoStart="true"/>
        </apps>
    </server>
</servers>

The 'servers' sections configures the various Talon servers in the scenario. For example, the above configures four Talon Servers.