ADR-0011 — Observations: TimescaleDB hypertable, one view per layer, canonical values¶
Date: 2026-09-02 · Status: accepted (validated by prototype 6)
Context¶
Decoded surface observations arrive continuously from a decoding service and must be served time-qualified (WMS TIME, WFS/CQL) by every replica without restarts, with units under control (ADR-0003). Prior operational experience: raw tables exposed directly couple the publication to the producer's model.
Decision¶
- Schema
obsowned by the decoding service (every producer owns its schema):station,observationhypertable (PK station/time/param, surrogatefid), values stored in the canonical unit withsource_unitkept (conversion at decode time). - One SQL view per published layer (series view and latest-per-station
view), virtual key declared in
gt_pk_metadata; GeoServer reads through the shared read-only JNDI datasource (obs-dbdatastore,schema=obs). - Declarative publication by the init plugin (
VECTOR_LAYERS): TIME dimension (continuous interval, default latest) on the given attribute, title/abstract with the canonical unit from the reference data. - No notification mechanism: views read the live tables; new observations are visible to all replicas immediately (measured).
Rejected alternatives¶
| Alternative | Why rejected |
|---|---|
| Exposing the raw table | Couples publication to the producer's model; no per-quantity filtering |
| LIST presentation for TIME | Unbounded list of instants in the capabilities |
| GWC tile layers for observations | Requests are time-qualified; caching would need a TIME parameter filter for little gain |
| Converting units at render time | The stored value must be reliable for WFS/WPS consumers |
Consequences¶
- The real decoding service replaces the simulator without touching GeoServer.
- Retention on the hypertable (drop_chunks policy) is to be defined with the data owners (recorded in the risks).
- Thematic styles (value-dependent symbology) come with sub-project 8.