You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Héctor Izquierdo Seliva <iz...@strands.com> on 2010/10/20 12:55:15 UTC

Would it be possible to do a ColumnCache?

Hi. Before wasting time in something that might not be feasible at the
moment, I wanted to ask the devs if a column cache would be possible
(instead of a whole row cache). This would allow users with fat rows to
also use a cache and reduce latency for hot data.

If this is possible, i'd appreciate some hints about where to dig.

Thanks for your time!


Re: Would it be possible to do a ColumnCache?

Posted by Héctor Izquierdo Seliva <iz...@strands.com>.
When I say "rows in the slice" I mean "columns in the slice", sorry for
the typo.

El jue, 21-10-2010 a las 17:44 +0200, Héctor Izquierdo Seliva escribió:
> El jue, 21-10-2010 a las 00:02 -0500, Jonathan Ellis escribió:
> > I don't think it's possible.  Cassandra's data model means you can't
> > know what columns are present in a row, so if you query, say, name and
> > birthdate from your users column family and only the name column is in
> > the cache for the row you are querying, does that mean that birthdate
> > doesn't exist in that row?  Or just that it's not cached?  You don't
> > know, so you'd have to do a full read every time.  Similar
> > difficulties arise with slices.
> 
> I was thinking in a column cache to be used when you need a slice of a
> row, where you'd ask the cache for all the rows in the slice, and then
> read from disk whichever rows weren't in cache. If the columns you want
> don't exist, you still hit the disk, but you get a nice speedup for
> existing columns. 
> 
> If you want write-through cache then things complicate a bit, but it
> should be doable.
> 
> The question is, would the performance improvement justifies the
> increase in complexity?
> 
> 
> 
> > 
> > 2010/10/20 Héctor Izquierdo Seliva <iz...@strands.com>:
> > > Hi. Before wasting time in something that might not be feasible at the
> > > moment, I wanted to ask the devs if a column cache would be possible
> > > (instead of a whole row cache). This would allow users with fat rows to
> > > also use a cache and reduce latency for hot data.
> > >
> > > If this is possible, i'd appreciate some hints about where to dig.
> > >
> > > Thanks for your time!
> > >
> > >
> > 
> > 
> > 
> 
> 



Re: Would it be possible to do a ColumnCache?

Posted by Héctor Izquierdo Seliva <iz...@strands.com>.
El jue, 21-10-2010 a las 00:02 -0500, Jonathan Ellis escribió:
> I don't think it's possible.  Cassandra's data model means you can't
> know what columns are present in a row, so if you query, say, name and
> birthdate from your users column family and only the name column is in
> the cache for the row you are querying, does that mean that birthdate
> doesn't exist in that row?  Or just that it's not cached?  You don't
> know, so you'd have to do a full read every time.  Similar
> difficulties arise with slices.

I was thinking in a column cache to be used when you need a slice of a
row, where you'd ask the cache for all the rows in the slice, and then
read from disk whichever rows weren't in cache. If the columns you want
don't exist, you still hit the disk, but you get a nice speedup for
existing columns. 

If you want write-through cache then things complicate a bit, but it
should be doable.

The question is, would the performance improvement justifies the
increase in complexity?



> 
> 2010/10/20 Héctor Izquierdo Seliva <iz...@strands.com>:
> > Hi. Before wasting time in something that might not be feasible at the
> > moment, I wanted to ask the devs if a column cache would be possible
> > (instead of a whole row cache). This would allow users with fat rows to
> > also use a cache and reduce latency for hot data.
> >
> > If this is possible, i'd appreciate some hints about where to dig.
> >
> > Thanks for your time!
> >
> >
> 
> 
> 



Re: Would it be possible to do a ColumnCache?

Posted by Jonathan Ellis <jb...@gmail.com>.
I don't think it's possible.  Cassandra's data model means you can't
know what columns are present in a row, so if you query, say, name and
birthdate from your users column family and only the name column is in
the cache for the row you are querying, does that mean that birthdate
doesn't exist in that row?  Or just that it's not cached?  You don't
know, so you'd have to do a full read every time.  Similar
difficulties arise with slices.

2010/10/20 Héctor Izquierdo Seliva <iz...@strands.com>:
> Hi. Before wasting time in something that might not be feasible at the
> moment, I wanted to ask the devs if a column cache would be possible
> (instead of a whole row cache). This would allow users with fat rows to
> also use a cache and reduce latency for hot data.
>
> If this is possible, i'd appreciate some hints about where to dig.
>
> Thanks for your time!
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com