OnixS C++ CME Market Data Handler  5.7.0
API documentation
The Feed Engine Based On Solarflare ef_vi SDK

The default implementation of the Feed Engine is based on the standard socket API. However, various network card manufactures offer alternatives to the standard socket API to manipulate network data. For example, the Solarflare offers ef_vi SDK to send and receive multicast packets bypassing the kernel and avoiding copying data from internal buffers to user space. The Solarflare ef_vi SDK is designed for high-performance networking for trading applications.

Starting from version 5.1 of the SDK, the standard distribution includes an implementation of the Feed Engine concept based on the Solarflare ef_vi SDK. The functionality is encapsulated into the OnixS::CME::MDH::SolarflareFeedEngine class. The design of the class is similar to the OnixS::CME::MDH::SocketFeedEngine class. The only difference is the parameters affecting the behaviour of the new Feed Engine.

The Solarflare ef_vi SDK is available for Linux platforms only and supports solely Solarflare network cards. To simplify the development process for users, the CME Market Data Handler SDK exposes the OnixS::CME::MDH::SolarflareFeedEngine and related classes for all platforms. However, instance creation will fail at runtime on platforms where the corresponding functionality is not supported.

Configuring the New Feed Engine

The Solarflare ef_vi SDK uses the concept of virtual interfaces to receive network data. The CME Market Data Handler SDK follows this concept and exposes parameters related to the given entities. All parameters are gathered into the OnixS::CME::MDH::SolarflareFeedEngineSettings class:

The Sample Application

The SDK evaluation distribution includes fast-start reference implementation source code samples - including a Benchmarking sample. This sample has been updated to include the Feed Engine based on the Solarflare ef_vi SDK in the available predefined Feed Engine implementations. See the sample source code to get familiar with the concept and use of the feed engine implementation based on the Solarflare ef_vi SDK.

Mixed Mode Example

The 5.6 Release introduced the new mixed mode for the Solarflare Feed Engine which combines the ef_vi SDK with ordinary network sockets. The new mode lets to take advantage of using the ef_vi services on Solarflare network adapters and manages data reception on non-Solarflare network interfaces with the help of network sockets API.

The following code depicts how to establish data reception for the case, when incremental data comes via Solarflare network adapter (eth0) and recovery data is available on the non-Solarflare network interface (eth2).

Configuring consists of two steps.

The first step is to tell Solarlfare Feed Engine to work in the mixed mode:

SolarflareFeedEngineSettings feSettings;
// The given statement turns the Feed Engine behavior in necessary way.
SolarflareFeedEngine feedEngine(feSettings);

The second step is to bind Handler's feeds to proper network interfaces:

Handler handler;
FeedSettings& feedSettings = handler.settings().feeds();
// The trick is to update all interfaces at once instead of assigning
// values for each type of feed (incremenal, snapshot, instrument, etc).
// Now, updates specs for incremental feeds only.