Document 03 — Functional & Design Specification (FDS)
Document ID: FDS-GXPHISTORIAN-2026-003 | Effective Date (UTC): 2026-10-17T20:21:45Z
1. 4-Pillar System Architecture
- Pillar 1 — Multi-Protocol Edge Collector (
edge-collector):- Built on
telegraf:1.32-alpinewithbuffer_strategy = "disk"at/var/lib/telegraf/buffer(metric_buffer_limit = 1000000). - Exposes
[[inputs.http_listener_v2]]on:8080/ingestfor Windows localhost COM OPC DA forwarders (opcda_windows_forwarder.py) and asyncbacpypes3BACnet/IP workers (bacnet_cov_worker.py). - Executes
multi_protocol_simulator.pyvia[[inputs.execd]]implementing Stage 1 Exception/Deadband filtering (ExcDevandExcMax).
- Built on
- Pillar 2 — Immutable Telemetry Archive (
clickhouse-archive):clickhouse/clickhouse-server:24.8-alpinedatabasepi_historian.- Table
pi_historian.sensor_data(ENGINE = MergeTree() PARTITION BY toYYYYMM(ts) ORDER BY (tag_id, ts)):tag_id UInt32 CODEC(Delta, ZSTD(1))ts DateTime64(3, 'UTC') CODEC(DoubleDelta, ZSTD(1))val Float64 CODEC(Gorilla, ZSTD(1))str_val LowCardinality(String) DEFAULT '' CODEC(ZSTD(1))quality UInt8 DEFAULT 192 CODEC(T64, ZSTD(1))status_code UInt16 DEFAULT 0 CODEC(T64, ZSTD(1))
- Real-time 1-minute rollup table
pi_historian.sensor_rollup_1m(AggregatingMergeTree()) populated bymv_sensor_rollup_1m(WHERE quality >= 192). - In-memory dictionary
pi_historian.pg_asset_tags(LAYOUT(FLAT()) LIFETIME(MIN 5 MAX 15)) and external tablepi_historian.pg_event_frames.
- Pillar 3 — PostgreSQL 16 Part 11 Control Plane & FastAPI (
postgres-control+historian-api):- PostgreSQL 16 extensions:
ltree,btree_gist,pgcrypto. - Tables:
asset_templates,assets(GiST index onasset_path),tags,event_frames,users, andpart11_audit_log. - Trigger
fn_enforce_part11_audit()enforcescurrent_setting('app.actor_id', true)andcurrent_setting('app.change_reason', true)and computesrow_hash = encode(digest(prev_hash || recorded_at::text || actor_id || operation || coalesce(new_payload::text, ''), 'sha256'), 'hex'). - Trigger
fn_prevent_audit_tampering()blocksUPDATE,DELETE, andTRUNCATEonpart11_audit_log.
- PostgreSQL 16 extensions:
- Pillar 4 — Operator HMI & Excel DataLink (
grafana-vision+excel-datalink-client):- Grafana OSS 11.2.0 pre-provisioned with
clickhouse_coreandpostgres_controldatasources and the asset-relative dashboardGxPHistorian Vision — GxP Bioreactor & Cleanroom HMI. - Excel DataLink UDF module (
gxphistorian_datalink_udf.py) and native Power Query CSV endpoint (/api/v1/datalink/sampled?format=csv).
- Grafana OSS 11.2.0 pre-provisioned with