Session Layer Guide
Last Update Nov 2019
Prerequisites Refinitiv Data Platform Libraries - An Introduction

Table of Contents

Overview

The Core library components outlined within the Refinitiv Data Platform Libraries - An introduction are responsible for defining interfaces to authenticate and manage communication to the platform. Referred to as the Session interfaces, developers choose how they wish to access the platform in order to retrieve content available within supported services. These Access Channels are available from either the Eikon desktop, via the enterprise through your Elektron/TREP deployments or directly to the Refinitiv Data Platfrom within the cloud. 

The following guide will be used to describe each session implementation, the properties and interface required to access, and examples for each language-set. The details outlined here will be used as a general reference guide for all learning material defined as part of the RDP Libraries.

The Session Layer

The RDP Libraries support the ability to access content through multiple channels or sessions.  Because each session is accessing the platform differently, channel-specific properties and credentials are required. The defined Access Channel session interfaces are:

  • DesktopSession - Access to data services via the Eikon desktop.  Supported services:
    • Streaming (realtime market data)
    • Requests (Endpoint data services supported by RDP)
  • PlatformSession - Access directly into the RDP/ERT in Cloud.  Supported services:
    • Streaming (realtime market data)
    • Requests (Endpoint data services supported by RDP)
    • Queues (News and Research alerts)
    • Files (Bulk data)
  • DeployedPlatformSession - Access to your enterprise deployed data services via an ADS - Advanced Distribution Server.  Supported services:
    • Streaming (realtime market data)

Each session defines 2 common specifications:

  • onState()

    Callback/Lambda expression to capture the different state changes throughout the life of a session. The state of a session is either Closed, Pending or Opened. This callback will carry an enumerated value indicating state.

  • onEvent()

    Callback/Lambda expression to capture the different events during the life of a session. Depending on the type of session, different events can occur such as Authentication Succeeded/Failed or Connection up/down. This callback will carry an enumerated value indicating the type of event.

To initiate communication, the session.open() method will execute session-specific connections.

Below defines the different sessions and their properties used to access the platform.

DesktopSession - Eikon

The Desktop Session communicates with a local proxy (Eikon API Proxy) service when accessing both streaming and non-streaming services.  The API proxy manages the underlying authentication / connection management to backend services and is automatically started when the desktop (Eikon) application is launched.  During startup, Eikon determines the first available port, typically starting at 9000 to listen for incoming client connections.  Eikon is responsible for determining the listening port and reports this entry within the .portInUse text file used by the Elektron API Library.  Users that are authenticated with Eikon will require an AppKey when acquiring a session: 

Note: If for some reason the RDP Library cannot identify the API Proxy port, the DesktopSession does support an optional specification (port). 

A desktop session supports both realtime streaming and non-streaming (data endpoint) services.  The following code segements provide examples for the different languages to create a session to access content within an Eikon desktop.  The desktop session interface requires the specification of an application key, or AppKey, used by the platform to monitor specific application activity and usage.

Python:

.NET/C#

PlatformSession - Refinitiv Data Platfrom/ERT in Cloud

The Platform Session uses a well-defined URL as the connection point into RDP/ERT in Cloud data services. RDP uses the OAuth 2.0 specification to authenticate users to access content. To support this requirement, The following grant type is available when granting access when defining a Platform Session:

  • Password

    The Password grant type is used by clients to exchange a user's credentials to retrieve an access token required by RDP. The username and password properties must be provided to authenticate the user.  Note: Access tokens are managed and used by the underlying session.

In addition, the specification requires an application key, or AppKey, used to identify the application.

When issuing a call to open a platform session, an attempt is made to connect into RDP to authenticate the user. An Opened state reported within onState() will indicate success, otherwise a Closed state will be sent along with an event reported within the onEvent() callback.

The interface supports the optional specifications:

  • withTakeSignonControl - force sign-out for this user from other applications in order to sign-in here. Default: false.
  • DACS (Data Access Control System) - ERT in Cloud may further enforce user credentials to access realtime market data
    • withDacsUserName - DACS user name.  Default: desktop login.
    • withDacsApplicationID - DACS application ID. Default: "256".
    • withDacsPosition - DACS position (client machine). Default: "localhost".

A platform session supports many data services such as realtime streaming, HTTP requests, Alerts via queues and bulk files.

Python

.NET/C#

DeployedPlatfromSession - Elektron

The Deployed Platform Session uses a host specification to connect into an ADS - (Advanced Distribution Server) service along with optional DACs authentication properties required to entitle users for data access.

The Host syntax uses a server:port specification, eg: "ewa:15000".

The interface supports the optional specifications:

  • DACS (Data Access Control System) - ERT in Cloud may further enforce user credentials to access realtime market data
    • withDacsUserName - DACS user name.  Default: desktop login.
    • withDacsApplicationID - DACS application ID. Default: "256".
    • withDacsPosition - DACS position (client machine). Default: "localhost".

When issuing a call to open a deployed platform session, a WebSocket connection is formed and a request to login using DACs properties is automatically submitted to the server. An Opened state reported within onState() will indicate success, otherwise a Closed state will be sent along with an event reported within the onEvent() callback.

A deployed platform session supports realtime streaming data services only.

Python

.NET/C#