OnixS C++ CME iLink 3 Binary Order Entry Handler  1.8.0
API Documentation
Pluggable Session Storage

Pluggable session storage is the storage which implemented by the user. For example, it could be used to implement High-Availability (HA) Solutions, one can implement a Pluggable Session Storage which stores data to shareable storage and if one server, with the CME iLink 3 Handler, fails and another reserve server stands up then the CME iLink 3 Handler can restore session states from the same shareable storage. Such a storage should implement the OnixS::CME::iLink3::SessionStorage interface.

Implementing Pluggable Storage

There are few basic rules that should be applied to an implementation of Pluggable Storage.

Call Order of Pluggable Storage Methods

This section explains how different methods of Pluggable Storage are called in different situations.

Incoming message handling

If an exception is thrown by the user's code on any stage (during SessionStorage or SessionListener handling), the session becomes disconnected, and subsequent stages are omitted.

Outgoing message handling

Attaching Pluggable Storage

There is a quite schematic illustration for the pluggable storage usage.

// Declare the own class and implement SessionStorage interface callbacks.
class MyPluggableStorage : public SessionStorage { ... };
// Declare the instance of the storage.
MyPluggableStorage myStorage;
// Create the session which uses the storage.
Session session(sessionSettings, marketSegmentId, &listener, SessionStorageType::Pluggable, &myStorage);

Example

Please, check the PluggableStorage sample, included into distribution package of CME iLink 3 Handler.