I have to develop an offline application with the following functionalities:

  1. Have a login interface, which means I have to handle access roles.
  2. An interface that allow users to add documents with specific metadata. Thoses documents have to stay in the local file system, for security reasons.
  3. Allow a user to search for a document with specific filters (how can I analyse, index thoses data such PDF, word, etc.).
  4. Allow the user to copy, past and save the documents.
  5. Ensure the migration of the data (documents).

My questions:

  • Which architecture will be most useful (n-tier MVC web application using Java, with )?
  • Should I use a search engine (ElasticSearch, Solr, Lucene) since I have thousands of documents, or just a RDBMS (MySQL) or NoSQL DB (like MongoDB) which will point to my file system that contains my documents?
  • Should I use HADOOP, since it is an offline app?
  • Why have you reverted my edit?
    – unor
    Nov 7, 2015 at 14:24
  • I'm sorry I was thinking that I accepted it!
    – Naou
    Nov 7, 2015 at 14:28
  • Okay, np; I rolled it back. -- Did you miss some words after the "with" in "n-tier MVC web application using Java, with "?
    – unor
    Nov 7, 2015 at 14:29

1 Answer 1


"Should I use search engine?"

Absolutely. While all databases allow some sort of full text search, it is your key feature (as far as I got it), so you should use the best of breed. I have made good experiences with ElasticSearch and elasticsearch-mapper-attachments.

As for backend storage: the elasticsearch-mongodb-river supports attachments stored in MongoDB's GridFS.

"Which architecture will be most useful?"

I don't get you here, since first you write that you have to develop an offline application and then you ask for a Web-MVC. I'll give you some notes for both.

In general, I'd suggest a 3-tier server backend, with MongoDB building tier 3, ElasticSearch in tier 2 and a REST/XMLRPC/SOAP API building the frontend, which allows you to use this service from a variety of applications. Not that you should implement some authentication and authorization here. To get this up and running at a reasonable fast time, I'd use Spring Data ElasticSearch together with spring-security. Together with Spring Data REST, this should allow you to have this setup done rather fast, provided you have some experience with Spring.

After you have this set up, you can either create a Web Application which does API calls on your search API or build some sort of Swing Application, which uses the same. Or build both. As for the Web Application, it depends on your functional and non-functional requirements, which I simply don't know – and this can't be answered easily and usually takes extended analysis. There is no "one-size-fits-all" answer to that.

As for the technology to use: For a web fronted, since the search API is developed in Java, I'd stick with it. If you followed my suggestions with the search API: Stick to the same tools, use Spring Web-MVC or Spring Boot. An alternative could be a Node application, depending on your skills. The advantage from decoupling the actual search from the application is that you can basically choose anything you want: Django, Rails, Sails, whatever.

"Should I use HADOOP, since it is an offline app?"

Hadoop is, per definition, networked. I simply don't really get what you mean with this question, but I think it is answered with the above.

  • thanks for your answer, so you suggest a 3-Tier web application with MongoDB, Elastic and Spring MVC, Spring Security for authentication, However I still don't know how to map my documents(Word, PDF, ...) with my application, should I link mongodb to the file system or elasticsearch? Why don't use just Solr or lucene since it's not a distributed application, I will have any scale problems. At least can you share with me some usefull resources or tutorials where I can get up and runing with this 3-tier solution please? Regards
    – Naou
    Nov 8, 2015 at 8:28
  • @Naou I am afraid, but you have to dig for this yourself. There is no tutorial for this. And you link ElasticSearch to MongoDB's GridFS (where you store the files). You can use Solr or Lucene, but the you'll have to integrate it yourself. With the stacks I suggested, the effort is relatively small ;). Scaling problems? No, if you know how to scale properly. Scaling is a very hard thing to do properly, and far out of scope. But in general, yes, the setup I suggested is almost infinitely scalable. Most useful resource for starters: university.mongodb.com/courses/M102/about Nov 8, 2015 at 8:41
  • Thanks, could you share your architecture set up in github please to use it as a starter point?
    – Naou
    Nov 8, 2015 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.