Project

General

Profile

Configuration Files

In NARVAL world, two configuration files exists :
  1. Sub-system configuration (topology of a particular experiment)
  2. System configuration (NARVAL itself)

Topology configuration file

This file describes the set of actors used in a Narval sub system through a XML file.
The global format of this XML schema is the following :

<xml version="1.0"?>
<configuration>
    -
    - Actors description
    -
</configuration>

Topology lexicon

High level balises

  • configuration - Highest level balise. It delimits the XML topology description file.
  • producer - It delimits the XML description of a producer actor. This balise needs one parameter output_buffers to define the number of output_buffer of this actor.
  • stand_alone_actor - It delimits the XML description of a stand_alone actor.
  • consumer - It delimits the XML description of a consumer actor. This balise needs one parameter input_buffers to define the number of input_buffer of this actor.
  • intermediary - It delimits the XML description of an intermediary actor. This balise needs two parameters output_buffers and input_buffers to define the number of output and input buffers of this actor.

The configuration balise is compound of a set of producer, stand_alone_actor, consumer, intermediary balises.

The producer, stand_alone_actor, consumer, intermediary balises are compound of balises of lower level describing the actor topology.

Low level balises

  • name - Defines the name of the actor
  • hostname - Specifies the name of the machine hosting the actor. It can be done through IP number or hostname.
  • binary_code - Specifies the narval actor's binary to use. This binary wil be executed on the machine named hostname.
  • output_buffer_name - Defines the name of an actor's output.
  • size - Defines the size of buffer. This size is exprimed in bytes.
    This balise needs an argument output_buffer to define the buffer impacted.
  • port - Defines the protocol used for this output. The authorized protocols are : fifo or any network interface.
    This balise needs an argument output_buffer to define the buffer impacted.
  • argument - Describes argument accessible. XAVIER .....
  • log_level - Defines the log level used by log4ada. The level can be : debug, info, warn, error.
  • data_source - Defines the name of the actor sending data to this actor. This balise needs two parameters : name of the source buffer et type port used.
    The source buffer is defined by the parameter source_buffer and must is the same name than the name of the output buffer connected to.
    The type of port can be fifo or any network interface and must correspond to the port used by the output buffer.

Construction of complex balises

The following table will describe the association between high and low level balise.

producer intermediary consumer standalone
name X X X X
hostname X X X X
binary_code X X X X
output_buffer_name X X
size X X
port X X
argument x x x x
log_level x x x x
data_source X X
debug

X : mandatory balise
x : optional balise

Example

<xml version="1.0"?>
<configuration name="agata">
  <producer output_buffers="1">
    <name>data_1R</name>
    <hostname>narval15</hostname>
    <binary_code>generic_producer</binary_code>
    <output_buffer_name>data</output_buffer_name>
    <size output_buffer="data">20000000</size>
    <port output_buffer="data">eth1</port>
    <log_level>Off</log_level>
  </producer>
  <intermediary input_buffers="1" output_buffers="1">
    <name>prepro_1R</name>
    <hostname>narval15</hostname>
    <binary_code>generic_filter</binary_code>
    <data_source source_port="eth1" source_buffer="data">data_1R</data_source>
    <output_buffer_name>prepro_data</output_buffer_name>
    <size output_buffer="prepro_data">20000000</size>
    <port output_buffer="prepro_data">eth1</port>
    <log_level>Off</log_level>
  </intermediary>
  <intermediary input_buffers="1" output_buffers="1">
    <name>psa_1R</name>
    <hostname>narval15</hostname>
    <binary_code>generic_filter</binary_code>
    <data_source source_port="eth1" source_buffer="prepro_data">prepro_1R</data_source>
    <output_buffer_name>psa_data</output_buffer_name>
    <size output_buffer="psa_data">1000000</size>
    <port output_buffer="psa_data">eth1</port>
    <log_level>Off</log_level>
  </intermediary>
  <consumer input_buffers="1">
    <name>last_actor</name>
    <hostname>narval15</hostname>
    <binary_code>data_rate_consumer</binary_code>
    <data_source source_port="eth1" source_buffer="psa_data">psa_1R</data_source>
    <log_level>Off</log_level>
  </consumer>
 </configuration>

File location

This file location is set by the environment variable NARVAL_CONF which should be set during installation step.

In most case, this environment variable points on ~/nrv_conf.

NARVAL system configuration : narval.conf

This file is used by polyorb to ease configuration and is the only configuration file needed to setup the NARVAL environment. Topology file is only needed to describe the structure of dedicated system.

This file describes the URI of the polyorb name service and should look like something like this :
[dsa]
name_service=corbaloc:iiop:1.2@192.168.0.55:56707/NameService/000000024fF0000000080000000

Polyorb is the protocol used by GNAT (GNU Ada Compiler) to implement Annex E.
PolyORB aims at providing a uniform solution to build distributed applications; relying either on industrial-strength middleware standards such as CORBA, the Distributed System Annex of Ada 95, distribution programming paradigms such as Web Services, Message Oriented Middleware (MOM), or to implement application-specific middleware.

Basically, middleware are framework that hide the complex issues of distribution and provide the programmer with high-level abstractions that enable easy and transparent construction of distributed applications.

File location

This file location is set by the environment variable POLYORB_CONF which should be set during installation step.

In most case, this environment variable points on the user's home directory.

Cookbook

To automatically fill this file you can use the following command line :

po_cos_naming --polyorb-iiop-polyorb-protocols-iiop-default_port=2809 \
| grep corbaloc | sed -e 's/POLYORB_CORBA_NAME_SERVICE/[dsa]\nname_service/' \
> ~/narval.conf & sleep 1 && killall -9 po_cos_naming