Re: Images store in Cassandra

2009-12-13 Thread Mark Robson
2009/12/13 Tatu Saloranta tsalora...@gmail.com

 On Sat, Dec 12, 2009 at 3:08 PM, Ryan King r...@twitter.com wrote:
  On Sat, Dec 12, 2009 at 12:05 PM, Ran Tavory ran...@gmail.com wrote:
  As we're designing our systems for a move from mysql to Cassandra we're
  considering moving our file storage to Cassandra as well. Is this wise?


I'm not sure about whether it's wise. But to work around Cassandra's
limitations on bytes-per-key, you would probably have to split up large
objects into several smaller ones and store them against different keys.

This may be reasonable depending on what your application does. It will also
work (hopefully) in your favour to split the load over multiple nodes.

Mark


Re: Images store in Cassandra

2009-12-13 Thread Michael Koziarski
On Sun, Dec 13, 2009 at 9:05 AM, Ran Tavory ran...@gmail.com wrote:
 As we're designing our systems for a move from mysql to Cassandra we're
 considering moving our file storage to Cassandra as well. Is this wise?
 We're currently using mogilefs to store media items (images) of average size
 of 30Mb (400k images, and growing). Cassandra looks like a performance
 improvement over mogilefs (saves roundtrip, no sql in the middle) but I was
 wondering whether the fact that cassandra stores byte arrays should
 encourage us to store images in it. Is Cassandra a good fit?

I think that mogile would probably be a much better fit here.  While
you may save a tiny bit of round-tripping, those sql queries aren't
likely going be an appreciable percentage of the total time taken to
stream the binary out to the user.

 Has anyone had any similar experience or can send guidelines?
 To phrase the question in more general terms: What's cassandra's sweet spot
 in terms of Value size per column or total row size?
 Thanks



-- 
Cheers

Koz


Images store in Cassandra

2009-12-12 Thread Ran Tavory
As we're designing our systems for a move from mysql to Cassandra we're
considering moving our file storage to Cassandra as well. Is this wise?

We're currently using mogilefs to store media items (images) of average size
of 30Mb (400k images, and growing). Cassandra looks like a performance
improvement over mogilefs (saves roundtrip, no sql in the middle) but I was
wondering whether the fact that cassandra stores byte arrays should
encourage us to store images in it. Is Cassandra a good fit?
Has anyone had any similar experience or can send guidelines?
To phrase the question in more general terms: What's cassandra's sweet spot
in terms of Value size per column or total row size?
Thanks


Re: Images store in Cassandra

2009-12-12 Thread Ryan King
On Sat, Dec 12, 2009 at 12:05 PM, Ran Tavory ran...@gmail.com wrote:
 As we're designing our systems for a move from mysql to Cassandra we're
 considering moving our file storage to Cassandra as well. Is this wise?
 We're currently using mogilefs to store media items (images) of average size
 of 30Mb (400k images, and growing). Cassandra looks like a performance
 improvement over mogilefs (saves roundtrip, no sql in the middle) but I was
 wondering whether the fact that cassandra stores byte arrays should
 encourage us to store images in it. Is Cassandra a good fit?
 Has anyone had any similar experience or can send guidelines?
 To phrase the question in more general terms: What's cassandra's sweet spot
 in terms of Value size per column or total row size?

Large objects aren't feasible without some work:
http://issues.apache.org/jira/browse/CASSANDRA-265.

In general, if it's not suitable for a RDBMS, its probably not
suitable for Cassandra.

-ryan


Re: Images store in Cassandra

2009-12-12 Thread Tatu Saloranta
On Sat, Dec 12, 2009 at 3:08 PM, Ryan King r...@twitter.com wrote:
 On Sat, Dec 12, 2009 at 12:05 PM, Ran Tavory ran...@gmail.com wrote:
 As we're designing our systems for a move from mysql to Cassandra we're
 considering moving our file storage to Cassandra as well. Is this wise?
 We're currently using mogilefs to store media items (images) of average size
 of 30Mb (400k images, and growing). Cassandra looks like a performance
 improvement over mogilefs (saves roundtrip, no sql in the middle) but I was
 wondering whether the fact that cassandra stores byte arrays should
 encourage us to store images in it. Is Cassandra a good fit?
 Has anyone had any similar experience or can send guidelines?
 To phrase the question in more general terms: What's cassandra's sweet spot
 in terms of Value size per column or total row size?

 Large objects aren't feasible without some work:
 http://issues.apache.org/jira/browse/CASSANDRA-265.

 In general, if it's not suitable for a RDBMS, its probably not
 suitable for Cassandra.

For what it's worth, this is where something like Amazon's S3 works pretty well.
Similar key/value storage and access, but more aimed at larger
payloads (and more limited number of entries).

-+ Tatu +-