I have an application that knows how to both serve and consume RESTful resources using rails conventions for serving, and ActiveResource for consuming. When I run two instances of the application and hit the page to display resources on the other running application, that works fine. When I change the code to point to the same running application on the same port for both client & server, that hangs and does not return. The application design will stay much simpler and cleaner if the local server is treated exactly the same as remote servers in this one piece of the code. It seems plausible to me that this is because I''m running the application on a single Mongrel instance and I''m hanging because the same thread that is waiting for a response would have to provide that response, thus blocking itself. Does that make sense? Has anyone else seen this same behavior or have useful insights? Thanks! -Steve- -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 2, 2008, at 5:07 PM, Stephen Anderson wrote:> > I have an application that knows how to both serve and consume RESTful > resources using rails conventions for serving, and ActiveResource for > consuming. > > When I run two instances of the application and hit the page to > display > resources on the other running application, that works fine. > > When I change the code to point to the same running application on the > same port for both client & server, that hangs and does not return. > > The application design will stay much simpler and cleaner if the local > server is treated exactly the same as remote servers in this one piece > of the code. > > It seems plausible to me that this is because I''m running the > application on a single Mongrel instance and I''m hanging because the > same thread that is waiting for a response would have to provide that > response, thus blocking itself. > > Does that make sense? > > Has anyone else seen this same behavior or have useful insights? > > Thanks! > -Steve- > --Yep, it''s that Rails is only able to process one request per server. Since it is Mongrel, I guess you''d call it ZedLock :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Steve! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---