Skip to content

Recordings on MCAP

Recordings are MCAP files written and read by Caliper's own C++ recorder and reader, with a timeline and keyframe index, commit points, recovery, tailing, segments, thinning and caliper.record, so that a session can be replayed.

Field Value
ID STR-12
Status In Progress
Scope Peripheral
Pillar Live Data, Streaming and Recordings
Sprint 4
Depends On Catalog (SPC-04)
Timelines in Caliper LIB (STR-23)
Unblocks Scenes and Recordings on Windows (PLT-16)
Trails (REN-20)
Scale Pass (REN-24)
Recording Bindings in Spec Panels (SPC-22)
Scrubber (STR-13)
Record Button (STR-14)
Recordings Through the Hub (STR-15)
ROS 2 Import (STR-22)
Recording Reader in the Browser (STR-26)
Recording Export to Parquet (STR-28)
Recordings in Generic MCAP Viewers (STR-39)
Docs None
Branches sprint4-rec
Design None

The work on these branches is unfinished, so the feature shows as in progress.

Coverage Ledger

  • Branch sprint4-rec, 152 commits, 13 not in sprint4-integ3: 531169a8, 3581efd0, 20a218c1, 5b93a511, a2b54f09, 732b0466, 937dee1b, 5c55d1d4, f9481def, 8fc7aae5, 897fb282, 22324a12, fea84d47. The MCAP recorder and reader in C++.
  • Branch sprint4-time, ab10d6ea. Timelines in Caliper LIB: step, time and up to six timelines of the script's own (caliper.step, caliper.timeline, caliper.set_time), stamped once at each call on both senders and sent only to peers that announced timelines, with a test that a frozen 3.1 codec decodes every frame.
  • Branch sprint4-time, 6273f1d1. The hub's timelines: the hub announces timelines, keeps a session's timelines and each retained series value's stamp, and forwards stamps only to viewers that announced them.
  • Branch sprint4-rec, fea84d47, 22324a12, 897fb282. The MCAP recording format layer and recorder: our own MCAP writer and reader (no MCAP library), CRC-32, zstd 1.5.7 chunks, one channel per view, scene, entity part and session, commit points, a writer lock, index and footer.
  • Branch sprint4-rec, 8fc7aae5, f9481def, 5c55d1d4. The recording reader and recovery: opens a file, a folder through its manifest or a segment alone, recovers a segment whose writer died at its last commit point, follows a file being written, and answers latest-at and scene state through keyframes.
  • Branch sprint4-rec, 20a218c1, 937dee1b, 5b93a511. The recorder on its own thread behind a bounded write queue (a full queue never blocks the producer and drops series points counted by kind), with thinning, the disk budget and compaction beside the writer.
  • Branch sprint4-rec, 531169a8, a2b54f09, 732b0466. Recording tests and fixtures: truncation and damage tests, comparison with the official MCAP Python reader, and shared fixtures (finished and torn recording) for the TypeScript reader.
  • design/builder-overview.md, under Reserved for later work. The primitive name scene and the catalog kind recording are reserved and not built.
  • design/catalog.md, under Reserved names. The catalog kind recording and the schema name caliper_recordings are reserved for recorded sessions; version 0 refuses the kind with catalog.invalid_id.
  • design/data-and-cloud.md, under Data and Cloud. Plans the history of runs, comparison and replayable recordings kept locally.
  • design/data-and-cloud.md, under Local history and recording. Recording and replay: a session recorded to a file and replayed later with no server, sharing its snapshots with the live protocol.
  • design/recordings.md on the branch sprint4, under What is built and what is planned. Nothing on this page is built; it rests on protocol 3.1, series retention, the hub's ended sessions, sprint 3's workspace and reserved names, the metrics store and the web package's codec. The evidence for the file is a structural check of MCAP, kept outside the repository.
  • design/recordings.md on the branch sprint4, under The recording model. Overview of timelines, stamps, calls, recorders, what is stored and what a recording can answer.
  • design/recordings.md on the branch sprint4, under The calls in Caliper LIB. caliper.step, caliper.timeline, caliper.set_time and caliper.record(path, ...) with views, rates, data_views, budget, horizon, sync and full (Caliper LIB, 2 days for record).
  • design/recordings.md on the branch sprint4, under Recorders. Three recorders: Caliper LIB (caliper.record), the hub (caliper serve --record) and the Caliper app (Record in the session toolbar or the setting Record sessions when they start); a recorder is a subscriber that stores the live frames.
  • design/recordings.md on the branch sprint4, under What a recording stores. Stored items per view kind (heatmap, image, points, series, histogram, bars, scene, text) plus VIEWS and CONTROLS, each stored as the live frame.
  • design/recordings.md on the branch sprint4, under What a recording can and cannot answer. A recording shows every recorded view at any position under latest-at at its recorded rate and data view, and cannot serve data views never recorded.
  • design/recordings.md on the branch sprint4, under Retention and downsampling. Retention and downsampling overview.
  • design/recordings.md on the branch sprint4, under Rates. Per-view recording rates (2 per second for heatmaps, images, points, histograms and bars; 10 per second per scene entity part) and rates= or --record-rate.
  • design/recordings.md on the branch sprint4, under Budgets. Memory and disk budgets: a 64 MiB write queue, 4 GiB per recording by default, 512 MiB live buffer in a browser.
  • design/recordings.md on the branch sprint4, under Thinning. Logarithmic thinning by count per view and entity part: recent data whole, old data at density halving with each doubling of age, never removing static items, clears, class tables, series or text.
  • design/recordings.md on the branch sprint4, under Series and text. Series kept whole to 4,194,304 values then decimated in buckets of 64 keeping min and max; text limited too.
  • design/recordings.md on the branch sprint4, under Keyframes for scenes. Keyframes per scene point to the items holding its state so that latest-at reads at most 512 entries after one.
  • design/recordings.md on the branch sprint4, under When the budget is reached. Order of action at the budget: compact closed segments, halve the horizon, decimate series, drop the oldest band, stop recording snapshots; never delete a recording.
  • design/recordings.md on the branch sprint4, under The recording file. Overview of the MCAP recording file.
  • design/recordings.md on the branch sprint4, under Why MCAP. The container is MCAP with the extension .mcap, chosen by the user for its official readers and command-line tool.
  • design/recordings.md on the branch sprint4, under The file. Channels per view and per entity part, message encoding caliper.wire3, schemas per kind, log_time from the time stamp, and a caliper.segment metadata record.
  • design/recordings.md on the branch sprint4, under The timeline and keyframe index. The caliper.index and caliper.index.delta attachments, validated against the file and rebuilt when stale, answer latest-at by binary search and scene state from keyframes.
  • design/recordings.md on the branch sprint4, under Alignment. A private padding record before each large frame aligns its arrays to 16 KiB for no-copy reads.
  • design/recordings.md on the branch sprint4, under Compression. Small frames in zstd chunks and large frames raw, through a patch of the official writer pinned at 2.2.0.
  • design/recordings.md on the branch sprint4, under Segments and the manifest. A single file up to 1 GiB, then a folder of segments with a manifest, a roll-over, thinning and compaction per segment; each segment is a valid MCAP file.
  • design/recordings.md on the branch sprint4, under Guarantees. Atomic, consistent, isolated and durable: commit points, a delta index per commit, an exclusive writer lock, and a sync cadence of one second by default (sync=, full=).
  • design/recordings.md on the branch sprint4, under Recovery and the standard tools. Caliper repairs its own files and never uses mcap recover; the page tabulates what the mcap tool does with Caliper files.
  • design/recordings.md on the branch sprint4, under Standard MCAP and Caliper's additions. Table of the additions (encoding, index attachments, metadata, profile, padding opcode 0xCA, segments, mixed compression) and what a standard reader does with each; standard payloads are a decision not taken.
  • design/recordings.md on the branch sprint4, under Limits of the format. The format's own limits: the in-memory index of about 40 bytes per item, sizes, and features that standard tools lose.
  • design/recordings.md on the branch sprint4, under Size. Recordings take 25 builder days in increment 7: C++ recorder and reader 18, Caliper LIB 2, browser reader 3, Parquet export 2; the app's recorder is in increment 8 and the hub's moved to sprint 5.
  • design/recordings.md on the branch sprint4, under Limits. Limits: only what was recorded, copies off the device, budgets thin old data, the in-memory index, generic tools do not draw, durability rests on reasoning, one writer per recording, macOS first.
  • design/recordings.md on the branch sprint4, under Decisions. Decisions: MCAP and .mcap, a recorded item is the live frame, custom encoding caliper.wire3, index as attachments, padding record, mixed compression, segments with a manifest, ACID with a one-second sync, own recovery, payloads in files, logarithmic thinning, keyframes, Parquet export, one cursor per page, no automatic deletion, recording only when started, caliper open starts the app.
  • design/recordings.md on the branch sprint4, under Open decisions. Default rates and budget (2 Hz and 4 GiB or a bytes-per-second target), copying dropped files, carrying the writer patch or offering it upstream, a decoder of caliper.wire3 for generic viewers, and alignment of mid-sized frames.
  • design/roadmap.md, under Data and Cloud. Run history, comparison and recording and replay are planned for the desktop app after Phase 1 and after streaming, on the local DuckDB stores, with no account or server.
  • design/roadmap.md on the branch sprint4, under Data and Cloud. The Data and Cloud paragraph moves up; run history, comparison and recording stay planned.
  • design/roadmap.md on the branch sprint4, under Scenes and recordings. The new section: 3-D scenes and recordings are designed and not built, built by sprint 4 as increments, with five parts (renderer core, scenes, timelines and recordings, scenes in the browser, the two demos).
  • design/roadmap.md on the branch sprint4, under Scenes and recordings. The timelines and recordings part: stamps on several timelines, the recording file, recordings in the workspace and the scrubber in the app and the browser.
  • design/scenes.md on the branch sprint4, under Stamps on the Timelines. Every scene, text and bars call is stamped on the step, time and script timelines; static calls have no stamp.
  • design/spec-format.md, under Reserved names. The primitive name scene is reserved for 3-D scenes and the catalog kind recording for recorded sessions; version 0 refuses both.
  • design/spec-format.md, under Reserved names. The recording catalog kind, added when the catalog lists recordings stored beside the loaders' tables.
  • design/sprint-4.md on the branch sprint4, under Where things stand. The recordings are MCAP files with the extension .mcap, as the user decided.
  • design/sprint-4.md on the branch sprint4, under 7. Timelines, recordings on MCAP and the scrubber. Increment 7 as a whole (38 days): stamps on step, time and the script's own timelines; caliper.record writing .mcap; the scrubber in the app and in a browser; recording only when a person starts it; demo 4 as the acceptance.
  • design/sprint-4.md on the branch sprint4, under 7. Timelines, recordings on MCAP and the scrubber. Recordings on MCAP: recorder and reader in C++, caliper.record, browser reader, timeline and keyframe index, commit points and tailing, writer lock, segments with a manifest, recovery, thinning and caliper export --to parquet (25 days).
  • design/sprint-4.md on the branch sprint4, under Decisions. Wire and demo decisions: strip break masks built by the viewer from strip_lengths, the key static travelling with scenes alone, the path's principal-component plane as demo 0's default, demo 0's defaults and cost budget, MCAP and recording only when started.
  • design/sprint-4.md on the branch sprint4, under Risks. Risks: the cost of the landscape's surface, its changing plane, a slower fast path with no switch back, Windows and GPU-less machines, applets outside the repository, applet pictures that change, ids under review and one browser, MCAP with no size margin, scope of 162 days.
  • design/windows-parity.md on the branch sprint4-pr1-main2, under 10. Scenes and recordings. The recording file library on Windows: MapViewOfFile, reading a file another process is writing, crash recovery (2 days).
  • Orchestrators' notes, _notes/HANDOFF-sprint4.md. The MCAP recorder and reader in C++ are built on sprint4-rec: format, recorder, reader, recovery, tailing, lock, segments, thinning, writer thread with compaction, and the scrubber's queries.
  • Orchestrators' notes, _notes/HANDOFF-sprint4.md. Decision: recordings use Caliper's own MCAP writer and reader, recovery cuts at the last commit point, and a full queue never blocks the producer.
  • Orchestrators' notes, s4-time/STATUS.md. The recorder should read the stamp once at the call through caliper._timelines.stamp() and take_call, the series tap, scene items and CONTROLS stamp interfaces.
  • Orchestrators' notes, s4-rec/STATUS.md. The MCAP recorder and reader in C++ with recovery to the last commit point, tailing, locks, segments, thinning, compaction, an async writer and the scrubber's queries, clean under ThreadSanitizer; 24 and later 29 test cases.
  • Orchestrators' notes, s4-rec/STATUS.md. caliper.record: Python bindings over the Recorder with a writer thread and a 64 MiB coalescing queue, and the 3.2 stamps from Caliper LIB, are not built.
  • Orchestrators' notes, s4-rec/STATUS.md. The recording file layer is POSIX (flock, mmap, fsync, pwrite, rename over an open file); Windows excludes the folder from the build until a Windows file layer is written.
  • Orchestrators' notes, s4-rec/STATUS.md. Hub parts not built: one Recorder per session and the RECORDINGS ranges per timeline; budget step 3 (decimating series and dropping text) needs the SERIES and TEXT frames of the 3.2 codec.
  • Orchestrators' notes, s4-rec/STATUS.md. Twelve design changes for design/recordings.md are listed, including own MCAP writer, recovery at commit points, thinning that keeps the first update after a clear, a static layer and compaction on the writer's thread.
  • Orchestrators' notes, s4-rec/STATUS.md. The ThreadSanitizer build command is still to be added to docs/development/testing.md.

Roadmap Graph Feature in Graph