Ariticle

Configuring the LPC Docker in Five Minutes

Author:

Jirapongse Phuriphanvichai
Developer Advocate Developer Advocate

Overview

The Refinitiv Real-Time Legacy Protocol Converter (LPC) provides network connectivity to Refinitiv data sources in Amazon Web Services (AWS) infrastructures for existing Refinitiv Wire Format and Marketfeed applications using a near zero footprint datafeed delivery method. It allows applications that use Refinitiv Real-Time SDKs, or legacy APIs, such as SFC, and RFA 7.x to consume real-time data from the Refinitiv data sources in Amazon Web Services (AWS) infrastructures without any modifications.

LPC can be run as a standalone application or run inside the docker container. This article explains the steps to configure and run LPC inside the docker container on Windows 10.

Prerequisites

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

  1. The credentials to connect to the Refinitiv Real-Time Optimized, such as machine ID and password
  2. The docker engine must be installed properly on the machine. For Windows 10, please refer to this Install Docker Desktop on Windows page

Configure and run an LPC docker container

1.      Pulling the lpcdocker/lpc docker image

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

    	
            docker pull lpcdocker/lpc:1.2.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 LPC. You can pull any versions of LPC. You can verify all available LPC versions in the docker hub.

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

The lpcdocker/lpc docker container use docker volumes for maintaining the LPC configuration, debug, and log files. Therefore, the following directories should be created on the host machine to maintain those files.

  • c:\lpc\config
  • c:\lpc\log
  • c:\lpc\debug

3.  Running the container

To run the lpc container, we need to map the /refinitiv_data directory in the container to the c:\lpc directory on the host machine. The -v option is used to map the directory.

The following command can be used to run the container.

    	
            docker run -it --name lpc -v c:\lpc:/refinitiv_data/ -p 8101:8101 -p 14002:14002 lpcdocker/lpc:1.2.0.L1
        
        
    

The -p options are used to map TCP/8101 and TCP/14002 ports of the container to the host machine.

If you run it for the first time or the c:\lpc\config directory is empty, the LPC contain will run the installation script to create LPC configuration files. The script will ask for the following information.

3.1 Credentials to connect to the Refinitiv Real-Time Optimized (RTO)

You need to add an application user name with the associated RTO credentials. The application user name will be used by the client applications to connect to the LPC.

3.2  AWS Service Region and Proxy Setting

Next, you need to select the closest AWS service region of the connected Refinitiv Real-Time Optimized and configure the proxy service if required. 

3.3   Connectivity and Dictionary Download

Then, you need to choose the connectivity that LPC will support. In this case, both SSL and RSSL connections are enabled on LPC. It also downloads the dictionary from the Refinitiv Real-Time Optimized.

Finally, LPC is properly configured and run. You can verify that the configuration files are created in the c:\lpc\config directory.

You can verify the lpc.log file created in the C:\lpc\log directory. If LPC is ready for connections, you will see the following logs.

    	
            

<lpc.snkRsslServer.14002: Info: Wed Jul 21  10:28:50.382853 2021>

Ready for RSSL user connections.

<END>

<55a360b294ad.1.lpc: Info: Wed Jul 21  10:28:50.383114 2021>

RSSL Server initialization succeeded.  Ready for RSSL connections.

<END>

<55a360b294ad.1.lpc: Info: Wed Jul 21  10:28:50.602081 2021>

Received Field Dictionary refresh message (Data Length: 639448).

<END>

<55a360b294ad.1.lpc: Info: Wed Jul 21  10:28:50.602760 2021>

Ready for SSL user connections.

<END>

<55a360b294ad.1.lpc: Info: Wed Jul 21  10:28:50.603053 2021>

SIPC Server initialization succeeded.  Ready for SSL connections.

<END>

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

Test the connection

The LPC supports both RSSL and SSL connections so we can use both Refinitiv Real-Time SDKs (C/C++ and Java), RFA 8.x, RFA 7.x, and SFC applications to connect to the LPC.

For Refinitiv Real-Time SDKs, RFA 8.x, and RFA 7.x (OMM interfaces) applications to connect to the LPC, modify the application code or the configurations to connect to 127.0.0.1:14002, and subscribe to ELEKTRON_DD service.

For RFA 7.x (Market Data Interfaces), and SFC applications to connect to the LPC, modify the application code or the configurations to connect to 127.0.0.1:8101 and subscribe to ELEKTRON_DD service.

Otherwise, you can run the refinitivapis/realtimesdk_c docker container to connect to the LPC. Run the following command to connect to the LPC docker container running on the same host machine.  The name of the LPC docker container is lpc. 

    	
            docker run -it --name realtimec --link lpc:lpc refinitivapis/realtimesdk_c ./Eta/Executables/OL7_64_GCC485/Optimized/Consumer -h lpc -p 14002 -s ELEKTRON_DD -mp /JPY= -uname developers
        
        
    

