I do something very similar. I just create a background job for each lookup.


I think the delay for a background job could be up to 5 seconds, plus
however long the job takes, and however long your queue is.

It's pretty much your only option if you want to take that process out of
the controller action and keep it all within Heroku.

You could probably get away with having the UI periodically poll the the
server and display the results as they come for some time.


On Tue, Nov 2, 2010 at 3:39 PM, Alejandro Cadavid <[email protected]>wrote:

> Hi guys,
>
> I'm building an app which basically query several APIs (about 6-7)
> based on some words the user inputs in a form and compares the results
> between them. I'm not actually saving the data to the database, just
> calculating some stuff and displaying the results to the user. My
> question is, is there a good way in heroku to "parallelize" those HTTP
> requests? Right now i'm just doing one after the other. I read about
> delayed_but i'm not sure about it because i don't know how long would
> it take to start processing the requests as soon as they arrive.. i
> don't want to make the user to wait for a longer time.. but i'm not
> really sure if my guess is correct. Any other suggestion about this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<heroku%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>


-- 
=========================================
Brandon Casci
Loudcaster
http://loudcaster.com
=========================================

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

Reply via email to