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 if possible as this will make the data access faster. Since Cassandra stores the data points in a column family in the sorted order as per the partition key, primary key, and clustering column specifications, the retrieval pattern must be decided...