This primer is meant to be a brief introduction to
the configuration approach of otsdaq.
Introducing Configuration Groups
Configuring otsdaq revolves around setting up your
Configuration Groups.
Now you are probably wondering, "What are Configuration Groups?"
Well... here is a crash course.
In otsdaq, Configuration Groups
are
groups of Configuration Tables.
And, Configuration Tables, are your standard
row and column matrix of data.
Each Configuration Table has column names (with column data types),
and rows of data each identifed by a unique row ID; each table is identified by a table name
and a version number.
Each Configuration Group has a list of member tables, and is identified by a
group name and a key number (Note: a "key" number is essentially
a "version" number, but
in otsdaq parlance tables have "versions" and groups have "keys").
All of otsdaq configuration data is represented in
Configuration Tables at the lowest level.
We think the notable merits of using tables at the lowest level
are as follows:
Simplicity - tables are familiar and simple.
Flexibility - data in table format can be stored in any type of
database (we think).
So the users of otsdaq have options as they scale up to experiment-sized
DAQ systems (...and may be forced to be compatible with one database or another).
Database types include
Relational Databases
(that use strict table
schema)
and
Document-oriented Databases
(that may store
Semi-structured data
in a flexible schema).
In fact the default configuration database interface of otsdaq
is
artdaqdatabase which is a Document-oriented database interface
to a filesystem (or could also be setup to interface to
mongodb).
The Configuration Tree
There is one slight twist that otsdaq adds to the common table:
each table can link to one, or many, other tables. This twist creates (almost) ALL the
flexibility! With links between tables the configuration can be thought of as a
Configuration Tree! The Configuration Tree perspective
may remind some people of
XML,
JSON, or
FHiCL (fcl).
We think the notable merits of constructing a tree from linked tables
are as follows:
Flexibility - the user can build very complex tree structures (e.g. circular linking),
and it does not require the replication of data to reference the same data in multiple places
in the configuration (replication is prone to error).
Rigidity - since the tree view is built from strict rules, consistency checks such
as for broken links, or for data not matching column types, are easy to do and feedback to
the user.
You read that right, the otsdaq configuration approach is both flexible and rigid!
Then There Were Three
There is a second slight twist! This second twist adds the rest of the flexibility!!
In otsdaq the tables can be grouped to form a tree. But that's not all!
The full and complete configuration is comprised of three (3) Configuration Groups:
the Context Group
Tables that define the context in which your
daq system lives, e.g. icons on your desktop, where
applications should run, etc.. Context groups should be created and
activated before starting otsdaq in normal mode.
the Backbone Group
Tables that define aliases for tables and groups. Backbone groups should be created and
activated before Configuring the State Machine.
the Configuration Group
Tables that define everything else. Configuration groups should be created
before Configuring the State Machine. When the State Machine is successfully Configured,
the full Configuration Tree is active.
We think the notable merits of constructing the complete configuration from
three groups of tables are as follows:
Flexibility - since the groups can be activated at different times,
they can be mixed and matched to complete the desired tree at the desired
time.
Version Management - since the groups are independent, changing one group
type
does not require new key/version numbers for the other two group types.
Configuration Flexibility
In conclusion,
you should note that our 'notable merits' in each instance included the merit
Flexibility.
We built otsdaq from the ground up with a constant focus on Flexibility!