incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ethan Rowe <>
Subject Re: What's the best modeling approach for ordering events by date?
Date Thu, 14 Apr 2011 19:49:59 GMT
How do you plan to read the data?  Entire histories, or in relatively
confined slices of time?  Do the events have any attributes by which you
might segregate them, apart from time?

If you can divide time into a fixed series of intervals, you can insert
members of a given interval as columns (or supercolumns) in a row.  But it
depends how you want to use the data on the read side.

On Thu, Apr 14, 2011 at 12:25 PM, Guillermo Winkler <> wrote:

> I have a huge number of events I need to consume later, ordered by the date
> the event occured.
> My first approach to this problem was to use seconds since epoch as row
> key, and event ids as column names (empty value), this way:
> EventsByDate : {
>     SecondsSinceEpoch: {
>         evid:"", evid:"", evid:""
>     }
> }
> And use OPP as partitioner. Using GetRangeSlices to retrieve ordered events
> secuentially.
> Now I have two problems to solve:
> 1) The system is realtime, so all the events in a given moment are hitting
> the same box
> 2) Migrating from cassandra 0.6 to cassandra 0.7 OPP doesn't seem to like
> LongType for row keys, was this purposedly deprecated?
> I was thinking about secondary indexes, but it does not assure the order
> the rows are coming out of cassandra.
> Anyone has a better approach to model events by date given that
> restrictions?
> Thanks,
> Guille

View raw message