cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Narayan <ady...@gmail.com>
Subject Sorting in time order without using TimeUUID type column names
Date Thu, 03 Feb 2011 10:27:07 GMT
Hey all,

I want to store some columns that are reminders to the users on my
application, in time sorted order in a row(timeline row of the user).

Would it be recommended to store these reminder columns in the
timeline row with column names like: combination of timestamp(of time
when the reminder gets due) + UserId+ Reminders Count of that user;
Column Name= <TimestampOfDueTimeInFuture>: <UserId> : <ReminderCountOfThisUser>

Then what comparator could I use to sort them in order of the their
due time ? This comparator should be able to sort no. in descending
order.(I guess ascii type would do the opposite order) (Reminders need
to be sorted in the timeline in the order of their due time.)

Basically I am trying to avoid 16 bytes long timeUUID first because
they are too long and the above defined key pattern is guaranteeing me
a unique key/Id for the reminder row always.


Thanks
Aditya Narayan

Mime
View raw message