Live data from Hacker News

Why we moved from NodeJS to Ruby on Rails

blog.targeterapp.com

101–110 of 166 posts

Re: Why we moved from NodeJS to Ruby on Rails

#101

Since our stack involved MongoDB, it only made sense to live in a JS only environment. I've never used MongoDB; can someone explain to me why this would seem like an advantage, and/or what it has to do with MongoDB? Is the MongoDB API simply JavaScript?

MongoDB has good drivers for Node (as for most other languages) but also a fully-featured ORM that can save time in these kind of projects: mongoosejs.com MongoDB also ships with a JS runtime so you can run map/reduce calls written in JavaScript entirely DB-side, as well as other goodies. So it's fair to say that the language that makes the most sense when using MongoDB is JavaScript, even if that wouldn't be enough…

I never understood why you needed ORM for a database that stores objects... Validation is the only problem it helps in but there are other ways of doing that.

ORM for Mongo is silly....

Re: Why we moved from NodeJS to Ruby on Rails

#102
post #39
post #32

Basically they switched for... personal opinion. That's all I can really gleam from the post. You can do it all in Node JS, they just didn't want to. Screw all the frameworks, I am working with bare-metal Node and loving every minute.

"You can do it all in Node JS" People like you scare the shit out of me. Golden Hammer is a new concept to you, isn't it? He actually did lay out the reasons, but your religious zealotry won't let you see it because someone isn't loving your sacred choice of technology.

Lol.. They don't have to love it. They also don't have to write a blog post explaining why they stopped using it.

It was done to generate press, because really no one here ever heard of their app before this. They gained, by slighting Node, and that's why I commented.

Re: Why we moved from NodeJS to Ruby on Rails

#103
post #70

Wow, Node is being turned away from because it's too new, and Rails is the destination because it's established? I remember a few years ago Rails using the argument of re-inventing the wheel was the only way because there was presumably no other capable web framework out there. We all know better now and I hope celebrate choice that's relatively equally capable :)

Maybe some day people will finally realize what's so awesome about Ruby on Rails. It's not the libraries and the fact it's been around for almost 8 years now. No, it's simply the language. Ruby is a fantastic language and an addictive one at that. Once you get a feeling of how productive and expressive it is, it's enough of an incentive to keep at it. The same goes for Python by the way, another GREAT language. One day people will realize that Javascript just doesn't cut it.

Re: Why we moved from NodeJS to Ruby on Rails

#104
post #28

Earlier quoted context omitted.

The OP probably meant short-lived with reference to CPU bound requests.

OP explained things improperly, then. It's an important detail, because Rails currently defaults to single-threaded. This makes an operation such as fetching and returning a twitter feed in a single request (assuming it takes hundreds of milliseconds to get a response from twitter's servers) expensive.

Only rookies do that inside the web server process.

The job of fetching a Twitter feed can be offloaded to a background jobs queue. With a little help from Nginx, you can free the Ruby process to take care of other requests until the response of that Twitter feed is ready.

Or you could simply deploy your Rails app on top of a Java server, by means of JRuby and forward that request to a servlet that uses the continuations support in EE 6, offloading the request to an Akka actor and freeing the pipeline until it is ready. Works great and you can even write everything in Ruby ;-)

Also, Rails does work with multi-threading.

Re: Why we moved from NodeJS to Ruby on Rails

#105

Earlier quoted context omitted.

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.

You can't compare servers to servers. Each app has its own computational needs and caching rules. Your hit is not my hit. One site might simply render a template, another might perform 20 queries and generate giant complex docs.

While it's true you can't do 1 to 1 the fact that my site does ~700 times as much traffic, and it is absolutely the latter of your two types time ten is a cause for caution. This is why I want to hear from some actual enterprise level people that have solved real scaling problems, unfortunately at the conf it seemed like startup size scaling problems were being addressed, and perhaps not very well.

Re: Why we moved from NodeJS to Ruby on Rails

#106
post #47
post #32

Basically they switched for... personal opinion. That's all I can really gleam from the post. You can do it all in Node JS, they just didn't want to. Screw all the frameworks, I am working with bare-metal Node and loving every minute.

definitely agree with this. I can understand why 37signals use RoR, because they built it and know it inside out. But for a newcomer diving into rails now is difficult because the ecosystem is so huge it's hard to navigate, and everything is so integrated and you usually end up bundling a ton of thin that you don't need. With node everything is modularized, it is much more easier to understand what's happening under…

Do you think Node will be lean and mean forever. It's been around for about two years. Let it grow and it will soon become just as "fat" as Rails and Java frameworks. Funny thing about people reinventing the wheel thinking their approach is just so much smarter. In the end you end up having to face the very same problems Rails guys and Java guys faced in the past. Abstractions, reusable components for X, Y and Z and you end up with something like J2EE or Rails.

Re: Why we moved from NodeJS to Ruby on Rails

#107

Earlier quoted context omitted.

Of course Rails took YEARS getting to the point of scalability. People are acting like it was scalable on the very first alpha release.

But will JavaScript be able to scale? It has come a long way from the days of onMouseOver but it seems like it's going to be hard unless it gets turned into a different language (i.e. Dart).

What do you even mean by scale in this context?

https://en.wikipedia.org/wiki/V8_%28JavaScript_engine%29

V8 increases performance by compiling JavaScript to native machine code (x86,[2] ARM,[2] or MIPS[3] CPUs), before executing it, versus executing bytecode or interpreting it. Further performance increases are achieved by employing optimization methods such as inline caching.

Re: Why we moved from NodeJS to Ruby on Rails

#108

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.

[deleted]

Re: Why we moved from NodeJS to Ruby on Rails

#109
post #34
post #22

Earlier quoted context omitted.

AFAIK Twitter still uses Rails for at least part of their app, perhaps just not for directly serving consumer requests

I'm pretty sure they still use Rails for the HTML application that you see when you visit twitter.com - it's the backend stuff (the data storage layer, the message queues, the API etc) that's been ported over to Scala/Java.

Also who cares if Twitter had to move to another technology. 99.9999% of people will never ever have to face those issues.

Twitter would have hit the wall with any other tech, it just grew like crazy all of a sudden. The fact that it was able to get on its feet so fast though, that's thanks to Rails.

I think this whole "Rails doesn't scale" is the new "Java is slow". Baseless and ridiculous.

Re: Why we moved from NodeJS to Ruby on Rails

#110
post #70

Wow, Node is being turned away from because it's too new, and Rails is the destination because it's established? I remember a few years ago Rails using the argument of re-inventing the wheel was the only way because there was presumably no other capable web framework out there. We all know better now and I hope celebrate choice that's relatively equally capable :)

Maybe some day people will finally realize what's so awesome about Ruby on Rails. It's not the libraries and the fact it's been around for almost 8 years now. No, it's simply the language. Ruby is a fantastic language and an addictive one at that. Once you get a feeling of how productive and expressive it is, it's enough of an incentive to keep at it. The same goes for Python by the way, another GREAT language. One d…

I think you totally missed my point.

I was just speaking to how Railists too often, do not openly consider or think anything productive, well structured, or maybe even great could have existed before, or at the same time as Rails for the web.

We forget the difference between a language and a framework as well. Too many folks short sightedly compare a language to a framework. Frameworks will always evolve and change, and few rarely do anything new or novel, just like languages may, but they're entirely different things.

Post reply on HN