Besides V8 being considerably faster than Ruby (which is actually less important than you think), the real issue is the fact that rails is based on blocking I/O. This means that you need a process or thread per concurrent customer. Node can multiplex thousands of connections in a single thread.
This really matters when you have idle connections (like websockets or long-poll ajax clients). In this use case, each customer is concurrent and you would need a persistent ruby instance per active customer. To say this will scale poorly is an understatement. If you're just getting data from a database and generating html (what rails is good at) then it matters less because you try to respond and close the http request as fast as possible. Still the node way using non-blocking I/O is considerable more efficient for this use case as well. On Tue, Apr 10, 2012 at 10:24 AM, Derek Chalmers <[email protected]>wrote: > What's up, > > I've been writing a game using HTML5/JS + Node.js, and so far that's been > going great, but I've heard a lot about Ruby on Rails and one of my friends > insisted on checking it out, so I did. > > I did a quick speed test to see how fast Ruby on Rails is compared to > Node.js, and my numbers show it's 10-150x slower: > > > http://nodeblode.wordpress.com/2012/04/10/the-great-node-js-versus-ruby-on-rails-speed-test/ > > Does this jive with anyone else's experiences, or am I doing something > wrong? If that's really the case I am definitely sticking with Node > > -- DC > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
