Re: Full-Text Indexing - How to decide?

2009-07-28 Thread Adam Wiggins

On Mon, Jul 27, 2009 at 6:23 PM, Nevilleneville.burn...@gmail.com wrote:
 Do you have a guide, or blog post perhaps detailing best practice for
 deploying Solr on Heroku or is EC2 the only way?

Solr is a Java program, Heroku only runs Ruby programs.  So yes, you
need to run it on another server, such as a Slicehost slice, or an EC2
instance (which is preferred since you'll have the lowest latency
between your app and Solr.)

Adam

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Full-Text Indexing - How to decide?

2009-07-27 Thread DyingToLearn

I am trying to figure out the best way to handle full-text indexing on
my app. The docs (http://docs.heroku.com/full-text-indexing) provide a
great starting point, but I would like some more details.

As far as I know, I have a small dataset:
* 3 tables
*  3000 rows in each table
* total size of the index on my local machine is 4.4MB (using a copy
of my production data)

So Heroku recommends acts_as_ferret with the caveat that it will
require rebuilding the indexes every time a new app server is
launched.

I think this is the point that I need clarified. I know an app server
is launched when I deploy changes (git push heroku master), but when
else is a new app server launched?

On my development machine, my indexes take about 20-40 seconds to
rebuild. On Heroku they seem to take 40-60 seconds. This is obviously
too long for a normal request because Heroku times out after 30
seconds or so (with an error screen I can't customize). (And of course
I never want to keep an actual user waiting 60 seconds for a normal
request.)

So I am stuck needed to rebuild the Ferret indexes every time a new
app server is launched, but BEFORE a user actualy sends a search to
the new app server. How do I go about doing this? (Side question, if I
am using multiple Dynos, will they share the index? I don't see how
they could since the index is stored in the temporary directory. This
implies I need to rebuild my indexes separately for each Dyno.)

I have a few ideas, but because I don't understand enough of how the
Heroku stack works, I'm not quite sure which is the best.

Idea 1. Add an initializer which starts a delayed job to rebuild the
indexs (if required).
Idea 2. Add a timeout (set to a shorter time than Heroku's timeout) in
my search controller which gives the user a message saying that the
indexes are being rebuilt, the page will refresh and show him results
within 30 seconds.
Idea 3. None of this will work, I need to user Solr.

Thanks in advance for any insight you can provide.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: Full-Text Indexing - How to decide?

2009-07-27 Thread Neville

  Idea 3. None of this will work, I need to user Solr.

 Yeah, depending on what your users are willing to put up with -
 whether it is a commercial app, for example - Solr may be in your
 future.  But hopefully the info I've provided here will help you make
 a decision about whether you stretch Ferret a little further.

 Adam

Hi Adam,

Do you have a guide, or blog post perhaps detailing best practice for
deploying Solr on Heroku or is EC2 the only way?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---