Time series pattern

In an IoT application with Cassandra as the data store, a time series can be modeled with the timestamp or timeuuid data types in conjunction with an appropriate data type for the data points. Corresponding to each data point, a time data type is to be used. In this design pattern, a timestamp or timeuuid data type column must not be used as the single partition key because there will be only one data point per row. There should be at least one associated timestamp or timeuuid for each of the data points. It is ideal to choose a meaningful partition key so that the Cassandra CQL queries return data points in a given period without reading multiple rows. It is ideal to store all the most commonly needed records in one big row ...

Get Cassandra Design Patterns - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.