Phase 7 Stream D — Historian alarm sink (SQLite store-and-forward + Galaxy.Host IPC contracts) #182
Reference in New Issue
Block a user
Delete Branch "phase-7-stream-d-alarm-historian"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ships Phase 7 plan decisions #16, #17, #19, #21: durable local SQLite queue absorbs every qualifying alarm event, a drain worker forwards batches to Galaxy.Host (which reuses the already-loaded 32-bit
aahClientManagedDLLs) on an exponential-backoff cadence, and operator acks never block on the historian being reachable.New project
Core.AlarmHistorian(net10)AlarmHistorianEvent— source-agnostic event shape (scripted alarms + Galaxy-native + AB CIP ALMD + any future IAlarmSource per plan decision #15)IAlarmHistorianSink+NullAlarmHistorianSink— interface + disabled defaultIAlarmHistorianWriter— per-event outcome (Ack / RetryPlease / PermanentFail); Stream G wires the Galaxy.Host IPC client implementationSqliteStoreAndForwardSink— full implementation:AttemptCount/LastError/DeadLetteredcolumns + indexDrainOnceAsyncserialised viaSemaphoreSlim1s → 2s → 5s → 15s → 60s(cap)DefaultCapacity = 1_000_000rows — overflow evicts oldest non-dead-letteredDefaultDeadLetterRetention = 30 days— sweeper purges on every drain tickRetryDeadLetteredoperator action reattaches dead-letters to the regular queueNew IPC contracts in
Driver.Galaxy.SharedHistorianAlarmEventRequest— batched up to 100 events/request per Phase 7 plan Stream D.5HistorianAlarmEventResponse— per-event outcome (1:1 with request order) so a single malformed event can be dead-lettered without blocking neighborsHistorianAlarmEventOutcomeDto : byte—Ack/RetryPlease/PermanentFailHistorianAlarmEventDto— mirrorsCore.AlarmHistorian.AlarmHistorianEventHistorianConnectivityStatusNotification— Host pushes proactively when the SDK session drops so/alarms/historianflips red without waiting for the next drain cycleMessageKindadditions:0x80HistorianAlarmEventRequest/0x81HistorianAlarmEventResponse/0x82HistorianConnectivityStatusTests — 14/14
SqliteStoreAndForwardSinkTestscovers:Totals
Full Phase 7 tests: 160 green (63 Scripting + 36 VirtualTags + 47 ScriptedAlarms + 14 AlarmHistorian). Stream G wires the IPC contracts into the real Galaxy.Host pipe handler.