Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AThe The Aspire Application XML file (application.xml) specifies the components (and their configurations) that together implement your application.

The system configuration file is also known as the "Component Manager" configuration file, since it is, technically, the component manager that reads the file and initializes the components.

 

Contents

...

...

...

...

application.

The system configuration file is also known as the "Component Manager" configuration file, since it is, technically, the component manager that reads the file and initializes the components.

Table of Contents

...

Loading the Configuration File

The configuration file can be loaded in two ways:

  • Through the System Administration user interface.
    • Using a configuration file stored on disk
    • By downloading and installing an App Bundle from Maven
  • Automatic launching on startup via the Settings file. See Settings Configuration for  for more details.

To load a system configuration file through the user interface, do the following:

...

NOTE: Loading a configuration file via the System Administration user interface utilizes an application servlet command. See Advanced Configuration Loading below below.

Loading Multiple Configuration Files

...

You can load multiple configuration files - as many as you'd like. This is a very useful technique for organizing your application into small, easily manageable and configurable sections - one per system configuration file.

The Configuration File Basics

...

The template for the standard configuration file is as follows:

...

  • The application name (<config name="YOUR-CONFIG-NAME">) will be used to name the application that holds all of the components that it creates.
    • This name will be used by the System Administration user interface to reference the application.
    • Applications with the same name (on different servers in a cluster) will be assumed to perform the same function.
    • This name will also be prefixed to all of the names of the components created by the configuration manager.
    • See below for more details.
  • The attribute @typeFlags is optional. It is used to identify this configuration to the administration user interfaces. See below for more details.

Components

...

Every application contains a simple list of components. Each component can be configured with configuration XML.

...

  • All components in the list of components will be created and initialized.
  • Multiple copies of the any type of component can be created.
  • All components are given a name. The names must be unique (within the component manager in which they are created - like files within a directory must be unique). The name is used to reference the component within the component manager.
  • See the wiki documentation for each individual component for details on how individual components are configured.

Enabling and Disabling Components

Components can be disabled using @enable or @disable attributes. If both @enabled and @disabled flags are specified, the value of @enable takes precedence. Disabled components are completely removed from the system, as if they had never been written into the XML file at all.

...

If a component manager (such as a pipeline manager) is disabled, then it will not load itself, nor will it load or initialize any of its sub-components.

Component Names

The following example shows a system configuration file that contains two components:

...


Notice how the subcomponents all have the name of the component manager prefixed to them. In this way, all component names are hierarchical - like directory and file names. See Naming Components for  for more information.

Factory Names

Factory names in Aspire specify the Maven Artifact which is the JAR file that implements the required Aspire component factory. This can be specified in the Aspire System Configuration file in three different ways:

...

Code Block
languagexml
    <component name="FeedOne" subType="feedOne" 
                 factoryName="com.searchtechnologies.aspire:aspire-tools:2.0">
       .
       .
   </component>
 

Sub-Types

Component factories correspond to Bundles, i.e., actual physical JAR files that are dynamically loaded into Aspire.

...

The subType value required for each component can be found on the wiki page for that component.

Property Substitution

...

Properties can be specified with ${propertyName} inside the system.xml file. These properties will be substituted when the configuration is loaded.

See Properties for more details on substituting properties.

settings.xml properties

Properties can be specified inside the <properties> tag inside the settings.xml file. All of these properties can be used for property substitution inside the settings.xml configuration file. See system.xml properties for more information.

Standard Aspire Property Names

Several standard Aspire property names are available to all configurations. These include:

...

  • ${shared.data.dir} - The standard location for data which is shared across applications. Currently the same as ${aspire.home}/data/shared .

Environment Variables

Environment variables can used for property names. For example, ${JAVA_HOME}.

Java System Properties

All Java system properties are also available. For example, ${user.home} will be the home directory for the user who started up Aspire.

Loading values from Java properties files

You can also load properties in to Aspire from a Java properties file. The properties file would be of the form:

...

(unable to open external properties file testdata/com.searchtechnologies.aspire.framework/Properties/doesnot.exist)

Advanced Configuration Loading

...

Using the UI to load a configution file invokes an underlying Application servlet command start. If the user chooses to load a file named config/system.xml (by typing config/system.xml in the input box), the URL sent to the application is:

 http://localhost:50505/aspire?cmd=start&config=config/system.xml

The start command

Other options that are not available via the UI are available using the command start. Using xml instead of config allows the user to specify an application xml fragment and load this configuration:

...

 http://localhost:50505/aspire?cmd=start&autoStart=true&xml=%3Capplication%20config=%22com.searchtechnologies.appbundles:cs-manager:1.0-SNAPSHOT%22%3E%3Cproperties%3E%3Cproperty%20name=%22debug%22%3Etrue%3C/property%3E%3Cproperty%20name=%22managerExternalRDB%22%3Efalse%3C/property%3E%3Cproperty%20name=%22managerRDB%22%3ECSRDB%3C/property%3E%3Cproperty%20name=%22managerExternalJDBCUrl%22%3E%3C/property%3E%3Cproperty%20name=%22managerExternalJDBCDriverJar%22%3E%3C/property%3E%3Cproperty%20name=%22managerExternalJDBCUser%22%3E%3C/property%3E%3Cproperty%20name=%22managerExternalJDBCPassword%22%3E%3C/property%3E%3C/properties%3E%3C/application%3E

The remove command

Use the remove command to remove a component manager from the application's configuration:

...

The name passed will be the name attribute from the file or app bundle loaded (or name from the component manager xml fragment if specified). When using remove you may also pass autoStart=false to remove the configuration from the settings file

Application Names and Type Flags

...

At the top of the application XML file you can specify a name for the entire application, and some type flags, which identify the purpose of the configuration for the administration user interface:

Code Block
languagexml
  <?xml version="1.0" encoding="UTF-8"?>
 <application name="MyName" typeFlags="feeder,sub-jobs">
   .
   .
   .
 </application>
 

The System Configuration Name

The name specified at the top of the application XML file is used for the following purposes:

...

Note that the name specified in the application.xml file is the default name. A new name can be specified in the System Administration user interface when the configuration file or app bundle is loaded.

The typeFlags

The type flags in the system configuration file is specified as follows:

...

The flags are optional and are used to specify how a configuration can be used to process jobs for the System Administration user interfaces.

Currently Defined Application Type Flags

Aspire 2.0 Type Flags Usage

The following flags are currently defined:

...

Although @typeFlags can be used as part of as part of application XML files, they are really designed to be used with Application Bundles (or App Bundles for short). App Bundles are units of functionality which can be made up of multiple pipeline managers and many components. App Bundles are specified with a system configuration file (as described on this wiki page) and can be bundled with other files into JAR files and deployed to Maven repositories.

How are Type Flags Used by the Admin Interface?

The System Administration user interface can create routing tables, which are attached to jobs, and specify how they are routed from configuration to configuration (or, more typically, from App Bundle to App Bundle). The @typeFlags attribute is intended to provide enough information to the user interface so that these routing tables can be created.

...