[Rails] Rails (internals) architectural question
linux user
fanoflinux at gmail.com
Tue Aug 8 21:06:12 GMT 2006
On 8/8/06, Jeremy Kemper <jeremy at bitsweat.net> wrote:
>
> On Aug 8, 2006, at 9:56 AM, linux user wrote:
> > 1. If xxx_controller.rb is only loaded once does it mean there is
> > only one instance of Controller serving all requests?
>
> A controller is instantiated per request.
Is this true even in Production mode ?? If yes, this will degrade
performance of rails compared other web frameworks?.
> 2. If only one instance of controller is there then how are
> > controllers instance variables protected from data corruption when
> > serving multiple requests? Since these instance variables render
> > data in views.
> > 3. If I store a SOAP::RPC::Driver object (pointing to a web service
> > with only one function) in a global variable Do I run the risk of
> > corrupting data when the web service response arrives?
>
> Requests are handled one at a time, so you don't have to worry about
> concurrent requests stepping on your global var. Though feel free to
> worry about the global var itself :)
>
> jeremy
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060808/a3ec06d3/attachment-0001.html
More information about the Rails
mailing list