Object mapping

Caplin Liberator obtains the objects requested by clients by subscribing in turn to appropriate objects from other DataSource applications such as Caplin Transformer and Integration Adapters.

When a client application subscribes to an object on behalf of an end-user, you may want the subject name of the subscription to be different to the name that the end-user sees. Liberator's object mapping facility allows you to change the subject name of a subscription before it is passed on to other DataSource applications. Why would you do this?...

...Here's an example:

An end-user called 'John' is logged in to the Liberator and his application subscribes on his behalf to the subject /FX/EURUSD so he can receive streaming updates to the buy and sell prices for this currency pair.

The Liberator's configuration defines this object mapping:

object-map   "/FX/%1" "/FX/%u/%1"

%u is a placeholder for the end-user's login name, and %1 is a placeholder for the part of the request's subject name following the initial /FX/

Using this mapping, Liberator changes the subject of John's subscription request for /FX/EURUSD, to /FX/John/EURUSD, and sends a request for /FX/John/EURUSD to a Pricing Adapter. Because the subject of the subscription request received by the Pricing Adapter contains the login name of the end-user, the Adapter can send this information on to the pricing system. The pricing system can then supply a  price update stream that is tailored to the user 'John'.  Typically the pricing system would tailor prices according to a set of predefined customer tiers, so it would determine which price tier John belonged to, and send him buy and sell prices whose spread was determined by that tier.

John only ever sees prices for /FX/EURUSD; he's not aware that in the background he is subscribed to /FX/John/EURUSD.


See also: