On 02/07/2014 15:06, Mark H. Wood wrote:
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.
It is read only, but each instance of lucene would need its own copy of the index, Lucene does special low level io with the index using memory mapping and the files do need to reside locally for acceptable performance. So the index doesnot have to exist in the WAR but it does need to exist on the EC2 instance (server).




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to