A source tick is stored once and entitled when it is read

Table of Contents

1. Summary

A tick belongs to a stream. A vendor's or a simulator's source stream is shared by every party that subscribes to it; a derived or blended stream belongs to the party that makes it. The store holds the points of each stream once: rows of stream, time, coordinate and value, owned by the installation, with no tenant column and no row-level security. A party's quote series stays the party's own row, under row-level security, and points at its stream. Entitlement is checked where a party reads: the history read and the republish check the party's subscription, or its ownership of a derived stream, before they return or send a point.

2. Detail

2.1. What the store holds

Table Owner Holds
Streams The installation One row for each source series and each derived series: its source, its datum, and the party that owns it when it is derived
Points The installation One row for each tick of a stream: stream, time, coordinate, value
Quote series The party The party's view of a stream: its classification, its asset classes, its stream

A point holds no tenant's data. It is an observation of a source, so it carries no tenant column, and one tick of a source is one row however many parties subscribe to it.

2.2. Who can read a point

Only the marketdata service's roles hold grants on the streams and the points; a tenant's session holds none. The service reads a point for a party after it has checked, in the party's tenant and under row-level security, that the party's quote series names the stream and that the party holds a subscription with the right to read it, or owns the derived stream. The check is one indexed lookup for each read, not one for each point.

2.3. Who receives a tick

The live path republishes a tick to each party subscribed to its stream, on the party's subject. The delivery meter counts each delivery for the party (Usage is recorded as events and priced later), so billing counts deliveries, not stored rows.

2.4. What it saves

At one hundred thousand feeds the store takes about 29,000 rows a second, one for each source tick, whatever the number of parties. The points carry no row-level security, so closed chunks compress (The tick store is bounded).

3. See also

Emacs 29.3 (Org mode 9.6.15)