module Dasht
Dasht::List
- Simple list structure following properties:
-
Fast writes. Appends to a list.
-
Fast reads by index. Indexed by position in the list.
-
Fast deletes that preserve indexes. Removes items from the front of the list.
-
Simple (but not necessarily fast) aggregation. Enumerate values between pointers.
The Dasht::List
structure is formed using a Ruby Array
(values), plus a counter of how many items have been deleted (offset). Whenever data is deleted from the head of the list, the offset is incremented.
Dasht::Metric
- Simple in-memory time-series data structure with the following properties:
-
Sparse. Only stores time stamps for intervals with known data, and only stores one timestamp per interval.
-
Flexible aggregation using Ruby blocks during both read and write.
-
Read values between two timestamps.
The Dasht::Metric
structure is formed using two Dasht::List
objects. One object tracks data, the other object tracks a list of checkpoints and their corresponding index into the data.