The MongoDB can be used to store large files easily. In fact, it has quite a few advantages over a traditional filesystem. Mongo has no problems storing millions of files. You can access the files from any machine easily. Plus you can do advanced queries to locate files and replicate your fileset easily. You can store your files in a redundant “highly available” MongoDB cluster.
With all those advantages, why not plug this capability into Liferay? This will give you the power and flexibility of a MongoDB backing Liferay’s Documents and Media storage. You can easily setup Liferay clusters without dealing with an HA NFS server or SAN mount. You will have a highly available MongoDB FileStore for Liferay.
There’s currently a Liferay MongoDB FileStore plugin in the Liferay marketplace. Unfortunately, it is only available for the Liferay 6.1 version. I deployed it into my 6.2 environment and it did not work. Without too much effort, I ported the Ant EXT plugin from Liferay 6.1 to a Liferay 6.2 maven plugin. After some testing I fixed a couple issues with the logic to verify if the file exists, and then we were up and running.
Using MongoDB for file storage works very well. I can upload documents into Liferay and browse/search the MongoDB instance and see all of my documents. Stay tuned for another blog on this topic soon. I’m compiling a list of feature enhancements that will make this Liferay/MongoDB integration even better.