Connectivity Problem using LSEG.Data from C# to LSEG Workspace Desktop

Options
tony10
tony10 Newcomer
edited June 26 in Workspace SDK

We have a C# application that is using the LSEG.Data and LSED.DataContent (version 2.0.0.0, image version v4.0.30319) libraries. We have two problems at the moment: 1. Cannot connect to the LSEG Workspace Desktop, and 2. Error starting the LSEG Workspace Desktop if it is not running.

  1. LSEG.Data.Core.ISession session = DesktopSession.Definition().GetSession();

By examining the RDPLog_<n>.log file/s we can see that sometimes there is connection:

Host: localhost:9000/api/rdp/streaming/pricing/v1/WebSocket (Path: [])

and sometimes there is not:

Host: localhost:/api/rdp/streaming/pricing/v1/WebSocket (Path: [])

Can anyone explain why the port 9000 is sometimes missing when the URL is constructed?

2. When our application determines that the LSEG Workspace Desktop (LWD) application is not running, it attempts to start the LWD using System.Diagnostics.Process.Start(…). Using this method, the following "unexpected error" pops up:

image.png

Can anyone advise how to prevent this pop-up?

Thanks

Tony

—-oooOOOooo—-

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @tony10

    Thank you for reaching out to us.

    Ensure that the LSEG Workspace desktop application is running properly before using the LSEG Data Library.

    It may not be recommended to start the LSEG Workspace programmatically, as the application is designed primarily for desktop users rather than automated processes. Instead, consider connecting directly to the LSEG Data Platform.

    However, I can start the LSEG Workspace by using the following code.

    var path = Environment.GetEnvironmentVariable("LOCALAPPDATA");
    var proc = Process.Start(path+"\\Refinitiv\\Refinitiv Workspace\\RefinitivWorkspace.exe");
  • tony10
    tony10 Newcomer

    Thank you for that answer. but:

    1. Although the LSEG Workspace Desktop launches into the login/startup screen, even with your solution, we still get the "unexpected error" popup with the message "..broken pipe..". Do you not think that this type of error should be handled internally by the LSEG Workspace Desktop application itself?
    2. Even if the application is designed primarily for desktop users, it still has to operate as a servant to other applications, otherwise why was the Desktop API created?
    3. Most of our use for the Desktop is for backup and testing purposes.
    4. Furthermore, the Desktop does an automatic logout once a week (Sunday?) and if we have an application connected, we need to do auto-restart (e.g. kill process, start process), which makes it impossible to have an un-attended backup system.
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Yes, please contact the Workspace support team via the LSEG Support to investigate this issue.

  • tony10
    tony10 Newcomer

    Interesting response considering they keep bouncing these queries back to the Developer Community.

    In the examples supplied, there are references to the LSEG Workspace Desktop, Advanced Distribution Server (ADS) via a local TREP, Refinitiv Data Platform (RDS), and Configuration-based iSession. In our application, both of the first two options work fine.

    Can you clarify precisely the connectivity route to the LSEG Data Platform?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @tony10

    The LSEG Data Platform, also known as the Refinitiv Data Platform, is a cloud-based service accessible at https://api.refinitiv.com. The library can also connect to this platform.

    image.png

    For more information, please refer to this page.

  • tony10
    tony10 Newcomer

    Thank you for that clarification. This leads to another question: why cannot the Client application connect directly with the REST interface with the LSEG Data Platform? Doesn't the various Access Points add not only complexity, but overhead?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    The Desktop session is typically for desktop users (LSEG Workspace Users) who would like to access data via the API. It requires users to run the Workspace application on the same machine to access data because the library retrieves data through the Workspace application.

    The Platform.ldp session is for users who don't use the Workspace application. The library can access data directly from the LSEG Data Platform on Cloud.

    The real-time access point is for users who have RTDS. The library can connect to RTDS to get real-time streaming data.

    Yes, if the client has LSEG Data Platform's credentials, the client can directly use the REST API to retrieve data from the LSEG Data Platform. You can access the API Docs to check all available endpoints.

  • Hello @tony10

    About the LSEG Delivery Platform (aka Data Platform), it is a set of HTTP REST API that you can use any programming languages (that support HTTP and JSON) to connect to the platform. An application needs to manage connection, session, and authentication token by itself.

    However, the Workspace platform does not expose the API interfaces. Developers can access data via the Data Library only.

    The Data Library (Python, C#, and TypeScript) is the ease-of-use library that build on top of the LSEG Workspace, Delivery, and Real-Time Platforms. It lets developers connect and consume data from the platforms without need to manage a connection, session, and authentication manually.