title: File Storage for Web Applications: Filesystem vs DB vs NoSQL engines
body: <p>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.</p>
  
  <ul>
  <li>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).</li>
  <li>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.</li>
  <li>I will be adding some other jobs which need to access the files from other service to perform additional tasks (e.g. indexing in Solr, generating thumbnails, movie format conversion), so I need to get at the files remotely.  Doing this over network shares seems dodgy...</li>
  <li>Dealing with permissions on the filesystem as sometimes given us problems in the past, although now that we've moved to a pure Linux environment this should be less of an issue.</li>
  </ul>
  
  <p>So, my main questions are</p>
  
  <ul>
  <li>What are the downsides of storing files as BLOBs in MySQL?</li>
  <li>Do the same problems exist with NoSQL systems like Cassandra?</li>
  <li>Does anyone have any other suggestions that might be appropriate, e.g. MogileFS, etc?</li>
  </ul>