"developers" is an application user name configured in the LPC. It uses the --link option to link this realtimec container to the container named "lpc" and also set an alias to "lpc". After linking, the application in the container can use this alias to create a network connection to the linked Docker container.

The output is:

    	
            

PS C:\> docker run -it --name realtimec --link lpc:lpc refinitivapis/realtimesdk_c ./Eta/Executables/OL7_64_GCC485/Optimized/Consumer -h lpc -p 14002 -s ELEKTRON_DD -mp /JPY= -uname developers

Proxy host:

Proxy port:

Input arguments...

Using Connection Type = 0

srvrHostname: lpc

srvrPortNo: 14002

serviceName: ELEKTRON_DD

Unable to load field dictionary.  Will attempt to download from provider.

        Error Text: Can't open file: 'RDMFieldDictionary'.

Unable to load enum type dictionary.  Will attempt to download from provider.

        Error Text: Can't open file: 'enumtype.def'.

Attempting to connect to server lpc:14002...

Attempting to connect to server lpc:14002...

Channel IPC descriptor = 3

Channel 3 In Progress...

Channel 3 Is Active

Connected to lpc1.2.0.L1.linux.rrg 64-bit device.

Ping Timeout = 30

Received Login Response for Username:

        State: Open/Ok/None - text: "Login accepted by host ads-fanout-med-az1-apse1-prd."

        Authentication Time To Reissue: 1626864864

        Authentication Error Code: 0

Received Source Directory Response

        State: Open/Ok/None - text: ""

Received serviceName: ELEKTRON_DD

Received serviceName: PERM_SVR_SNKDRV

Received serviceName: ERT_FD3_LF1

Received Source Directory Update

Received Dictionary Response: RWFFld

        State: Non-streaming/Ok/None - text: ""

Field Dictionary complete, waiting for Enum Table...

Received Dictionary Response: RWFEnum

        State: Non-streaming/Ok/None - text: ""

Enumerated Types Dictionary complete.

Dictionary ready, requesting item...

/JPY=

DOMAIN: RSSL_DMT_MARKET_PRICE

State: Open/Ok/None - text: ""

        PROD_PERM           363

        RDNDISPLAY          153

        DSPLY_NAME          BARCLAYS     L/d

        TIMACT              10:34:00:000:000:000

        NETCHNG_1           0.25

        HIGH_1              110.17

        LOW_1               109.81

        CURRENCY            JPY(392)

        ACTIV_DATE          21 JUL 2021

        OPEN_PRC            109.83

        HST_CLOSE           109.84

        BID                 110.09

        BID_1               110.09

Access Bash Shell

When the container is running, the "docker exec" command can be used to access the bash shell of the running container.

    	
            docker exec -it <container id or container name> bash
        
        
    

Within the bash shell, the lpcmon can be run to display configuration and statistics information of the Refinitiv Real-Time Legacy Protocol Converter application.

You can also run the userListSetup.sh script to manage user credentials in the user_list.txt file

    	
            userListSetup.sh /refinitiv_data/config/user_list.txt /opt/lpc/lpc
        
        
    

Cleanup

The “docker stop <container name>” command can be used to stop the running container.

    	
            docker stop lpc
        
        
    

To start it, the “docker start <container name>” command can be used.

    	
            docker start -ai lpc
        
        
    

To remove the container, the “docker rm -f <container name>” command can be used.

    	
            docker rm -f lpc
        
        
    

After removing the container, the “docker run” command can be used again to run the container.

References

  1. Hub.docker.com. 2021. Docker Hub. [online] Available at: <https://hub.docker.com/r/lpcdocker/lpc> [Accessed 22 July 2021].
  2. Docker Documentation. 2021. docker run. [online] Available at: <https://docs.docker.com/engine/reference/commandline/run/> [Accessed 22 July 2021].
  3. 2021. Refinitiv Real-Time Legacy Protocol Converter Version 1.2 Installation Guide 1.2. [ebook] Refinitiv, pp.10-21. Available at: <https://my.refinitiv.com/> [Accessed 22 July 2021].
  4. Phuriphanvichai, J., 2017. Deploy and Run Refinitiv Real-Time SDK in Docker | Refinitiv Developers. [online] Developers.refinitiv.com. Available at: <https://developers.refinitiv.com/en/article-catalog/article/deploy-and-run-elektron-sdk-docker> [Accessed 22 July 2021].
  5. Phuriphanvichai, J., 2020. Introduction to the refinitivapis/realtimesdk_c Docker Image | Refinitiv Developers. [online] Developers.refinitiv.com. Available at: <https://developers.refinitiv.com/en/article-catalog/article/introduction-to-the-refinitivapis-elektronsdkc-docker-image> [Accessed 22 July 2021].