Skip to content

Add the virtual-table capture pack - #1

Open
DI-Dexter wants to merge 1 commit into
DataIntellectTech:mainfrom
DI-Dexter:part1-virtual-table-capture-pack
Open

Add the virtual-table capture pack#1
DI-Dexter wants to merge 1 commit into
DataIntellectTech:mainfrom
DI-Dexter:part1-virtual-table-capture-pack

Conversation

@DI-Dexter

Copy link
Copy Markdown

A TorQ application overlay that captures data partitioned by date AND instrument, and serves it through kdb-x virtual tables. No RDB, no HDB, no sort process and no gateway: the writer writes where the readers read, and nothing moves at end of day.

The instrument becomes a directory rather than a column, so a selective lookup is a directory lookup instead of a scan. That needs no p# attribute, which means the live day is as fast as history and there is nothing to rebuild overnight.

Contents

code/wdb/vtwrite.q           writer overrides
code/processes/vtidb.q       the reader
code/processes/vtcompress.q  the weekend compression job
appconfig/                   process list, settings, compression tiers
testfiles/                   16 assertion tests + 9 evidence scripts
docs/                        architecture document and status report

Verification

./regress.sh    16 assertion tests, 16/16
./selftest.sh   end-to-end through the live stack, 7/7

Notes for review

  • appconfig/passwords/ is the stock TorQ demo :pass list, same as the Finance Starter Pack ships. No real credentials.
  • Requires kdb-x, not kdb+ 4.x — the reader binds mkP via use`kx.pq.t, and use is a kdb-x keyword.

A TorQ application overlay that captures data partitioned by date AND
instrument, and serves it through kdb-x virtual tables. No RDB, no HDB,
no sort process and no gateway: the writer writes where the readers read,
and nothing moves at end of day.

The instrument becomes a directory rather than a column, so a selective
lookup is a directory lookup instead of a scan. That needs no p# attribute,
which means the live day is as fast as history and there is nothing to
rebuild overnight.

Contents
  code/wdb/vtwrite.q          writer overrides (5 of them)
  code/processes/vtidb.q      the reader
  code/processes/vtcompress.q the weekend compression job
  appconfig/                  process list, settings, compression tiers
  testfiles/                  16 assertion tests + 9 evidence scripts
  docs/                       architecture document and status report

Verification
  ./regress.sh   16 assertion tests, 16/16
  ./selftest.sh  end-to-end through the live stack, 7/7
  Results checked against the same bytes in a stock kdb+ database:
  16 of 19 queries identical, 3 raise an error, none silently different.

Known limitation: a single virtual table cannot span both this format and
existing date-partitioned history, because the column list is taken from
the first directory only. Raised with KX; see section 10 of the doc.

Parts 2 (split capture stacks) and 3 (chained tickerplant) are not included.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant