You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Aditya Narayan <ad...@gmail.com> on 2011/03/08 07:12:03 UTC

Splitting the data of a single blog into 2 CFs (to implement effective caching) according to views.

My application  displays list of several blogs' overview data (like
blogTitle/ nameOfBlogger/ shortDescrption for each blog) on 1st page (in
very much similar manner like Digg's newsfeed) and when the user selects a
particular blog to see., the application takes him to that specific blog's
full page view which displays entire data of the blog.

Thus I am trying to split a blog's data in *two rows*, in two **different
CFs ** (one CF is row-cached(with less amount of data in each row) and
another(with each row having entire remaining blog data) without caching).

Data for 1st page view (like titles and other overview data of a blog) are
put in a row in 1st CF. This CF is cached so as to improve the performance
of heavily read data. Only the data from cached CF is read for 1st page. The
other remaining data(bulk amount of text of blog and entire comments data)
are stored as another row in 2nd CF. For 2nd page, **rows from both of the
two CFs have to be read**. This will take two read operations.

Does this seem to be a good design ?

Re: Splitting the data of a single blog into 2 CFs (to implement effective caching) according to views.

Posted by Aditya Narayan <ad...@gmail.com>.
Yes Aaron I thought about that but that doesnt seem to be just a small
amount of data either (contains text), but yes we can consider to do so
later as we find the need for it..

Thank you both!



On Tue, Mar 8, 2011 at 2:25 PM, aaron morton <aa...@thelastpickle.com>wrote:

> You could duplicate the data from CF1 in CF2 as well (use a batch_mutation
> through whatever client you have). So when serving the second page you only
> need to read one row from CF2.
>
>
> Aaron
>
> On 8/03/2011, at 8:13 PM, Norman Maurer wrote:
>
> Yeah this make sense as far as I can tell.
>
>
> Bye,
> Norman
>
>
> 2011/3/8 Aditya Narayan <ad...@gmail.com>
>
>>
>> My application  displays list of several blogs' overview data (like
>> blogTitle/ nameOfBlogger/ shortDescrption for each blog) on 1st page (in
>> very much similar manner like Digg's newsfeed) and when the user selects a
>> particular blog to see., the application takes him to that specific blog's
>> full page view which displays entire data of the blog.
>>
>> Thus I am trying to split a blog's data in *two rows*, in two **different
>> CFs ** (one CF is row-cached(with less amount of data in each row) and
>> another(with each row having entire remaining blog data) without caching).
>>
>> Data for 1st page view (like titles and other overview data of a blog) are
>> put in a row in 1st CF. This CF is cached so as to improve the performance
>> of heavily read data. Only the data from cached CF is read for 1st page. The
>> other remaining data(bulk amount of text of blog and entire comments data)
>> are stored as another row in 2nd CF. For 2nd page, **rows from both of the
>> two CFs have to be read**. This will take two read operations.
>>
>> Does this seem to be a good design ?
>>
>
>
>

Re: Splitting the data of a single blog into 2 CFs (to implement effective caching) according to views.

Posted by aaron morton <aa...@thelastpickle.com>.
You could duplicate the data from CF1 in CF2 as well (use a batch_mutation through whatever client you have). So when serving the second page you only need to read one row from CF2. 


Aaron

On 8/03/2011, at 8:13 PM, Norman Maurer wrote:

> Yeah this make sense as far as I can tell.
> 
> 
> Bye,
> Norman
> 
> 
> 2011/3/8 Aditya Narayan <ad...@gmail.com>
> 
> My application  displays list of several blogs' overview data (like blogTitle/ nameOfBlogger/ shortDescrption for each blog) on 1st page (in very much similar manner like Digg's newsfeed) and when the user selects a particular blog to see., the application takes him to that specific blog's full page view which displays entire data of the blog. 
> 
> Thus I am trying to split a blog's data in *two rows*, in two **different CFs ** (one CF is row-cached(with less amount of data in each row) and another(with each row having entire remaining blog data) without caching).
> 
> Data for 1st page view (like titles and other overview data of a blog) are put in a row in 1st CF. This CF is cached so as to improve the performance of heavily read data. Only the data from cached CF is read for 1st page. The other remaining data(bulk amount of text of blog and entire comments data)  are stored as another row in 2nd CF. For 2nd page, **rows from both of the two CFs have to be read**. This will take two read operations.
> 
> Does this seem to be a good design ?
> 


Re: Splitting the data of a single blog into 2 CFs (to implement effective caching) according to views.

Posted by Norman Maurer <no...@apache.org>.
Yeah this make sense as far as I can tell.


Bye,
Norman


2011/3/8 Aditya Narayan <ad...@gmail.com>

>
> My application  displays list of several blogs' overview data (like
> blogTitle/ nameOfBlogger/ shortDescrption for each blog) on 1st page (in
> very much similar manner like Digg's newsfeed) and when the user selects a
> particular blog to see., the application takes him to that specific blog's
> full page view which displays entire data of the blog.
>
> Thus I am trying to split a blog's data in *two rows*, in two **different
> CFs ** (one CF is row-cached(with less amount of data in each row) and
> another(with each row having entire remaining blog data) without caching).
>
> Data for 1st page view (like titles and other overview data of a blog) are
> put in a row in 1st CF. This CF is cached so as to improve the performance
> of heavily read data. Only the data from cached CF is read for 1st page. The
> other remaining data(bulk amount of text of blog and entire comments data)
> are stored as another row in 2nd CF. For 2nd page, **rows from both of the
> two CFs have to be read**. This will take two read operations.
>
> Does this seem to be a good design ?
>