# How Liberator works

Together with [Transformer](../transformer/index.md), **_Caplin Liberator_** is one of the core components of the [Caplin Platform](../platform-architecture/index.md). It’s an incredibly high-performance web streaming server, designed especially for the purpose of supporting online trading, and provides bi-directional connectivity and subscription-management for streaming market data and trade messages. A single instance of Liberator can support thousands of users at any one time, and handle hundreds of thousands of updates per second.

In addition to its performance credentials, Liberator is also extremely versatile; able to operate across any network and any type of connection, together with Caplin’s StreamLink client API it can work with virtually any trading application, on virtually any platform. For instance, you can use Liberator to:

* Communicate with _HTML5_-based financial trading apps across the Internet
* Stream data to _iOS_ and _Android_-based mobile apps
* Stream data to __Jav__a applications across direct _TCP/IP_ connections

## Overview

Liberator fits within the Caplin Platform, between the incoming market data and the StreamLink-equipped client applications. Incoming market data can - and often does - get routed through Caplin Transformer before it gets to Liberator, so that any required modifications or filters can be applied to the data before Liberator passes it to the clients. Liberator can however access the DataSource API in its own right, and the data from a trading adapter (as opposed to a pricing adapter for example) would go directly to Liberator. You can see how Liberator fits into Caplin Platform in the diagram below.

![cp-detail-liberator-focus_mike_update](../../../images/cp-detail-liberator-focus_mike_update.png)

## Liberator Features

Liberator has to perform a lot of different tasks, and some of these are handled by specific modules, as shown in the diagram.

* **Streaming Service**\
 Handles bi-directional communication with client applications, via the StreamLink API. This involves using [RTTP](liberator-rttp.md) to stream the data, via the most efficient technique available, whether that is Websockets, polling, or forever-frame.
* **HTTP Service**\
 As the name suggests, handles connections over the Internet via HTTP and HTTPS
* **Conflation Service**\
 Controls the throttling and batching of data. If for example, there is a lot of movement on a particular price, and it is changing 100 times a second, transmitting every single update of that price to clients may be slightly over-zealous, and could well affect performance. A "throttling" level can therefore be set, to limit how often price updates on a particular item are sent to the user. This can be set at several levels, both as a default setting, and for individual items. Batching boosts efficiency in a different way, by batching updates into larger packets before transmitting them to users.
* **Export Service**\
 Handles the facility to export the contents of a container without going via StreamLink such as exporting to a CSV file
* **Perms (Permissions) Service**\
 Obtains permissioning information about users, and handles the application of those permissions
