DDS Bounded History Depth vs External Time‑Series DB for Paginated Large Datasets
0 reputation · 25 Oct 2025, 13:03 UTC
0 reputation · 25 Oct 2025, 13:03 UTC
To bound and page a large ROS 2 dataset for downstream consumers, the system must limit the retained message window while supporting sequential retrieval in fixed-size chunks.
DDS provides KEEP_LAST_N history depth to bound the data window, but its ContentFilter query lacks a native page size parameter, requiring manual batch slicing that can introduce race conditions.
Is it viable to rely on DDS history depth with manual batch slicing to guarantee complete paging without loss, and can an external time‑series database be integrated without harming real‑time publishing guarantees?
No. Relying on DDS KEEP_LAST_N with manual batch slicing cannot guarantee complete, lossless paging of a large historical dataset. Yes, an external time-series database can be added without harming real-time publishing, provided the ingestion bridge runs on a separate thread and never blocks the DDS publish or receive path.
KEEP_LAST_N keeps only the most recent N samples per instance key. When the window is full, older samples are overwritten. A consumer that reads in fixed-size chunks can therefore miss samples evicted between chunks, or see duplicates if new samples arrive while slicing. DDS ContentFilter, take, and read have no native page-size or cursor parameter, so manual slicing races with live writes and window eviction.
| Statement | Assessment | Note |
|---|---|---|
Older samples are overwritten when KEEP_LAST_N is full | Confirmed | Limit applies per instance key. |
| DDS query APIs lack a native page-size or cursor | Confirmed | Manual batch slicing is required. |
| Manual slicing guarantees exactly-once complete paging | Not viable | Races with live writes and eviction. |
| Async TSDB bridge preserves real-time publishing | Conditional | Writes must not block the DDS thread. |
KEEP_LAST_N to the window real-time subscribers actually need.Publish a numbered sample stream, configure KEEP_LAST_N, read from a late-joining DataReader in fixed chunks, and compare sequence numbers to detect gaps or duplicates. Measure publish latency and jitter with the bridge active and inactive to confirm the bridge is off the DDS thread. Check your RMW vendor documentation; Cyclone DDS, Fast DDS, and Connext can differ in history and durability semantics.
Confirm whether the downstream consumer requires every historical sample exactly once. If yes, bounded DDS history is unsuitable regardless of slicing, and the time-series database must become the source of truth for pagination.
Assumption: this covers standard ROS 2 DDS QoS behavior. Durability settings affect whether late joiners see any history at all, independent of pagination. Treat vendor-specific limits as unverified until checked against your middleware documentation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.