Home > Ruby Language, Ruby on rails > First version of rails with threat safety is here

First version of rails with threat safety is here

Rails 2.2 was released yesterday which happens to be first version to support thread safety. Previously lack of threads in rails has been cause of scalabilty concerns especially with twitter problems coming to limelight. So new version of rails will solve these issue? “Not so fast!” says most of people in ruby community.

One of the main reasons why not all new rails application will become multi threaded overnight is native libraries (i.e mysql client library etc). All most all rails applications use these libraries and these libraries block ruby intrpreter from calling these libraries with multiple threads. One answer to this problem is Mysql Plus library which uses never block api.

Another issue with rails multi threading is that it is being added as after thought and has not been extensively tested. if you really has to develop multi threaded ruby web application i think you should go with merb. The merb 1.0 was recently released as well. There are some open source multi threaded applications already out there.

Another issue threads support in Ruby VM. Current Ruby 1.8 VM does not support native threads but next version of Ruby 1.9 VM will support native threads. JRuby VM currently has much more support for threading and it is expected that both Merb and future version of Rails will have great performance and scalibility on JRuby VM. Upcoming Java 7 Runtime will have additional support for hosted dynamic languages like JRuby and Jython which will address many concerns about performance of JVM hosted languages like Groovy, Scala and JRuby.

Categories: Ruby Language, Ruby on rails Tags: , ,
  1. November 23, 2008 at 12:35 am

    ruby 1.9 has “native vm support” but still only allows one “ruby thread” at a time, so…I’d say it scales as well as jruby but you’d have to use multiple processes and jruby can just use multiple threads [i.e. easier, less RAM].

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: