Introduction to use of low-level MDA interfaces
Applications can use the low-level MDA interfaces to manage sessions and access datastreams. These interfaces provide the same features as provided by the factory and helper MDA interfaces. The difference is that the factory and helper interfaces do more default set-up while the low-level interfaces require you to explicitly set up each MDA component.
Sessions are separate connections to an internal or external datasource such as a simulator or an adapter. A datasource can register one or more sessions. For example, a single datasource that supports connections to two exchanges would expose two sessions. Sessions have a unique ID, eliminating the need for unique IDs for the legacy service, market and exchange IDs. Sessions also have self-describing capabilities.
Sessions are automatically registered with the Session Manager by the datasource when they become available. Session Manager Interfaces provide a mechanism to query registered sessions and what they support. Sessions can be started, stopped, and reconfigured or de-registered if not required by the application. Session management usually occurs once at application startup.
The control flow for using a session includes the following:
Find a suitable session
Get list of available registered sessions
Register callbacks for new sessions being added/updated/removed
Control a session
A session can have self-describing control parameters, which can include information such as the name, type, description, allowable values, a default value, and a flag indicating if the parameter is for information only.
Start a new session with specified control parameters
Reconfigure an existing session with different control parameters
Stop an existing session if it is no longer required
Session Management represents an activity separate from that of accessing the data from sessions. An example of the latter is using MDA to get market data from the session. The following figure shows the use of the MDA and sessions in an application. The left arrows on the MDA block illustrate control signals, such as connect and disconnect. The right arrows represent data and responses to control requests. The Generic Market Data Manager adapter library uses channels to send data directly to one or more requesting Manager instances, which may be in one or more contexts. (In release prior to 5.2, this was accomplished by means of data reflectors.)
The arrows in the Session Manager block illustrate control signals. Control signals are also reflected to multiple Session Manager Interfaces if they are created in multiple contexts. This is not shown in the diagram below.
MDA architectural overview