tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark H. Wood" <mw...@IUPUI.Edu>
Subject Re: Where can I store data files in a tomcat war
Date Wed, 02 Jul 2014 14:06:23 GMT
On Wed, Jul 02, 2014 at 11:49:36AM +0100, Paul Taylor wrote:
> I have a simple WAR based web application that uses Lucene created
> indexes to provide search results in a xml format.
> Especially given the following context:
> and supplementary question how do I modify my pom file to do this
> with maven
> I was under the impression that Paul was building a separate
> application using Lucene during the build stage to create the
> indexes, but then using an application - specific mechanism to use
> those indexes.
> > That's what I thought, too.
> Yes correct, let me explain it a bit further. I'm trying to deploy an 
> application that serves results from a lucene index in response to user 
> requests. Deploying it manually to my own server is fine, first of all I 
> just copy the index files to a location on the disk, then I deploy my 
> application, and within its web.xml I have a servlet parameter that 
> defines where the indexes are, so within the servlets init() method i 
> initilize the indexes. The problem is that I'm trying to deploy my 
> application to Amazon Web Services using autoscaled Elastic Beanstalk, 
> this means that the application has to be able to be initilized and 
> created based on what is in the war because Elastic Beanstalk will 
> automatically start new servers as required due to load and terminate 
> those instances when not required.

So it sounds like this index is static, produced somewhere else and
only consulted read-only by 1..N instances of your webapp.

Could you not just plop one uncompressed copy of the index into an EBS
snapshot in an S3 bucket, and map the snapshot to each EB instance?
Then just provide environmental information to the webapp as to where
it should find the index.  Your huge index doesn't have to live in the
WAR then.

I have *very* little experience with AWS, so it's quite possible I'm
missing something.

Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Machines should not be friendly.  Machines should be obedient.

View raw message