Live data from Hacker News

Why we moved from NodeJS to Ruby on Rails

blog.targeterapp.com

11–20 of 166 posts

Re: Why we moved from NodeJS to Ruby on Rails

#11
The data is being written to the db, or being crunched, while the request is ending, and the browser can continue with the important stuff.

It sounds like a good fit for NodeJS for sure, but for what it's worth, even in a synchronous web framework nothing forces you to keep the connection open until the request has been processed.

I don't know off-hand how to do it in Rails, but say in Java Servlet-based frameworks you'd just call HttpServletResponse.close().

Re: Why we moved from NodeJS to Ruby on Rails

#12

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

How about Github?

Re: Why we moved from NodeJS to Ruby on Rails

#13

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

Shopify is using rails. The thing is rails is bad when there are a whole lot of short life requests. This is what twitter had. The entire rack middleware being loaded for every tweet.

Re: Why we moved from NodeJS to Ruby on Rails

#14
post #4

I wonder what testing functionality, specifically, they see missing in the Node ecosystem...

I presume it would be something related to capybara, rspec and factory girl.

Looking at the example of integrating those on RSpec's docs page... pretty nice.

https://github.com/rspec/rspec-rails

My guess is a similar Node cocktail would be using Mocha, Tobi, and Should.js together.

Re: Why we moved from NodeJS to Ruby on Rails

#15

The data is being written to the db, or being crunched, while the request is ending, and the browser can continue with the important stuff. It sounds like a good fit for NodeJS for sure, but for what it's worth, even in a synchronous web framework nothing forces you to keep the connection open until the request has been processed. I don't know off-hand how to do it in Rails, but say in Java Servlet-based frameworks y…

The point is that the rack middleware would be called for everything, which is very heavy for something so trivial

Re: Why we moved from NodeJS to Ruby on Rails

#16
post #8

Earlier quoted context omitted.

I'm writing a server in Node and to date I'm still trying to figure out how to control the main loop from Node. I want to write tests like this: 1. register some timers and create some sockets 2. send some stuff over the sockets 3. wait until the socket handlers received some data which cause the handlers to unregister the sockets and timers 4. at this point, the main event loop has ended. go to next test and setup a…

That sounds like a complicated approach at it. Here's an example of some NodeUnit tests that involve communications with a Redis-based message queue: https://github.com/bergie/noflo/blob/master/test/MQ_SendMess... More BDD-ish version of something similar: https://github.com/nemein/kckupmq/blob/master/test/001_kckup...

Does that test you link actually talk to a live Redis-based message queue that must exist for the test to run?

If so, while that's a nice test there's also a need to be able to fully control the event loop so you can test arbitrary event orders, some of which you may not be able to synthesize (or not easily, or not reliably) but may be able to occur in the real world. Testing event loop code sucks hard enough when you can fake events perfectly correctly, take that away and it sucks even worse.

Re: Why we moved from NodeJS to Ruby on Rails

#17

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

I'd like to know this as well. Some of my Coworkers went to RailsCon a few weeks ago and were remarking how a speaker talked about how they scaled from tens of thousands of hits a month to a couple hundred thousand hits a month. Not very encouraging when that's the sort of traffic we get in an hour and the solution was to use nearly double the amount of web and memcached servers than we do now on our PHP stack.

Re: Why we moved from NodeJS to Ruby on Rails

#19

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

According to this answer from a Twitter employee, they still use Rails: http://www.quora.com/Does-Twitter-still-use-Ruby-on-Rails/an...

Besides that: GitHub, Basecamp, Groupon, Shopify, LivingSocial, YellowPages.com (unless they've changed to something else), etc. Scaling Rails is a solved problem.

Re: Why we moved from NodeJS to Ruby on Rails

#20

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

Justin.tv frontend is rails, though they may / may not be moving to Django according to Kyle.

http://news.ycombinator.com/item?id=3461476

Post reply on HN