Forum: Ruby on Rails Ajax and performance

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
py (Guest)
on 2007-03-15 22:30
Hello,

I got this newbye problem :

1 method is very long to process and CPU consuming.
So, i want to add a progress bar.

But when i call this heavy method, then the entire rails application is
frozen until it finished.
So the ajax call for progression status does not get any response from
the server until the method is finished...

I tryed with Webrick and Apache + mod_scgi with the same result.

Is there a way to make it multi thread to process multiple requests in
the same time ?
Does i have to create a cluster or a kind of ruby worker pool to handle
several requests in the same time ?
Is there a way to 'renice' a method ?

Am i missing somethings ?

Any ideas is welcome :-)

Thank you in advance
MichaelLatta (Guest)
on 2007-03-15 23:04
(Received via mailing list)
Rails is not thread safe so your choices are multiple web server
processes or use of something like http://backgroundrb.rubyforge.org/

Michael
Guest (Guest)
on 2007-03-16 18:03
MichaelLatta wrote:
> Rails is not thread safe so your choices are multiple web server
> processes or use of something like http://backgroundrb.rubyforge.org/
>
> Michael

Thank you Michael,

Will Rails be thread safe one day ?
This basic feature is really missing to me...
     py
This topic is locked and can not be replied to.