I would just use S3 as a data push mechanism. In your servlet's init(), you
could download the index from S3 and unpack it to a local directory, then
initialize your Lucene searcher to that directory. 

Downloading from S3 to EC2 instances is free, and 5G would take a minute or two.
Also, if you pack the index inside your war file, the new instance has to 
download
that data anyway.

The big advantage is it also allows you to update your index without repacking 
your
deployment .war. Just upload the new index to the same location in S3, then 
restart
your webapp :)

Hope this helps,
Tri

On Jun 27, 2014, at 04:13 AM, Paul Taylor <paul_t...@fastmail.fm> wrote:

Hi

I have a simple WAR based web application that uses lucene created indexes to provide search results in a xml format. It works fine locally but I want to deploy it using Elastic Beanstalk within Amazon Webservices

Problem 1 is that WAR definition doesn't seem to provide a location for data files (rather than config files) so when I deploy the WAR with EB it doesnt work at first because has no access to the data (lucene indexes) , however I solved this by connecting to the underlying EC2 instance and copy the lucene indexes from S3 to the instance, and ensuring the file location is defined in the Wars web.xml file.

Problem 2 is more problematic, Im looking at AWS and EB because I wanted a way to deploy the application with little ongoing admin overhead and I like the way EB does load balancing and auto scaling for you, starting and stopping additional instances as required to meet demand. However these automatically started instances will not have access to the index files.

Possible solutions could be

1. Is there a location I can store the data index within the WAR itself, the index is only 5GB so I do have space on my root disk to store the indexes in the WAR if there is a way to use them, Tomcat was also be need to unwar the file at deployement, I cant see if tomcat on AWSdoes this.

2. A way for EC2 instances to be started with data preloaded i some way

(BTW Im aware of CloudSearch but its not an avenue I want to go down)

Does anybody have any experience of this,please ?

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to