Web应用程序的文件存储:文件系统与数据库与NoSQL引擎

El *_*obo 31 mysql database web-applications file nosql

I have a web application that stores a lot of user generated files. Currently these are all stored on the server filesystem, which has several downsides for me.

  • When we move "folders" (as defined by our application) we also have to move the files on disk (although this is more due to strange design decisions on the part of the original developers than a requirement of storing things on the filesystem).
  • It's hard to write tests for file system actions; I have a mock filesystem class that logs actions like move, delete etc, without performing them, which more or less does the job, but I don't have 100% confidence in the tests.
  • 我将添加一些其他需要从其他服务访问文件以执行其他任务的作业(例如在Solr中编制索引,生成缩略图,电影格式转换),因此我需要远程获取文件.通过网络共享做这件事似乎很狡猾......
  • 处理文件系统的权限有时在过去给我们带来了问题,虽然现在我们已经转移到纯Linux环境,但这应该不是问题.

所以,我的主要问题是

  • 在MySQL中将文件存储为BLOB有什么缺点?
  • 像Cassandra这样的NoSQL系统存在同样的问题吗?
  • 有没有人有任何其他适当的建议,例如MogileFS等?

Pas*_*ent 7

不是一个直接的答案,而是指向非常有趣和某种类似问题的指针(是的,它们是关于斑点和图像,但这是IMO可比的).

在MySQL中将文件存储为BLOB有什么缺点?

像Cassandra这样的NoSQL系统存在同样的问题吗?

PS:我不想成为killjoy,但我认为任何NoSQL解决方案都不会解决你的问题(NoSQL对大多数企业来说都无关紧要).