storagemodeshape

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.

  1. Alfresco uses filesystem and DB reference to FS, Apache Jackrabbit uses fs||db and Modeshape uses fs||db||nosql db(cassandra,mongo)
  2. 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.
  3. 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)
  4. 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?

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? Is mongoDB enough for developing simple file storage system with backups, versioning, reliable storage of UTF-8 documents?


Solution

  • Answer provided on JBOSS forums