-
Notifications
You must be signed in to change notification settings - Fork 85
Data model
Lazin edited this page Oct 12, 2014
·
7 revisions
Akumuli is schemaless time-series stoage engine. Every data element can be variable width and can store any data. Every data element must have timestamp.
Akumuli stores data as a three element tuples.
- First element is parameter id. This is a 64-bit value that represents value origin (or one of the dimensions). Akumuli doesn't makes any asumptions about this value format. The only limitation is - you can't use values max(uint64_t) and max(uint64_t)-1 are reserved by the system.
- Second element is timestamp. This timestamp is 64-bit unsigned integer and doesn't need to be real timestamp. This can be any increasing sequence number. Akumuli doesn't assume it to represents time in some format.
- Last parameter is payload, it consist of length value (32-bit unsigned integer) and data itself.
You can write new data elements only if timestamp is within sliding window. Depth of the sliding window is set in configuration. If you're trying to write old data - you will get AKU_ELATE_WRITE
error.
aku_Status status = aku_add_sample(db, paramId, timeStamp, data);
if (status == AKU_ELATE_WRITE) {
// value must be discarded because it's too old
}
All data in akumuli is immutable. You can't change any existing tuple element or delete it.