The Subscription Tracking Transition Function

See Figure 9.9

Figure 9.9: Subscription retry states
\includegraphics{dot/retry.ps}

Market data subscription tracking starts in the Begin state, with a request enqueued, whether due to a downstream command, or a timeout-induced retry.

The request send causes a change in state to Quiet, reflecting the lack of data returned for the request up to this point. Tick data price and size events shift state to Fresh, and quiescent intervals without additional data, whether from Quiet or Fresh, cause a retry action and change state back to Begin.

Market data farm connection loss, or down events, shift state to Stale, where, unlike Quiet and Fresh, there is no timer running. When the link comes back up, the state moves to Quiet.

Finally, if the retry limit, if any, is ever reached, the subscription enters the Final state, and is cancelled without an attempted renewal.

There are log messages generated to reflect changes in subscription state when the first data for a given subscription request is received; a retry is performed; and in the case that the subscription is cancelled. Market data farm state is also tracked outside the fsm for this automata, and the related messages echoed as internal log messages, so that downstream processes can track subscription state via log comments, without having to follow tws error messages.

Bill Pippin 2010-01-14