Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

The use of SocketOpPriority session parameter is based on a variety of ways of doing network I/O (input/output):

...

  • synchronous non-blocking I/O with busy polling
  • synchronous blocking I/O

As well as various ways to perform an I/O operation:

  • a thread from a pool
  • a dedicated per session thread

...

FIX Antenna allows to pick such a combination using non-blocking I/O on a per session basis and SocketOpPriority is the corresponding session parameter.

Valid values of SocketOpPriority parameter:

  • EVEN (default) - share worker thread among all sessions in the Engine;
  • AGGRESSIVE_SEND - use dedicated per session thread to send outgoing messages;
  • AGGRESSIVE_RECEIVE - use dedicated per session thread to receive incoming messages;
  • AGGRESSIVE_SEND_AND_RECEIVE - use dedicated per session threads to send and receive messages;
  • AGGRESSIVE_SEND_ASYNC -use dedicated per session thread to send all outgoing messages to the queue without  trying to send them to the socket first.

  • DIRECT_SEND - use the current thread for sending, if this would block, perform as "EVEN".

...

Use thread pool for performing I/O for send and receive operation. The operations are distributed between the worker threads by a dispatcher thread which polls sockets and notifies worker threads when some socket is ready. In this mode FIX Antenna batches incoming/outgoing messages, i.e. several FIX messages can be processed in one send() system call. This is the default value.

...

Use a dedicated per session thread to handle receiving. It uses I/O with busy polling and switches to readiness notifications if no data has been received during a certain configurable time interval. Intended for applications that need low response time (e.g. to receive and react as soon as possible).

AGGRESSIVE_SEND_AND_RECEIVE

Use dedicated per session threads to send and receive messages;

AGGRESSIVE_SEND_ASYNC

FIX Engine uses a dedicated thread for a session that sends all outgoing messages to the queue without trying to send them to the socket first. This mode aims to reduce the time spent on the execution of the session:put method and reduce the impact of slow consumers on the application by parallelizing the socket operations by default. 

Business scenario

Aggressive strategies of I/O are recommended to use when minimum latency is needed. But it can reduce throughput. 

...