Binary

The DataSource Binary data type is the recommended way to deliver Binary data to front end applications.

Requirements

To use the Binary data type, your Caplin components and libraries must be at least as recent as the versions listed in the table below:

Product versions supporting the Binary data type
Product Minimum Version

C DataSource API

8.0.12

Java DataSource API

8.0.11

.NET DataSource API

8.0.12

Liberator

8.0.15

Transformer

8.0.8

StreamLink Java

8.0.7

StreamLink JS

8.0.7

StreamLink .NET

8.0.7

Overview

With the introduction of the Binary data type, the Caplin Platform now provides first class support for transporting Binary data.

  • The Caplin Platform uses the open-vcdiff library to describe an update in terms of a Binary patch.

  • The .NET and Java DSDK caching publishers can send binary messages published by the application as either image or patch packets to subscribing peers.

  • Liberator and Transformer can receive and apply a Binary patch to a cached Binary object.

  • StreamLink clients can receive Binary patches and apply them to a native object.

Features

The Binary data type has the following advantages over transporting Binary in a record field:

DataSource: Optimal choice of Binary message type between peers

For Binary messages, the .NET DataSource API’s ICachingPublisher and the Java DataSource API’s CachingPublisher work out the difference between the new cache contents and the current cache contents ( i.e. the patch ) and send a packet with smaller of the 2, i.e. either an image packet with the current cache contents or an update packet with the patch.

Liberator: Chunked streaming of large Binary messages over RTTP

Liberator streams a Binary message to a client in chunks, which prevents a large Binary message from delaying the delivery of smaller, high-frequency messages such as price updates.

The rate at which Liberator adds a Binary message’s chunks to an outbound queue is bandwidth adaptive. Adding chunks to an outbound queue faster than the queue is moving would be counter-productive and provide fewer opportunities for other messages to be queued between the chunks. Liberator queues a chunk only if at least a chunk-sized amount of data has been sent to the client since the previous chunk was queued.

The size of the chunks delivered can be configured by using the binary-yield-size configuration item to tune your Liberator’s performance.

The StreamLink API provides the following interfaces to support the Binary data type:

For example code, see Subscribing to a Binary subject.

Java DataSource API support

The Java DataSource API provides the following interfaces and methods to support the Binary data type:

.NET DataSource API support

The .NET DataSource API provides the following interfaces and methods to support the Binary data type:


See also: