I have a requirement where I am getting gps data from devices every interval.
So for a given device id, I have the latitude, longitude and timestamp fields.
I need to find the latest latitude longitude for a given vehicle id.
My approach is to have primary key as (device_id, timestamp) and order it by timestamp.
Is choosing device id as partition key a good idea?
In my case, device is a virtual machine. A new one is created for every new job. The device will send its gps location till it has finished its job (typically 3-4 days) and then expire. For the next job, a new device with new device id will be created.
So, I'll have data for a given device id for 3-4 days and then nothing. Also, there are lacks of new devices created every week.
So, the only concern I have is that my number of partitions will keep increasing with time. Is that a good design for cassandra?