MangoAutomation / ma-core-public

Mango Automation Core public code
Other
78 stars 50 forks source link

Event System Review #759

Open terrypacker opened 8 years ago

terrypacker commented 8 years ago

The events system is going to cause problems on very large scale systems. We need to discuss the ramifications of removing the user events logic and combining into 1 table with event permissions.

Considerations:

terrypacker commented 8 years ago

Additional notes:

  1. I think Events from Event detectors need to be some how separated from other types of events.
  2. For event detectors we could do something interesting like using the TinyTSDB to store a history for each alarm. This history could include various states like (Active, Inactive, Silenced, Acknowledged, Enabled, Disabled) We could store multiple individual time series for each one of these properties and then have the benefit of getting quick statistics on it.

2a. In the UI for event detectors we don’t always need a list of every single time the event was raised and rather could show a list of unique events and the number of active / unacknowledged events.

2b. For Event Detectors we generally want to be able to sort them by some kind of device grouping, point hierarchy or device name query. For this reason we need additional information and if Event detectors where more like data points where they have properties and then a history we could use them in the UI via the API much like data points.

  1. More thought needs to go into all the other types of events but I think they would all go into System events. This would include Data Source events, System Events and Publisher events and any other general types of events. We could however move all or some of these into the database event method. Maybe Scheduled events should be stored like Event Detectors.
  2. Other general Alarm / Event features needed:

We should be able to bind a set point of the detector to another data points value In the UI and Angular we should be able to bind the status of an event to a UI element like a indicator on the screen. Users should be able to silence alarms for X period of time for all users. All these actions should have permissions to only users in a permission group can perform the action. Event detectors need a duration to be come active and a duration to become inactive (already have a git issue for this)