|
Tuesday 30. of September 2008
Tags:Ruby as a scripting language, who is faster rails 1.2.6 or rails 2.0.2?, speedy rails server By: By: Humayun Saahi
Posted in Enterprise 2.0, Ruby Last time we compared the performance differences between Ruby and other languages. Let’s continue by dissecting what makes Ruby a good scripting language. Ruby as a scripting language To further explain let’s say Ruby is "an interpreted scripting language for quick and easy object-oriented programming" -- what does this mean?
Quick and easy:
Object oriented programming:
Also:
While comparing to JAVA, if seen in perspective of real cost, scaling the cost of a Ruby app is on par with a similar Java app. The cost for hardware is the same when it comes to a Ruby on Rails web app and a big J2EE app. It might take less effort to setup Apache + mod_proxy + mongrel + Capistrano + memcached, than to go through JBOSS and Tomcat. Further Rails applications can be clustered quite easily to provide very powerful scalability with much less investment than typical applications using other languages. Here is an example of Mongrel, an open-source HTTP library and web server for Ruby written applications. It has the distinguishing feature of using plain HTTP rather than FastCGI or SCGI to communicate with other servers, which is widely believed to be faster than WEBrick (another Ruby library providing simple HTTP web server services). Capistrano is another open-source tool, written in Ruby, which runs multiple servers and deploys web applications. It is used for automating tasks on different remote servers (one or more), executing commands in parallel on all targeted-machines and provides a mechanism for rolling back changes across multiple machines.
Application ran on Mongrel: Rails 1.2.6: 141.19 requests/sec Rails 2.0.2: 214.76 requests/sec Rails 2.0 is 50% faster in a dummy application! In Rails 1.2, a lot of time is spent in the session store. Let’s see what happens if we specify “session: off” in both applications: Rails 1.2.6: 189.51 requests/sec Rails 2.0.2: 246.69 requests/sec
Rails 2.0 is still 30% faster! Check back for more Ruby on Rails in part V!
Sorry, comments are closed for this post.
|
|
|


RSS