Rails (internals) architectural question

Hi

Another newbe here… I was wondering if someone could please help me
understand the controllers/view inner working in Production

  1. If xxx_controller.rb is only loaded once does it mean there is only
    one
    instance of Controller serving all requests?
  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?

thanks in advance

-daya

On 8/8/06, linux user [email protected] wrote:

Hi

Another newbe here… I was wondering if someone could please help me
understand the controllers/view inner working in Production

  1. If xxx_controller.rb is only loaded once does it mean there is only one
    instance of Controller serving all requests?
  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.

As far as I know, a new controller object is created for each request.

  1. 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?

It shouldn’t.

Joe

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs