On Saturday 28 August 2010 00:11:11 Rainer Jung wrote:
> On 27.08.2010 21:58, Wesley Acheson wrote:
> > On Fri, Aug 27, 2010 at 9:41 PM, Pid<p...@pidster.com>  wrote:
> >> On 27/08/2010 18:51, Wesley Acheson wrote:
> >>> I think the reason for doing this in ruby is that ruby is single
> >>> threaded, I've been told. The JVM isn't.

> Adding unqualified rumors: Ruby is not single-threaded, 

Right - the language has a thread concept that can be explored as true multi-
threading by interpreters. But the original C-based ruby interpreters for do 
have a global interpreter lock that causes only one native thread to be 
running within one ruby process. This makes these interpreters effectively 
single threaded. (Ruby up to 1.8 only used 1 native thread at all, Ruby 1.9 
maps ruby threads to multiple native threads, but still has the global 
interpreter lock.)

> but the Rails
> framework has a huge lock that effectively make the biggest part of
> request handling serialized. Usually Ruby webapps are based on Rails. So
> yes, Ruby on Rails needs multiple server processes in parallel to
> effectively scale. That might be an outdated rumor though.

It is in so far outdated that Rails from 2.3 on has a threadsafe configuration 
option that enables multi-threaded request processing. This needs a multi-
threaded runtime though to make any sense. JRuby is (of course) multi-
threaded, I'm not sure if there is any other Ruby interpreter that is multi-
threaded.

> Regards,
> 
> Rainer

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to