What is exact ModeShape advantages over writing own mongodb storage?
jbossastana Aug 7, 2015 5:46 AMCross post from http://stackoverflow.com/questions/31847986/what-is-exact-modeshape-advantages-over-writing-own-mongodb-storage
I'm going to develop file storage system. Mainly I will store text documents. I read many questions and answers and got some information about file management systems on top of which I may develop my own.
- Alfresco uses filesystem and DB reference to FS, Apache Jackrabbit uses fs||db and Modeshape uses fs||db||nosql db(cassandra,mongo)
- Blobs are slower than FS especially in dealing with large files (>1MB) but blobs more reliable and provide backup,migration, consistency support out of box. As I don't want to store many large files the performance difference between fs and blob became blurred.
- I decided to store blob not in relational DB but in mongo db, because
- mongodb has GridFS under the hood, which provides chunked processing of binary data, replication between servers out of box;
- mongodb good for storing key/value which is docid/blob in my case;
- AFAIK, facebook uses mongo db for storing images and media (but they merge many files to one blob)
- Many CMS systems like Magnolia, Hippo CMS and LogocalDOC based on Jacrabbit which may only provide FS||DB and don't relevant for me as I want mongodb. Alfresco is too cumbersome for my small requirements ans also doesn't support nosql DB and I decided to choose ModeShape.
Question: What is exact profit of using Modeshape instead of simply creating own small web app and directly write to mongodb and gain benefits of GridFS?
The only answer from myself is that Modeshape also comes with bundled Lucene engine for indexed search. I'm not sure about versions of documents - does it specially written in Modeshape or I can simply rely on mongodb to deal with this task? Does modeshape provide additional mechanisms to provide integrity of data and reliable storage or it simply relies on underlying database? Does modeshape use GridGS when connect to mongoDB store or I should turn on this option?
I also would like to use file storage system as REST service under JBOSS Keycloak and not sure is it possible to put Modeshape under Keycloak. So, my question is should I develop own app and thus gain flexible develop, integrate it with mongoDB, put it under Keycloak and other custom wishes or I should use Modeshape and gain some advantages? What is that advantages? Will it really decrease code amount from my side?