Archive

Posts Tagged ‘JRuby’

First version of rails with threat safety is here

November 22, 2008 1 comment

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: , ,