Notifications are messages that are sent to users. There several concerns when processing a notification:
For now, we assume all notifications will be handled on a single SIOT instance (typically in the cloud) -- distributed aspects of notifications will implemented later.
Notifications can be initiated by:
Elsewhere in the system, configuration and sensor data are represented as Points. The Point data structure is optimized for synchronization and algorithms where simplicity and consistency allows us to easily process points with common code. But a Point does not have enough fields to represent a message or notification. We could encode the message as JSON in the Point text field, but it would be nice to have something a little more descriptive. Additionally, all notifications and messages should be stored in the time series database so there is a history of everything that was sent.
Time series databases like InfluxDB store records with the following attributes:
Notifications will be handled by two data structures:
Notifications are initiated (as is all write data in the system) by sending a message through NATS. The typical flow is as follows:
rule -> notification -> msg