The Lab

Message Header

MarketFactory has defined a custom messageHeader composite that includes additional fields to those mandated by the SBE 1.0 Standard. These are:

  • messageStart
  • messageLength
  • msgSeqNum
  • sendingTime

Message Start

Background

This is a constant value four byte magic number at the start of every message.

Requested by Corvil, it aids:

  • The synchronisation of decoding in the middle of a flow.
  • Recovering from missing data.
  • Aiding in the automated detection of protocols from an uncategorised mixture of network traffic.

The four byte field also ensures that the message header components are optimally aligned for efficient direct access.

Usage

A constant value of 1179469389 must always be assigned to this field, this corresponds to an on-the-wire byte representation of "MFMF":

  • The MF Reference API populates this value on the Client's behalf in all messages sent to the FH.
  • If a Client implementation should not use the Reference API, then it must implement it's own mechanism to ensure that this value is always populated.
  • The FH will ensure that this is populated in every message sent to the Client.
  • The FH will validate every message received from the Client.
Should a message be received that has an incorrect value set for this field, then that will result in the FH initiating a Logout.


Message Length

The standard header doesn't include this and its absence prevents backward compatibility in the general case.

Message Sequence Number

Rather than use a separate framing message to prefix every API message to contain this information, MF has elected to ensure that this message is transported in the API message itself.

Location in the messageHeader composite element means that the field is universally available.

Sending Time

Rather than use a separate framing message to prefix every API message to contain this information, MF has elected to ensure that this message is transported in the API message itself.

Location in the messageHeader composite element means that the field is universally available.

Hops Group

MarketFactory provides a detailed breakdown of inbound message latencies from the Venue to the Client via the NoHops group included in all Application-level messages. This group contains the following fields:

  • HopRefID - this is the specific sequence number of the originating Venue message.
  • HopSendingTime - this is the Venue clock time that the Venue message was sent.
  • HopNetworkTime - this is the MF clock time that the Venue message was received by MF hardware. Solarflare is used for this purpose.
  • HopArrivalTime - this is the MF clock time that the Venue message was received in the Whisperer Enterprise Feed Handler application.


Relative Clock Drift

Venue clock timestamps may be synched to different time-servers to those used by MarketFactory and may exhibit drift relative to the MarketFactory clock.


Client application software, Corvil and other network analysers can use these fields to in combination with measurements of arrival time in the client network to build up a multi-hop view of system latency. 

  • No labels