views:

789

answers:

3

Im not very updated in the event-driven/concurrency area in node.js.

I wonder, is it possible that node.js would replace ruby/rails completely in the future?

Or is it more like an extension to ruby/rails for the real time features?

+4  A: 

node.js and Ruby on Rails are two completely different things, Rails being a framework for web applications. Node.js would never "replace" Ruby on Rails because they're apples and oranges. You could create a Rails-style web-application framework on top of node.js (like we have CakePHP for PHP), and in that case node.js would be "replacing" Ruby.

Long story short, node.js offers some interesting scalability features but neither Ruby nor Rails are going away anytime soon.

erjiang
Thats actually not true either. Node is closer to Rails than Ruby since JavaScript is what powers Node and Ruby is what powers Rails. That being said, all three items are completely different :)
Doug Neiner
@Doug Neiner Arguably the nearest equivalent of Node.js in the Ruby world is Event Machine rather than Rails.
bjg
+2  A: 

There's a lot of excitement about Node.js at the moment because of its evented IO architecture and its superior performance at handling concurrent connections. For traditional language environments like C, Java, Ruby, etc evented IO is generally superior to either of serialized IO or threaded IO for performance and scalability. However, languages like Erlang can boast vastly superior IO performance using concurrent lightweight processes.

But Node.js is just an evented Server not a web framework. I have a feeling that what will eventually "replace" Rails will be Async Rails. Using Ruby 1.9 fibers and Event Machine (Ruby's closest analogue of Node.js) Rails can be made fully asynchronous and boosting performance and scalability of a single instance.

So no need to rewrite Rails in Javascript to get async IO. It's already available.

bjg
@bjg: "its already available". you mean through event machine?
never_had_a_name
@ajsie Sorry, I mean Rails evented IO is already available through Async Rails. But there was at least one attempt to port Rails to run on Javascript although I don't think it garnered much support. See http://iunknown.com/2007/06/steve-yegge-ported-rails-to-javascript.html
bjg
+14  A: 
Jörg W Mittag