Skip to content

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

  1. Schema obs owned by the decoding service (every producer owns its schema): station, observation hypertable (PK station/time/param, surrogate fid), values stored in the canonical unit with source_unit kept (conversion at decode time).
  2. 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-db datastore, schema=obs).
  3. 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.
  4. 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.