incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AJ ...@dude.podzone.net>
Subject Re: Storing files in blob into Cassandra
Date Thu, 23 Jun 2011 04:29:32 GMT
On 6/22/2011 1:07 AM, Damien Picard wrote:
> Hi,
>
> I have to store some files (Images, documents, etc.) for my users in a 
> webapp. I use Cassandra for all of my data and I would like to know if 
> this is a good idea to store these files into blob on a Cassandra CF ?
> Is there some contraindications, or special things to know to achieve 
> this ?
>
> Thank you
>
> -- 
> Damien Picard
> Axeiya Services : http://axeiya.com/
> gwt-ckeditor : http://code.google.com/p/gwt-ckeditor/
> Mon livre sur GWT : http://axeiya.com/index.php/ouvrage-gwt.html
>

I was thinking of doing the same thing.  But, to compensate for the 
bandwidth usage during the read, I was hoping to find a way for the 
httpd or app server to cache the file either in RAM or on disk so 
subsequent reads could just reference the in-mem cache or local hdd.  I 
have big data requirements, so duplicating the storage of file blobs by 
adding them to the hdd would almost double my storage requirements.  So, 
the hdd cache would have to be limited with the LRU removed periodically.

I was thinking about making the key for each file be a relative file 
path as if it were on disk.  This same path could also be used as it's 
actual location on disk in the local disk cache.  Using a path as the 
key makes it flexible in many ways if I ever change my mind and want to 
store all files on disk, or when backing-up or archiving, etc..

But, I'm rusty on my apache http knowledge but I also thought there was 
an apache cache mod that would use both ram and disk depending on the 
frequency of use.  But, I don't know if you can tell it to "cache this 
blob like it's a file".

Just some thoughts.

Mime
View raw message