Variables History
Context variable values are frequently updated. The values can be manually modified by human operators or changed by autonomous system components (such as scheduled jobs). In the simplest case, new values are received from hardware devices during synchronization.
Once value of a context variable has been changed, Iotellect Server can optionally keep its old value to allow tracking historical changes of the variable.
The historical values can be later used for:
Displaying historical trends on charts (such as last day temperature chart)
Building reports (such as monthly fuel consumption report)
Exporting them to third-party systems
![]() | Detailed information on working with variable history is available in Working with Historical Events/Values section. |
Raw History vs Statistics
Iotellect Server provides two ways to preserve historical values:
Storing raw history in a "classic" NoSQL or relational database (see server database)
Storing aggregated history in a round-robin database (see statistics module)
Each of these methods has its own pros and cons.
Raw History
In the "raw history" storage mode, every historical value of a variable is stored as a separate entity within the server database.
Pros of this method:
Full precision of old values, regardless to the sampling rate
Cons of this method:
Larger volume of historical data
Slower storage
Slower retrieval of historical values, especially if loading samples collected during a long time frame
Statistics
When variable history is stored in the statistical round-robin database, its old values are not kept "as is". Instead, server calculates a numeric "aggregate" of every value and uses it to calculate hourly/daily/weekly/monthly/yearly averages, minimums and maximums.
Pros of this method:
Compact storage of historical data
Size of preserved historical values does not increase with time
Fast storage
Extremely fast access to historical values, regardless of the time frame length
Cons of this method:
Only aggregated historical values are available, the original "raw" values are not saved
Precision of calculated aggregates decreases with time
Was this page helpful?