Re: Data Modeling Conundrum

2010-05-10 Thread William Ashley
Yeah, I intentionally didn't mention the expected data set size, hoping I could find a more elegant solution that would work both in the small N and large N cases. In any case, I appreciate the recommendations. When I get some time I am interested in looking at the source and figuring out wheth

Re: Data Modeling Conundrum

2010-05-08 Thread Ed Anuff
I was thinking it was going to be a lot more than that, you might want to consider just storing them all as a single serialized array of timestamps and uuids. By my math, you could fit up to 40 uuid/timestamp pairs for under 1K. Then you'd just store something like this: // Row key is userId 123

Re: Data Modeling Conundrum

2010-05-08 Thread William Ashley
That is a good question, because realistically I see N being under 10, and there are no current plans to make use of a large historical record. I could have the update process pull all columns and issue deletes as necessary such that only M (M >= N) are kept. Thanks for the inspiration. On Ma

Re: Data Modeling Conundrum

2010-05-08 Thread Ed Anuff
Sorry, missed that. I'm not sure if there's a cleaner way than using the approaches you've looked at, hopefully someone else has an answer. How big is N and do you need to keep more than N around? On Sat, May 8, 2010 at 10:26 AM, William Ashley wrote: > This would be a solution if I wanted to

Re: Data Modeling Conundrum

2010-05-08 Thread William Ashley
This would be a solution if I wanted to get the N most recently CREATED guids, but I'm interested in the most recently SEEN guids. On May 8, 2010, at 10:00 AM, Ed Anuff wrote: > Is there a reason you can't use time-based guids? Those would be sorted the > way you wanted. > > On Fri, May 7, 20

Re: Data Modeling Conundrum

2010-05-08 Thread Ed Anuff
Is there a reason you can't use time-based guids? Those would be sorted the way you wanted. On Fri, May 7, 2010 at 8:31 PM, William Ashley wrote: > > Hopefully I’ve sufficiently explained what I’m trying to do. Now on to > solving this problem in Cassandra. I’ve been trying to find a way that >

Re: Data Modeling Conundrum

2010-05-08 Thread William Ashley
Daniel, Partitioning applies to row keys, not column sorting. You could take both of my Cassandra solutions and refactor them to use row keys containing userId:time or userId:guid, but you ultimately wind up with the same compromises on update or retrieval efficiency, plus then you have to use a

Re: Data Modeling Conundrum

2010-05-07 Thread vineet daniel
Query : Why are you sorting AFAIK cassandra sorts the keys by itself if you are using ordered partitioning. And how do you store data pertaining to single user but having several GUID's to attach with. ___ Vineet Daniel ___