Configuring adspop docker to connect to Real-Time Optimized

Author:

Jirapongse Phuriphanvichai
Developer Advocate Developer Advocate

Last Updated: July 2024
 

Real-Time Distribution System (RTDS) is a networked data distribution architecture for the financial marketplace that enables customers to integrate data from any source including Real-Time Network, Direct feeds from exchanges, and third-party feeds from a wide range of feed handlers. RTDS is a product family which offers various features and products. Customers can choose and configure the functions they need.  Major RTDS products consist of:

1.      Real-Time Advanced Distribution Hub (ADH)

The ADH is an RTDS infrastructure component that connects to the data feeds and distribute the data items to the RTDS

2.      Real-Time Advanced Distribution Server (ADS)

The ADS delivers data made available from ADH and provides a consolidated point-to-point distribution solution for trading room systems

3.      Real-Time Data Access Control System (DACS)

DACS is a value-added feature of the Real-Time Distribution System (RTDS) that provides client administrators with the ability to manage their exchange fee liabilities and information charges.

Currently, the Real-Time Distribution System docker images are available on the docker hub (https://hub.docker.com/u/lsegrealtime). For supported environments, please directly contact the Real-Time Distribution System support team via MyAccount

ADS/POP (adspop) is a cascading mode in ADS that creates a point-of-presence device that sources data from an upstream ADS instance, or data feed, and delivers data to the connected clients.

This article explains step by step how to run and configure the adspop docker container on Windows 10 to source data from the Real-Time Optimized.  

Prerequisites

To follow the steps in this article, you must have the following items ready on the machine.

1.      The docker engine must be installed properly on the machine. For Windows 10, please refer to this Install Docker Desktop on Windows page

2.      The ADS pop configuration file (ads_pop.cnf). You can get this file from the ADS installation package

3.      The license file for ADS. It looks like the following:

    	
            

{

LICENSEID = xxx

KEY = <license key>

LICENSEE = …

NODEID = <host name>

EXPIRATION = <Date>

LICENSETYPE = <Type>

PRODUCT = ADS

VERSION = 3.x

FEATURE_14_CONFLATION = ENABLED

}

To generate a license, node information may be required. There is a shell script (docker_container_nodeid.sh) available in the ADS installation package. This script can be used to generate node information of the docker container.

    	
            Usage: ./docker_container_nodeid.sh container_name [ container_ip_address | --mac container_mac_address ]
        
        
    

It requires the container’s hostname, and the container’s IP address or the container’s MAC address to generate the node information.

    	
            

-------------------------

bash-4.2$ ./docker_container_nodeid.sh adspop --mac 12:34:de:b0:6b:61

-------------------------

Node Information

-------------------------

Container HostID: xxx

Container Hostname: adspop

Container OS: x86_64

Container NodeID: xxx adspop x86_64

    	
            

bash-4.2$ ./docker_container_nodeid.sh adspop 172.17.0.2

-------------------------

Node Information

-------------------------

Container HostID: xxx

Container Hostname: adspop

Container OS: x86_64

Container NodeID: xxx adspop x86_64

-------------------------

This node information can be sent to LSEG’s sales or account team to generate a license for ADS.

4.      The machine ID and password are required to connect to the Real-Time Optimized with V1 authentication and the client ID and client secret are required to connecto the Real-Time Optimized with V2 authentiction.. The V1 password or V2 client secret must be obfuscated by using the dacsObfuscatePassword tool available in the ADS installation package. It is in the <ads>\<platform>\demo directory 

    	
            dacsObfuscatePassword -e '<password or client secret>'
        
        
    

Configure and run the adspop docker container to connect to the  Real-Time Optimized

1.      Pulling the lsegrealtime/adspop docker image

If the lsegrealtime/adspop docker image is not available on the machine, the following command can be used to pull the lsegrealtime/adspop docker image.

    	
            docker pull lsegrealtime/adspop:3.8.0.L1
        
        
    

After downloading, the docker images command can be used to list all docker images available on the machine.

The tag represents the version of ADS. You can pull any version of ADS.

2.      Preparing directories for config, log, and debug files

 

The lsegrealtime/adspop docker container use docker volumes for maintaining the ADS configuration file, license file, and log file. Therefore, the following directories should be created on the host machine to maintain those files.

·        c:\adspop\config

·        c:\adspop\log

·        c:\adspop\debug

Then copy the ads_pop.cnf and license (LICENSE) files to the c:\adspop\config directory.

Please make sure that you have read and write permissions for those directories.

3.      Modifying the ads_pop.cnf

Next, we will modify the ads_pop.cnf file to match our running environment and connect to the Real-Time Optimized.

3.1   Specify the location of the license file to /opt/distribution/config/LICENSE

    	
            *ads*licenseFile : /opt/distribution/config/LICENSE
        
        
    

3.2 Set the routeList configuration to cloud so it will connect to the Real-Time Optimized.

    	
            *ads*routeList : cloud
        
        
    

3.3   Set the machine ID and obfuscated password of the cloud route

To connect to Real-Time Optimized with V1 authentication, please set the following configurations.

    	
            

*ads*cloud.route*userName : <machine ID>

*ads*cloud.route*userPassword : <obfuscated password>

To connect to Real-Time Optimized with V2 authentication, please set the following configurations.

    	
            

*ads*cloud.route*authenticationMethod : oAuthClientCred

*ads*cloud.route*userName : <client id>

*ads*cloud.route*userPassword : <obfuscated client secret>

You may change the location of the connected Real-Time Optimized servers by changing the *ads*cloud.route*location configuration.

    	
            *ads*cloud.route*location : us-east
        
        
    

The valid values are:

    	
            

!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

!

! *ads*${route}.route*location : us-east

!#help

!   location:

!

!   This parameter specifies the location used for service discovery endpoint selection.

!

!   Standard Locations (multiple availability zones)

!      us-east

!      eu-west

!      ap-southeast

!

!   Premium Locations (single availability zone)

!      us-east-1a

!      us-east-1b

!      eu-west-1a

!      eu-west-1b

!      ap-southeast-1a

!      ap-southeast-1b

!

!   Default value: us-east

!#end

!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

3.4  Change the location of RDMFieldDictionary and enumtype .def files

    	
            

!!! Field dictionary and enumerated types definitions

*fieldDictionary : /opt/distribution/etc/RDMFieldDictionary

*enumFile : /opt/distribution/etc/enumtype.def

3.5 Change the location of the ADS log file to /opt/distribution/log/ads.log

    	
            *ads*logger*file : /opt/distribution/log/ads.log
        
        
    

4.  Running the container

To run the adspop container, we need to map the following container’s directories to the host’s directories.

Container’s directory

Host’s directory

/opt/distribution/config

C:\adspop\config

/opt/distribution/debug

C:\adspop\debug

/opt/distribution/log

C:\adspop\log

The following command can be used to run the container.

    	
            docker run -it --name adspop -v c:\adspop\config:/opt/distribution/config -v c:\adspop\debug:/opt/distribution/debug -v c:\adspop\log:/opt/distribution/log -p 14002:14002 -p 15000:15000 lsegrealtime/adspop:3.8.0.L1
        
        
    

If it failed to start, please check the ads.log file in the C:\adspop\log directory.

If the container’s hostname and MAC address must be specified to match the generated license, the following command can be used to specify the hostname (-h) and MAC address (--mac-address) of the container.

    	
            docker run -it --name adspop -h adspop  -v c:\adspop\config:/opt/distribution/config -v c:\adspop\debug:/opt/distribution/debug -v c:\adspop\log:/opt/distribution/log -p 14002:14002 -p 15000:15000 --mac-address 12:34:de:b0:6b:61 lsegrealtime/adspop:3.8.0.L1
        
        
    

Test the connection

The adspop supports both RSSL and WebSocket connections so we can use both Real-Time SDKs (C/C++ and Java) and WebSocket API to connect to the adspop.

For Real-Time SDKs to connect to the adspop, modify the application code or the configurations to connect to 127.0.0.1:14002 and subscribe to ELEKTRON_DD service.

For WebSocket API to connect to the adspop, modify the application code or the configurations to connect to 127.0.0.1:15000 and subscribe to ELEKTRON_DD service.

References

1.      Hub.docker.com. 2021. Docker Hub. [online] Available at: <https://hub.docker.com/u/lsegrealtime> [Accessed 9 April 2021].

2.      Docker Documentation. 2021. docker run. [online] Available at: <https://docs.docker.com/engine/reference/commandline/run/> [Accessed 9 April 2021].

3.      Developers.lseg.com. 2024. Real-Time C++ SDK | LSEG Developers. [online] Available at: <https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-cc> [Accessed 9 April 2021].

4.      Developers.lseg.com. 2024 Real-Time Java SDK | LSEG Developers. [online] Available at: <https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java> [Accessed 9 April 2021].

5.      Developers.lseg.com. 2024. Real-Time WebSocket API | LSEG Developers. [online] Available at: <https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api> [Accessed 9 April 2021].