- Some large documents (20 - 50 MB) are stored on the server side.
- A document can be loaded and queried (takes ~ 3 seconds) with a 3rd party program.
- Only one document can be loaded by the 3rd party program (at a given thread).
- Clients can request to view the query result of one of the loaded documents.
What is the best way to avoid loading a document upon each client http request?? Is it logical to keep all these loaded documents in memory? If yes, would it require a thread pool, where each thread is holding a document? If no, what are the other options?
(Working with Java - Tomcat - Ubuntu)