MDA(8)

NAME
mda - Millistream Database Application

SYNOPSIS
mda [option]...

DESCRIPTION
The Millistream Database Application (mda) connects to a Millistream distribution node via the Millistream Data Feed (mdf), requests and subscribes to realtime and/or delayed financial data, creates SQL statements based on the definitions of the tabledef file and executes them on the SQL server specificed in the configuration.

The configuration and tabledef files are only read at startup so any changes to either of those will not take effect until the application is restarted.

mda operates four queues, each having a separate connection with the SQL server executing on separate threads. The tables handled by each queue are:

    Queue #1
        quotes, quotesex, performance, keyratios, noii and greeks

    Queue #2
        trades, news, newscoding, newstags and stats

    Queue #3
        pricehistory, adjustedpricehistory, corporateactions, instruments, l10n, listmappings, constituents, ticksize, fundamentals, estimates, estimateshistory, brokers, ci, cihistory, priip, mifid, mifidhistory, eet and sectors

    Queue #4
        orderbooks and mbo (if orderbooks and mbo are disabled then this queue handles news, newscoding and newstags instead)

Every 5 seconds, statistics are written to the 'stats' table, for more detailed information (and realtime values) execute mda with the --status option.

OPTIONS

--daemon
    Causes mda to run in daemon mode. mda backgrounds itself and redirects stdin, stdout and stderr to /dev/null.

--console
    Causes mda to run in console. I.e the opposite of --daemon.

--silent
    Causes mda to redirect stdin, stdout and stderr to /dev/null.

--status
    Write various internal status variables and statistics to stdout and quit.

--check
    Connect with the SQL server and check if all tables and columns defined in the tabledef (/etc/mda.tabledef) are present on the server. This is also performed upon normal execution of mda unless the database check have been disabled in /etc/mda.config by 'checkdatabase 0' under DATABASE.

--check-types
    Behaves like --check but will also check that the data types of the columns matches those defined in the tabledef (/etc/mda.tabledef).

--upgrade-db
    Execute 'ALTER TABLE' statements on the SQL server in order to try and fix missing columns and/or wrong data types. Do note that missing tables cannot be fixed by the current version of mda, to add those you have to execute one of the supplied SQL scripts from /usr/share/doc/mda/. Used together with --check or --check-types.

--config conffile
    Specify the name and path of the configuration file, default is to first look for mda.config in the current path and then for /etc/mda.config.

--import dumpfile
    Specify the name and path of a file to read SQL statements from. This can be used in order to execute the SQL dumps created by Millistream using mysqldump on other SQL servers than MySQL/MariaDB. mda supports Gzipped files (.gz) and if dumpfile is '-' then mda will read the SQL statements from stdin.

--dbsuser username
    Use username instead of the username from the config when authenticating with the SQL server (the password will be prompted for). Main use case is for executing --upgrade-db. Following a secure setup the SQL account used in the config should not have grants for altering tables/columns and therefore a SQL account with appropriate permissions are needed when executing 'ALTER TABLE' statements.

--map-name filename
    Specify the name of the memory mapped file used to store the statistics data, default is '/millistream-mda-map' on Linux and 'Global\Millistream Database Application Perfcounters' on Windows. This must be used if you are running more than one instance of MDA on the same server since they will overwrite the data otherwise, leading to internal problems in the MDA itself.

FILES

/etc/mda.config
    default name of the configuration file

/etc/mda.tabledef
    default name of the tabledef file

/usr/share/doc/mda/
    SQL scripts to create the database are stored in this directory

AUTHOR

Millistream Market Data AB (https://millistream.com)

SEE ALSO
mda.config(5),