Shall I use Node.js Instead of Rails for Real-time WebApps?

陌路散爱 提交于 2019-12-13 11:43:48

问题


I'm in the process of building a complex web app that must work a lot with real-time data and showing that data to the user.

Given that I'm more used to Rails, I'm wondering if there's a big advantage of dumping rails and use node.js to build the app or if there's a way I can have the real-time advantages of Node.js in Rails.

Better would be to be able to use Node.js and Rails. Is that a possibility?

Thanks


回答1:


Better would be to be able to use Node.js and Rails. Is that a possibility?

IMHO combining the best of both worlds is a very good idea since you can use your existing experience to build "standard" MVC parts of your web application and use node.js for specific real-time based elements. This can not only widen your skill set but you can also learn new techniques on how to solve various problems with appropriate tools.




回答2:


You should read this : Ruby on rails and Node.js

The answers of Shripad K and Andy Atkinson are greats !




回答3:


Node.js has a lot of advantages, but you do have to know what you're doing to take advantage of it's power. That usually takes some time. The primary bonus against rails is that Node.js is more lightweight than Rails (which is saying a lot, IMO), and supports higher concurrency.

Though I feel I should side note at this point that a lot of real-time data retrieval doesn't necessarily mean you need high concurrency. It means that you need to make sure your middle tier and data access tier are very speedy, and that you can handle the throughput. By definition, Node.js covers the first one. Though either way you're talking in low milliseconds for response times.

If you want to get in to the JavaScript event-driven world, I'd certainly recommend trying it out. But for something that's not just a 'test it out' project (for your first attempt), I don't know how good of an idea it is.

Either way, best of luck!



来源:https://stackoverflow.com/questions/5539410/shall-i-use-node-js-instead-of-rails-for-real-time-webapps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!