Potential problem loading bursts of changes in the Display
Closed this issue · 0 comments
Description
The Webserver notifies changes instantly to the Display, and also, as a safety measure, it sends all the Alarms every 10 seconds. This allows, instant update of changes in alarms.
This scheme works fine, however, there are cases when bursts of multiple changes with a high frequency produce brief glitches in the ias-display, were the web application freezes for a couple of seconds.
Steps to reproduce
-
Run the application with the docker-compose-ias-run.yml file in integration-tools/docker/dev (follow instructions in the README).
-
Stop the mock-kafka-publisher service by running:
docker-compose -f docker-compose-ias-run.yml stop mock-kafka-publisher
-
Wait until the Antennas alarms get invalid in the Display, and then restart the mock:
docker-compose -f docker-compose-ias-run.yml start mock-kafka-publisher
-
Try clicking in components and navigating through the application while the Alarms arrive again
You will see the application tends to freeze for a couple of seconds until everything is stable again.
Possible issue
This is not something that should happen too frequently (stopping and triggering of plugins that sends many monitor points). However, there could be cases where multiple and frequent changes are triggered due to system failures or other causes.
Possible solution
This could be improved by adding queues or buffers for the changes. For example, receiving updates in real time, but sending all the changes in the buffer with a predefined frequency (e.g. 500ms)
This could be done, either in (or in both):
-
ias-webserver: a buffer could be added before sending updates to the Display, sending less updates with more alarms rather than 1 update per modified alarm. For more details see this issue: IntegratedAlarmSystem-Group/ias-webserver#47
-
ias-display: a buffer could be added between receiving updates from the Webserver and updating the Display's internal alarms data structure. For more details see this issue: https://github.com/IntegratedAlarmSystem-Group/ias-display/issues/new