Forum OpenACS Improvement Proposals (TIPs): Tip #59 (Implemented) Change default behavior to store files in file system

I had this conversation with a couple of people, most recently with Cato from Bergen.  They saw their database growing due to the files from file storage.  At first they were confused and then they had to do a lot of effort to move to store the files in the file system.  We at Sloan also have the problem that our database is getting very big and have to take care of switching.

I'm wondering, should we change the default to store the files in the file system instead of the database.

Thanks,
Tracy

Just to refresh memories on the pros and cons of storing file storage items in the file system ...

Pro

  • Considerably improved performance, especially with PostgreSQL, with large files, and with AOLserver 4.

Con

  • You need to back up both filesystem and database, and there's a risk of inconsistency between the two.

In the past, the fact that backups might be inconsistent have led us to store files in the database by default. However, those with large installations and large numbers of users seem to universally find the performance issue to be of more importance.

How does the risk of inconsitency really affect the site.

Option 1): There is a file backed up whose revision_id in the database has not been recorded. You loose the file, but have it on disk lingering around and it might be restored.

Option 2): There is a file recorded in the database, but it is no longer there. In this case you can ask the users to upload their files again (wording: "If you uploaded the file within the last @backup_interval@, please revisit our site as it might have been lost").

Though agreeing with Don's caution, I don't think it matters so gravely to have our users go through the experience of storing all the files in the database.

Approve.

Approve
approve
Also, if someone has written code to move a file-storage
instance to storing in the filesystem it would be useful
to pull that in to the admin functionality for file-storage.
I wasn't stating any personal caution, just pointing out the pro/con argument.  I personally approve of the change, but wanted to state the pro/con sides objectively without giving my opinion...
I made this change on both oacs-5-1 and HEAD.