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 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 OnixS::CME::MDH::SolarflareFeedEngineSettings::mode defines behavior of the Feed Engine in certain cases. In particular, the Feed Engine will fail operating on non-Solarflare network interfaces in the conventional mode as use of the ef_vi services on non-Solarflare network interfaces is not supported by manufacturer and thus leads to a failure. In contrast, the mixed mode combines ef_vi with ordinary socket API thus making possible multicast packets reception on both Solarflare and non-Solarflare network interfaces. The mixed mode gives more flexibility for the users whose operating environments configured in a specific way (for example, when incremental data is available on a Solarflare network adapter and recovery data comes via a non-Solaflare network interface).
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.
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:
The second step is to bind Handler's feeds to proper network interfaces: