sia*_*one 19 data-storage file-storage cassandra nosql
我正在开发一个PHP平台,它将大量使用图像,文档和任何文件格式,这些都会在我脑海中浮现,所以我想知道Cassandra是否是我需要的好选择.
如果没有,你能告诉我应该如何存储文件吗?我想继续使用cassandra,因为它具有容错能力,并且在节点之间使用自动复制.
感谢帮助.
sbr*_*ges 13
Cassandra's public API is based on Thrift, which offers no streaming abilities
any value written or fetched has to fit in memory. This is inherent to Thrift's
design and is therefore unlikely to change. So adding large object support to
Cassandra would need a special API that manually split the large objects up
into pieces. A potential approach is described in http://issues.apache.org/jira/browse/CASSANDRA-265.
As a workaround in the meantime, you can manually split files into chunks of whatever
size you are comfortable with -- at least one person is using 64MB -- and making a file correspond
to a row, with the chunks as column values.
Run Code Online (Sandbox Code Playgroud)
因此,如果您的文件<10MB,您应该没问题,只需确保限制文件大小,或将大文件分成块.
您应该可以使用10MB的文件.事实上,如果我没有弄错的话,DataStax Brisk会将文件系统置于Cassandra之上:http://www.datastax.com/products/enterprise.
(我不会以任何方式与他们联系 - 这不是广告)