module Dasht

Dasht::List - Simple list structure following properties:

  1. Fast writes. Appends to a list.

  2. Fast reads by index. Indexed by position in the list.

  3. Fast deletes that preserve indexes. Removes items from the front of the list.

  4. 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:

  1. Sparse. Only stores time stamps for intervals with known data, and only stores one timestamp per interval.

  2. Flexible aggregation using Ruby blocks during both read and write.

  3. 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.