Overview
The Execution Server was designed as a platform for custom Java-based trading algorithms within Deltix. These algorithms are designed to handle user orders basedon specific logic and market conditions.
Algorithms in Deltix use the Reactor design pattern, which is shared with other Ember components. Each execution algorithm instance has its own dedicated inbound request queue and processing thread. This system-managed thread runs in a loop that queries various non-blocking event sources, including:
- Market Data
- Trading Requests (for orders placed to this algorithm)
- Trading Events (for orders placed by this algorithm)
- Timers
In addition to handling trading orders and events, the execution algorithm also polls market data and timers. It's important to note that the state maintained by the algorithm instance thread is not shared with any other threads in the system.
The following diagram shows how the algorithm interacts with the rest of the system:
You may deploy multiple instances of each execution algorithm.
Some key points:
- Each algorithm instance is single-threaded and lock-free.
- Each algorithm receives Inbound parent orders and emits Outbound child orders.
- Each algorithm receives Inbound Events about child orders and emits Outbound Events regarding parent orders.
- The state of each algorithm is determined by the combined state of its parent and child orders. The persistent state of each algorithm should not depend on market data or other external events. While external events can influence order execution, the state of each order should be fully deterministic based on the set of trading events recorded for that specific order.