-
Notifications
You must be signed in to change notification settings - Fork 878
C Media Driver Operation
This section assumes familiarity with Aeron Terminology and Media Driver Operation.
The C media driver behaves almost exactly how the Java media driver operates. The threading models are the same, except where noted here. The architecture is directly analogous.
A typical media driver has 3 threads, i.e. the conductor, sender, and receiver threads. Alternatively, a shared thread is run from the main process thread.
All configuration for the C media driver can be done via environment variables. The variables are directly related to the Java properties for the Java media driver. The environment variables simply have '_' in the place of ".". For example, setting the environment variable AERON_TERM_BUFFER_LENGTH
is equivalent to setting aeron.term.buffer.length
in the Java media driver.
Alternatively, the properties files can be used like the Java driver. File names passed as command line arguments with the option of fetching the files over HTTP.
For convenience the JVM system properties format is supported using the -D
prefix as follows:
$ aeronmd -Daeron.print.configuration=true
This will print the configuration used on start to stdout.
The driver can be started simply by executing aeronmd
.
$ aeronmd
The driver can be stopped gracefully via Ctrl-c
or SIGINT
just like the Java media driver.
The C media driver may be embedded quite easily. An example is the driver main itself, aeronmd.c, and the API is documented in aeronmd.h.