Currently, LQD-DAQ relies on HTTP polling (GET /snapshot) to retrieve telemetry. At a hardware acquisition rate of 500 Hz, polling creates network overhead and potential latency affecting safety monitoring.
So, guessed solution instead of websockets would be SSE i.e.:
Prototype and implement a unidirectional Server-Sent Events (SSE) stream. This allows the DAQ to "push" fresh sensor snapshots to the dashboard immediately upon processing, rather than waiting for the client to ask for them.
This should maintain all currently added safety-related changes (e.g., reporting hardware 'stale' during reconnection). On basic example look up, probably would add /stream endpoint for asynchronous generator + have engine.py trigger a broadcast event per batch processed (should be down sampled for GUI stability, one of the main benefits).
Current test model may fail b/c of new 'persistent' connection model.
And considering SDEC-API related stuff, should consider a telemetry envelope of some kind:
{
"origin": "LQD-DAQ",
"version": "1.0",
"timestamp": 1783957108.38,
"payload": {
"PC": 101325.0,
"POT": 1723689.5,
"is_stale": false
}
}
For uniformity, versioning, or, at the bare, useful for consideration.
TL;DR:
Modify api.py & likely engine.py.
Probably going to bork the test suite.
Basically, see and prototype the extent that SSE would be useful for DAQ communication.
Currently, LQD-DAQ relies on HTTP polling (GET
/snapshot) to retrieve telemetry. At a hardware acquisition rate of 500 Hz, polling creates network overhead and potential latency affecting safety monitoring.So, guessed solution instead of websockets would be SSE i.e.:
Prototype and implement a unidirectional Server-Sent Events (SSE) stream. This allows the DAQ to "push" fresh sensor snapshots to the dashboard immediately upon processing, rather than waiting for the client to ask for them.
This should maintain all currently added safety-related changes (e.g., reporting hardware 'stale' during reconnection). On basic example look up, probably would add
/streamendpoint for asynchronous generator + haveengine.pytrigger a broadcast event per batch processed (should be down sampled for GUI stability, one of the main benefits).Current test model may fail b/c of new 'persistent' connection model.
And considering SDEC-API related stuff, should consider a telemetry envelope of some kind:
{ "origin": "LQD-DAQ", "version": "1.0", "timestamp": 1783957108.38, "payload": { "PC": 101325.0, "POT": 1723689.5, "is_stale": false } }For uniformity, versioning, or, at the bare, useful for consideration.
TL;DR:
Modify
api.py& likelyengine.py.Probably going to bork the test suite.
Basically, see and prototype the extent that SSE would be useful for DAQ communication.