Node Speed Vs Rails Elegance

Just yesterday read an article written by a friend of mine who is practicing Ruby on Rails. He seems to like Nodejs, the new Javascript stuff that can be used to write server side code too. What he claimed was startling, he claimed Node can run upto 500 times faster than Python! WOOOOOOOOOOW!!!! up that may be true. But I will stick with Rails and these are my reasons.

1. Node is like Javascript, which is Javascript. If we can write programs with coffeescript, that can run on Node platform, then OK. I might be tempted to change.

2. Ruby is a elegant programming language, and Rails is built with Ruby. I can ask my client for 2 days of developing some thing,I can develop that stuff for 2 hours and still get away in the review meeting if I use Rails. With Node?

3. Code with Node is difficult to write as compared with Rails. Hence there could be mistakes which I need to sit and debug. With Rails, because we use convention over configuration approach, I almost exactly know what code is where. that a great thing. There is very little commenting stuff needed.

4. Rails framework has been extremely adaptive. Why can’t we develop a plugin so that we can run Nodejs stuff in Rails?? C has ways to embed assembly language in it, we now have Extjs to execute javascript from our Ruby program, why not a plugin or gem to do the Node stuff?

The author claims that Rails engineers are hired to squeeze 1 or 2 more cycle efficiency from their Rails app. If Node code can be got into Rails, one can identify bottlenecks and replace the piece of code with Nodejs stuff! That will solve huge problems.

Nodejs may be impressive and better performing. But I bet on elegance and easy-stuff for humans to use will win eventually. MRI and Ruby will improve and will be faster and faster in years to come. At the same time processor speeds are increasing. So lets see how node fares then.

  1. #1 by Lambda Dusk (@LambdaDusk) on May 15, 2012 - 3:35 pm

    1. You can use CoffeeScript in node. It’s even extremely easy and does not even require any manual compilation. The “coffee” executable you use for compiling can interpret Coffeescript right there, as a node script.

    2. You’re comparing the language with the framework here. There are a load of frameworks for Node, and some of them aspire to give you the same feel as Rails. But since Rails has been developed for such a long time, and node frameworks are all quite new, the comparison can’t stand. You have to go and look for a framework in node that you like.

    3. Again, comparison of language and framework. Node is just the bare bones interpreter and standard library, just as Ruby is to Rails. And if you worked for some time with Node, you’ll be quicker with writing the code.

    4. This has been done. ExecJS gem runs node for javascript execution.

  2. #2 by Karthikeyan A K on May 16, 2012 - 11:08 pm

    Ruby as a language is far more powerful and greater than Javascript and Coffeescript, hence I think Rails thats built on top of it will prevail.

  3. #3 by Mulkave on August 31, 2012 - 1:01 pm

    What you are looking for is a Rails-like framework for Node.js .. checkout GeddyJS ( and RailwayJS ( The way I see it, you’re talking about the flexibility of the Rails framework which is built on Ruby compared to Node.js which is the core language and not a framework.

    “Rails framework has been extremely adaptive. Why can’t we develop a plugin so that we can run Nodejs stuff in Rails” – That’s on my wishlist right now!

  4. #4 by Mike McNeil (@mikermcneil) on February 27, 2013 - 8:47 am

    Another option is Sails.js, which is pretty dang close to Rails. It also maps requests to Express HTTP requests, so you can handle your realtime code in the same controllers as your main app code.

    Intro to Sails.js

    Disclaimer: I built it about a year ago and have been improving it since 🙂 My company has been using it for Node.js projects since last Fall

Leave a Reply

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

You are commenting using your 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: