Aeron Media Driver
Overview
The Aeron Media Driver is a separate process that provides buffers of data for Aeron to process from various transmission media. It decouples the means of data transmission from protocol processing.
Microservices require the driver to operate with Aeron. The Aeron Media Driver is not deployed as a separate package. It is included as a part of each microservice that have to work with the Aeron. The Aeron Media Driver executable is located inside the StatServer Data Provider directory (microservices/StatServerDataProvider/aeron-driver/bin/) or inside the Formula Processor directory (microservices/FormulaProcessor/aeron-driver/bin/). Despite the fact that the driver is a part of each service, only one driver instance is required for each host.
The Aeron Media Driver is implemented in Java and requires Java version 1.8.0 or newer.
How to Run Aeron Media Driver
To run the Aeron Media Driver as a foreground process, use the script provided with the driver. The script uses the default configuration for the driver.
[+] 9.0.001+ release
Stating with the Aeron Media Driver, included in Genesys Pulse Collector 9.0.001 release, you can provide your own configuration parameters via the AERON_DRIVER_OPTS environment variable in the -Dparameter=value form.
Below is the list of parameters supported by the Aeron Media Driver:
- aeron.dir
- The path to the directory where the Aeron Media Driver needs to store its files. On Linux, the directory inside the /dev/shm/ is recommended. If you provide your own path, make it the same for the driver and any microservice that operates with this driver. If it is not specified, then the default value provided by the Aeron Media Driver is used.
- aeron.socket.so_sndbuf
- aeron.socket.so_rcvbuf
- The size, in bytes, of the send and receive socket buffers. The length of the buffer must be a power of two.
- On Linux, it must not exceed the kernel configuration parameters:
- net.core.wmem_max
- net.core.rmem_max
- aeron.term.buffer.length
- aeron.publication.term.window.length
- The size, in bytes, of the Term (a section of data within a stream) buffer. The length of the buffer must be a power of two and must be the same length on both ends.
- aeron.mtu.length
- The length of MTU, in bytes.
For example, to specify the directory to store
Aeron Media Driver files, set the
AERON_DRIVER_OPTS environment variable to
-Daeron.dir=path/to/directory.
[+] 9.0.000 release
You can provide your own configuration via environment variables:
- AERON_DIR
- The path to the directory where the Aeron Media Driver needs to store its files. On Linux, the directory inside /dev/shm/ is recommended. If you provide your own path, make it the same for the driver and any microservice that operates with this driver.
- If it is not specified then the default value provided by the Aeron is used.
- AERON_SO_BUFFER
- The size in bytes of the send and receive socket buffers. The length of the buffer must be a power of two. On Linux, it must not exceed the kernel configuration parameters:
- net.core.wmem_max
- net.core.rmem_max
- The default value is 4194304.
- AERON_TERM_BUFFER
- The size in bytes of the Term (a section of data within a stream) buffer. The length of the buffer must be a power of two and must be the same length on both ends.
- The default value is 67108864.
- AERON_MTU
- The length of MTU in bytes.
- The default value is 65504.
Run as a Service on Windows
To create a Windows service, perform the following steps:
[+] Steps for release 9.0.001+
- Type the following command in the Windows command prompt:
- path\to\reskit\INSTSRV.EXE service_name path\to\reskit\SRVANY.EXE
- where path\to\reskit is the drive and directory of the Windows Server Resource Kit (for example, C:\Program Files\Resource Kit) and service_name is the name of the service you are creating.
- You can download Windows Server Resource Kit on the Microsoft portal. Windows Server Resource Kit 2003 can be used on Windows Server 2012 and Windows Server 2016 to create Windows service for Genesys Pulse Microservices.
- Run Registry Editor and locate the following key:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service_name
- For details see Windows registry information for advanced users.
- Create a new subkey:
- Key Name: Parameters
- Select the Parameters subkey.
- Create the new value:
- Value Name: Application
- Data Type: REG_SZ
- Value: java.exe
- Create the new value:
- Value Name: AppParameters
- Data Type: REG_SZ
- Value: -Xmx700m -Daeron.threading.mode=SHARED_NETWORK -Dagrona.disable.bounds.checks=true -Daeron.dir=path\to\driver\data -classpath lib\aeron-driver-1.10.5.jar;lib\aeron-client-1.10.5.jar;lib\agrona-0.9.23.jar io.aeron.driver.MediaDriver
- where -Daeron.dir is an optional parameter used to specify a path to the folder for Aeron Media Driver files. If not specified, the System-specific directory is created, for example, C:\Windows\Temp\aeron-hostname.
Important
The Value length is limited to 260 symbols.
- Create the new value:
- Value Name: AppDirectory
- Data Type: REG_SZ
- Value: path\to\installation\aeron-driver
- Close Registry Editor.
You can use the NET command in the Windows command prompt to manage the service:
- NET START <service_name>
- NET STOP <service_name>
[+] Steps for release 9.0.000
- Type the following command in the Windows command prompt:
- path\to\reskit\INSTSRV.EXE service_name path\to\reskit\SRVANY.EXE
- where path\to\reskit is the drive and directory of the Windows Server Resource Kit (for example, C:\Program Files\Resource Kit) and service_name is the name of the service you are creating.
- You can download Windows Server Resource Kit on the Microsoft portal. Windows Server Resource Kit 2003 can be used on Windows Server 2012 and Windows Server 2016 to create Windows service for Genesys Pulse Microservices.
- Run Registry Editor and locate the following key:
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service_name
- For details see Windows registry information for advanced users.
- Create a new subkey:
- Key Name: Parameters
- Select the Parameters subkey.
- Create the new value:
- Value Name: Application
- Data Type: REG_SZ
- Value: java.exe -Xmx700m -XX:+UnlockDiagnosticVMOptions -XX:GuaranteedSafepointInterval=300000 -Daeron.threading.mode=SHARED_NETWORK -Dagrona.disable.bounds.checks=true -jar path\to\installation\aeron-driver.jar
- where -Daeron.dir is an optional parameter used to specify a path to the folder for Aeron Media Driver files. If not specified, the System-specific directory is created, for example, C:\Windows\Temp\aeron-hostname.
- Note, that the Value length is limited to 260 symbols.
- Create the new value:
- Value Name: AppDirectory
- Data Type: REG_SZ
- Value: path\to\installation
- Close Registry Editor.
You can use the NET command in the Windows command prompt to manage the service:
- NET START <service_name>
- NET STOP <service_name>
Run as a Service on Linux
Create a separate systemd service configuration file for the Aeron Media Driver service.
For example, create systemd service configuration file /etc/systemd/system/pulse-aeron-media-driver.service with the following content:
- 9.0.001+ release:
- [Unit]
- Description=Pulse Aeron Media Driver
- [Service]
- ExecStart=/path/to/installation/aeron-driver/bin/aeron-driver
- [Install]
- WantedBy=multi-user.target
- 9.0.000 release:
- [Unit]
- Description=Pulse Aeron Media Driver
- [Service]
- ExecStart=/path/to/installation/run-aeron-driver
- [Install]
- WantedBy=multi-user.target
You can use systemctl(1) to manage these services. Type man systemctl for more information.