I’m looking for some guidance on how to model some stat tracking over time, bucketed to some type of interval (15 min, hour, etc). 

 

As an example, let’s say I would like to track network traffic throughput and bucket it to 15 minute intervals.  In our old model, using thrift I would create a column family set to counter, and use a timestamp ticks for the column name for a “total” and “count” column.  And as data was sampled, we would increment count by one, and increment the total with the sampled value for that time bucket.  The column name would give us the datetime for the values, as well as provide me with a convenient row slice query to get a date range for any given statistic.

 

Key                | 1215  | 1230 | 1245

NIC1:Total   | 100    | 56      |  872

NIC1:Count | 15      | 15      | 15

 

Then given the total/count I can show an average over time.

 

In CQL it seems like I can’t do new counter columns at runtime unless they are defined in the schema first or run an ALTER statement, which may not be the correct way to go.  So is there a better way to model this type of data with the new CQL world?  Nor do I know how to query that type of data, similar to the row slice by column name.

 

Thanks,

Bryce