RoR vs. What else?
1–10 of 18 posts
Re: RoR vs. What else?
#2Re: RoR vs. What else?
#3Re: RoR vs. What else?
#4Re: RoR vs. What else?
#5Re: RoR vs. What else?
#6Re: RoR vs. What else?
#7The pragmatic call is, wait until you need to scale, if at all.
If you find that MySQL is a bottleneck in particular, Ruby (and by extension Rails) has a wide range of database adapters and database ORM's available. Active Record itself has numerous adapters, which mean changing databases within the supported set shouldn't be too difficult.
Alternatively, you could use a different ORM such as DataMapper or one specific to the database you desire. Rails now let's you choose which ORM you wish to use, although if you're just getting started it might prove an additional learning curve as most of the documentation uses Active Record.
Re: RoR vs. What else?
#8Your web stack and your machine learning stack don't have to be the same. http://scikit-learn.org/ is Python and very popular for machine learning. Here is a in depth training video http://pyvideo.org/video/972/tutorial-scikit-learn-machine-l...
Re: RoR vs. What else?
#9Re: RoR vs. What else?
#10First, I'd say I don't think you have anything to worry about.
Second, don't go replacing MySQL because you're worried about scale. I have yet to find a database that really easily scales better. You can trade a whole lot of development time to use something like Cassandra or Riak, (which are both great for particular applications). Then you spend a huge, huge amount of time building queries that were easy in Rails and you actually didn't solve any end-user facing problems. You just made it where only one of your developers actually can create queries and nobody can maintain the code.
Third, don't go replacing Rails because you're worried about scale. It's not the fastest thing but it's just not worth losing sleep over.
Just add the appropriate technology where you need it - I probably wouldn't build a recommendation engine in Ruby; perhaps that is the only piece that you build using something else.
Here's what we often do @ Inaka - web and admin in Rails, business "logic" and stuff that needs to scale (either because we have tons of socket connections or because we have a lot of data to crunch) in Erlang. (Insert Java or Python or whatever you need for the backend piece in place of Erlang.)
Then build an internal HTTP API that Rails can talk to. Abstract that in a model class. Have Rails call into it as needed. RecommendationEngine.recommend(...) returns JSON with the magical results for your Rails app to render appropriately.
Typically we give our Rails users an "api key" (that they don't know about) that is used to authenticate calls to the backend service, so we don't even have to share user authentication schemes between the systems. Then you can use devise or whatever you want for Rails but don't have to re-implement the same password hashing algorithms - authenticating those users is just a quick lookup in the user table.
Sometimes that service API may even be part of a publicly available HTTP API. For instance, imagine the backend piece exposes part of its API to mobile devices. Then, some of the methods may be authenticated and some are open to the world.