EMA NI Provider - Introduction

Download tutorial source code

Click here to download

Last update Dec 2020
Compilers

Visual Studio 2015
For other compilers settings, please check out the EMA C++ Compiler Settings tutorial.

Introduction

The Enterprise Message API (EMA) is an ease-of-use API that can be used to build applications for publishing and consuming financial data over LSEG Real-Time Distribution Systems. This tutorial series explains how to leverage EMA to write a Provider application that publishes financial data using the Market-price Data Model (RDM). More specifically, it focuses on building Non-Interactive Provider applications also known as NIP.

Provider and Consumer applications on a LSEG Real-Time Distribution System

Non-Interactive Provider vs Interactive Provider

If your goal is to expose a specific data service to consumer applications, you may consider building a Provider application. Provider applications are able to connect to a LSEG Real-Time Distribution System and to leverage its real-time and streaming distribution system to publish data. This is an efficient solution to make your own set of capabilities (e.g. content, workflow, etc.) available to your consumer applications (read more about Providers in the API Concept Guide).

Provider applications can be either interactive or non-interactive. Basically:

  • Interactive Providers (IP) receive requests from the infrastructure and must respond interactively to these requests. Via these requests, the infrastructure may ask for information about the provided services and capabilities of the provider. The infrastructure also forwards consumer requests demanding for specific data items. For all these requests, the Interactive Provider must respond interactively by either providing the requested information or by rejecting the demand. 
  • Non-Interactive Providers (NIP) are not solicited by infrastructure requests but instead, they publish information (e.g. Available services, data items…) following their own timing. In this model, the infrastructure caches the published information and serves it to the demanding consumer applications.  

About this tutorials series

This tutorial series guides you through the construction of a Non-Interactive Provider (NIP) for publishing Market Price streaming information and Order Books over a LSEG Real-Time Distribution System. By following this series you’ll learn how to build a simple, but yet complete, Non-Interactive Provider application that implements all the features required to run in a production environment. This includes:

  • Establishing network communication with the infrastructure and logging in.
  • Listening to the connection and login status.
  • Providing Source Directory information.
  • Providing data items content.
  • Logging out and shutting down.

The implementation of the Non-Interactive Provider is presented as a series of tutorials starting with a barebones EMA application and finishing with the completed example. Each tutorial is presented as a separate compilable project and builds on the code of the previous tutorial. For each project, you will find explanations about the goal of that particular step of the tutorial series as well as a discussion on the implementation. It also includes references to pertinent sections of the documentation that is shipped with the development kit, where more information about a particular topic can be found.

The Non-Interactive Provider tutorials series includes the following tutorials:

  1. A barebones EMA NIP application shell

    The goal of this tutorial is to set up your development environment, describe the layout of the barebones EMA NIP application, and make sure you can successfully build and run it.
  2. Connecting to the ADH

    In this tutorial, you will learn how to use EMA to connect to a LSEG Real-Time Distribution System – ADH (Advanced Data Hub) and how to disconnect. You will also learn about the multiple actions EMA executes under the hood to simplify the programmers’ life.
  3. Listening to the connection state

    This tutorial explains how to leverage EMA to receive connection and login statuses in your NI Provider application.
  4. Introducing the EMA configuration file

    In this tutorial, you will learn how to leverage the EMA configuration file to store the ADH connection parameters.
  5. Publishing our first Market Price

    In this tutorial, you will learn how to use the EMA library to encode and publish a refresh message for a MarketPrice data item.
  6. Publishing a Source Directory

    The aim of this tutorial is to explain the concepts related to providers’ source directories and to teach you how to use EMA to publish this information.
  7. Publishing updates

    This tutorial explains how to update a MarketPrice data item after you sent the initial refresh message.
  8. Publishing item statuses 

    In this tutorial, you will learn how to send status messages to indicate a change in the state of a data item published by your provider.
  9. Efficiently publishing multiple data items

    In this tutorial, you will learn how to efficiently use EMA to publish refresh and update messages for a number of data items.

About the 100 to 300 examples

If you are in a hurry and cannot wait before publishing your first market data, the 100 to 300 examples series provided with the SDK package is an alternative to this tutorial series. These applications present simple usage of the EMA, exposing its various features and showcasing various levels of application simplicity and functionality. However, as these features are demonstrated in separate examples, they may not be easy to follow for someone who does not have prior knowledge of how Provider applications work. If that is your case, or if your goal is to acquire a good understanding of the complete NIP workflow, we recommend you to follow this series of tutorials.  

Before you start

Before a NI Provider application can actually connect and publish data on a LSEG Real-Time Distribution System, it must be declared in the configuration files of the platform. This configuration phase must be executed by your administration team. For information, the LSEG Real-Time Distribution System Configuration for NI Providers tutorial explains the different steps involved in this process. 

For the purpose of the Non-Interactive Provider tutorials series, your administration team will have to configure two NI Providers services: NI_PUB and TEST_NI_PUB. The complete series of steps described in the LSEG Real-Time Distribution System Configuration for NI Providers tutorial must be executed twice: once for the NI_PUB service and once for the TEST_NI_PUB service.

References

To learn more about EMA please refer to the EMA C++ RDM Usage Guide, the EMA C++ Developers Guide, and the EMA C++ Configuration Guide.