Child pages
  • Elf
Skip to end of metadata
Go to start of metadata

Elf is a robust container designed to support scripted applications.

Refer to the infrastructure diagram and interaction diagram for where it fits into our general workflow-management scheme.

Elf's native scripting language is Ogrescript, but it can be extended to run other kinds of scripts as well.

Downloads

Latest versions: ELF-latest.

Elf Javadocs can be accessed at: API.

Elf Core Goals

  1. Robust
    • Must not fail unexpectedly
    • Must not fail silently
    • Must be able to determine cause of failure
  2. Monitorable
    • Must report status information to listeners
    • Should report debug information to listeners
    • Should report progress information to listeners
    • Should standardize logging across scripting implementations
  3. Extensible
    • Should allow for user extensions to core functionality without recompilation

Elf Core Functionality

Authentication Management

Individual sub-component may need to authenticate to services. The AuthenticationManager provides an extensible mechanism for managing authentication tokens.

Event Management

A centralized event-handling mechanism. Sub-components have a means of adding listeners for specific types of events as well as a standardized way to create and send events.

Identity Management

Components create an identity for their sub-components through this mechanism, which is also extensible.

Elf Container

Elf supports multiple types of containers.

Elf Core Components

ElfRuntime

Instantiated and started by the Eclipse platform. It is responsible for instantiation, management of lifetime (configure, initialize, run), and management of status (calling Bootstrap.alive(), Bootstrap.failed(), Bootstrap.success()) of the Bootstrap object.

This object does not throw any exceptions, but handles failures cleanly by returning an appropriate exit code.

Bootstrap

Responsible for parsing the command line arguments, the set-up of the runtime environment, the configuration of ElfPlatform, and the instantiation and management of the Container. The configuration of this class works with little mandatory configuration and fails cleanly if the container is missing or invalid.

ElfPlatform

The globally accessible point of access to Elf-wide objects. The various managers (Authentication, Event, and Identity) are instantiated and configured by this class from a file determined by a command line argument:

  • -bootstrap.properties <value>.

The platform provides default managers if nothing specific is requested.

Elf Runtime Environment

The platform provides a standard environment for running scripted applications and a means of accessing these variables.

This environment consists of the following:

  • bootstrap.home – The directory in which the Bootstrap code will run.
    • The default location is defined by the system property user.dir
    • This can be overridden by a property named bootstrapHome in the bootstrap properties file.
  • container.path – The location of the Container script.
    • The default location is a file named elf-container.xml in the current working directory.
    • This can be overridden by a property named containerPath in the bootstrap properties file.

Elf Platform Initialization

The ElfPlatform handles the instantiation and initialization of the components that are available Elf-wide.

Bootstrap Properties File

A standard properties file.

bootstrap.properties example

Running Elf

Elf requires both JAVA_HOME and ELF_HOME environment variables to be set. Elf looks for a container in the current directory; this can be overridden by a command-line argument

  • -containerPath <path>

or a property in bootstrapProperties (containerPath).

Elf also looks for bootstrapProperties in the current directory; this can be overridden by a command-line argument

  • -bootstrapProperties <path>.

Thus:

  • ELF_HOME/elf
    OR
  • ELF_HOME/elf -containerPath /tmp/foo.xml
    OR
  • ELF_HOME/elf -bootstrapProperties /tmp/bootstrap.properties
    OR
    ELF_HOME/elf -bootstrapProperties /tmp/bootstrap.properties -containerPath /tmp/foo.xml

ELF Container Script Example

  • No labels

2 Comments

  1. The information on logging here needs to be brought up to date.

  2. This page needs to be revised; we need to incorporate some of the information contained in https://wiki.ncsa.illinois.edu/display/MRDPUB/PWE2008.