Timeseries main - #2518
Draft
hu-ahmed wants to merge 1 commit into
Draft
Conversation
Introduces a new "timeseries" microservice and module family (model, api, mongodb, service) that records the history of Thing properties and serves it back over HTTP, WebSocket and Connectivity. Ingestion is opt-in per property via the WoT ditto:timeseries annotation and is forward-only. ThingPersistenceActor hands modified events to a per-node publisher, which resolves the Thing's model and writes matching properties through the timeseries shard region. Nothing is backfilled, and deployments without the service pay nothing: the publisher is left null when the feature toggle is off. Storage uses native MongoDB Time Series collections, one per namespace, so per-namespace retention and dropping a tenant stay cheap. Retention defaults to 90 days with per-namespace overrides, reconciled onto existing collections via collMod on a namespace's first write after a restart. Reads are authorized per path under a dedicated READ_TS permission, since a property's history discloses more than its current value. The single-Thing endpoint supports keyset pagination, sort order, aggregation, time-zone-aware bucketing and linear fill. Cross-Thing aggregation (GET /timeseries/things) spans one namespace with groupBy and an RQL filter over ingest-time tags. Authorization is decided live and never stored alongside the data: a namespace-wide grant gates the request before any storage is touched, then every contributing Thing is verified against its own policy per path, because namespace root entries merge additively and a Thing's own policy can still revoke. Guard rails bound the cost at 100 paths per query and 1000 verified Things; exceeding either fails the request rather than returning a truncated answer. The backend sits behind a TimeseriesAdapter interface with an explicit capability declaration, so a backend that cannot push an aggregation down falls back to a shared compute kernel. A conformance suite pins both paths to identical results. Also adds the Ditto Protocol adapters and the "aggregate" topic action, the Helm chart gated behind timeseries.enabled=false, OpenAPI definitions, documentation and UI support. Signed-off-by: Hussein Ahmed <hussein.ahmed@beyonnex.io>
hu-ahmed
force-pushed
the
timeseries-main
branch
from
August 17, 2026 07:58
33f3e9e to
60c1c1c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.