Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread DuyHai Doan
You get it :D This is the real issue. However it's quite an extreme case. If you can guarantee that there will be a minimum X articles per day and per country, the maximum number of request to fetch 100 articles will be bounded. Furthermore, do not forget that SELECT statement using a partition

Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread SEGALIS Morgan
Oh yeah, I though about it, even raised the reflexion on the first mail, "Let's say I want to show only 100 of the newer articles, I'll get the today's articles, and if it does not fill the request (too few articles), I'll check the day before that, etc..." but your answer raised another issue I

Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread DuyHai Doan
well, if the current day bucket does not contain enough article, you may need to search back in the previous day. If the previous day does not have any article, you may need to go back time a day before ... and so on ... Of course it's a corner case but I've seen some code that misses this scenar

Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread SEGALIS Morgan
Hi DuyHai, if there is 0 article, the row will obviously not exist I guess... (no article insertion will create the row) What is bugging you exactly ? 2015-01-22 20:33 GMT+01:00 DuyHai Doan : > Hello Morgan > > The data model looks reasonable. Bucketing by day will help you to scale. > The only

Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread DuyHai Doan
Hello Morgan The data model looks reasonable. Bucketing by day will help you to scale. The only thing I can see is how to go back in time to fetch articles from previous buckets (previous days). It is possible to have 0 article for a country for a day ? On Thu, Jan 22, 2015 at 8:23 PM, SEGALIS

Re: Cassandra row ordering best practice Modeling

2015-01-22 Thread SEGALIS Morgan
Sorry, I copied/pasted the question from another platform where you don't generally say hello, So : Hello everyone, 2015-01-22 20:19 GMT+01:00 SEGALIS Morgan : > I have a column family that store articles. I'll need to get those > articles from the most recent to the oldest, getting them from C

Cassandra row ordering best practice Modeling

2015-01-22 Thread SEGALIS Morgan
I have a column family that store articles. I'll need to get those articles from the most recent to the oldest, getting them from Country, and of course the ability to limit the number of fetched articles. I though about another ColumnFamily "ArticlesByDateAndCountry" with dynamic columns The Key