6 ms·
Interesting project, but if you're only building an API, using a much more lightweight combo such as nodejs + express seems better.
by louischatriot 14y ago
Interesting project, but if you're only building an API, using a much more lightweight combo such as nodejs + express seems better.
- sjtgraham 14y agoWhy?
- bascule 14y agoBecause nonblocking is the secret ingredient in the async sauce, of course. With it, you go fast. Without it, you go slow. Without all that callback spaghetti, how are you supposed to scale to roflmillions of users?
- deleted 14y ago[deleted]
- louischatriot 14y agoWe really didn't make the choice to prepare for millions of users. We like having complete control over our code, and nodejs+express gives us that. I'm sure we make some mistakes Rails would correct for us and we take a bit more time on development, but we also learn a lot. That's a tradeoff, and overall we're happy with it.
- irahul 14y agoThat depends on what you need for building the said API. Rails does a lot of stuff. Lightweight frameworks leave out many things out of choice. You possibly get enhanced performance with lightweight frameworks, at the cost of having to build some components. The choice depends on your "performance gain" to "painfully building components rails provides" ratio. node ecosystem has grown a lot, and it might serve your needs, but that's something that varies from project to project.
- jasongullickson 14y agoYou've got a crack team of Rails devs and a deadline?
- astrodust 14y agoI challenge you to build some non-toy API with Node.JS and then try the same thing in Rails. Express is decent enough, but it's barely an equal to Merb.
- louischatriot 14y agoChallenge accepted: we have an API up and running at tldr.io :) We don't have a gazillion hits everyday for sure, and it may not be as complex as Twitter but: - It works perfectly - It really wasn't that difficult to build
- astrodust 14y agoThe second half of that challenge is to compare to how hard it would've been in Rails.
- louischatriot 14y agoI can also answer that as I've a fair bit of Rails experience. This time, we built our API using nodejs/expressjs for the first time, so we had to learn it plus the ins and outs of handling user login, sessions, CORS and a lot of small things Rails does for you. So we wouls probably have been faster with Rails. If we need to build another product from scratch again though, we'll definitely be faster with nodejs. I understand that nodejs programming seems strange/hard to do in a non-spagetthi way to some people, but really, after a few months it is not hard.