Rails: How to use ActionMailer by itself?

Should I use Ruby on Rails for a high-traffic social networking site if I do not want to use ActiveRecord( or any other magic ORM) for scalability reasons?

  • 1)I have 0.5 years experience with Ruby/Rails and 10 years experience with Java/Spring MVC/Spring Roo and the entire java ecosystem. Spring Roo can actually do whatever Rails/Ruby does through innovative use of aspects. 2)The only advantage is see then using Ruby/Rails is the faster edit-compile-deploy-test cycle compared to java (even that can be avoided  through using jRebel) for inevitable presentation changes.   3) How faster can I expect the app development in Ruby/Rails compared to java/spring MVC( considering my background)? Note:- High traffic means 1 million daily active users ( not Facebook level high traffic)

  • Answer:

    Using or not using an ORM has nothing to do with scalability. Keep that in mind. Active users in a day is no measurement for scalability. You will want to understand "simultaneous or concurrent requests". For instance, if you have a pure content based website that doesn't update very often, you can have billions of "active users in day" hitting just static content generated by any framework using any ORM. You just have to make sure you're caching this content. If you're talking about transactions (such as an e-commerce checkout) you will want to have real database transactions from a real Acid compliant database. Then you will want to have a heavier master-master or master-slave configuration that is not exactly trivial. But again, people are underestimating good databases. They've been driving real big e-commerce for years and they work very well. Using an ORM means knowing where to use vanilla ORM and where you will need to do a more hardcore optimization and in the case of ActiveRecord in Rails you can do both: it allows for complicated custom SQL statements easily without having to go through an abstraction (such as HQL in Hibernate). Actually, most good ORMs allow both. Some people want to think of an ORM as a way for developers to not need to know about the underlying database or SQL. This is a mistake: every good developer HAS to have good knowledge on how the underlying database behaves and code properly. Scaling means simply the ability to add more noded without significant recoding issues. For small to medium websites, Ruby and Rails + ActiveRecord works fantastically well. Do not think about optimizing without first having real life production logs properly analyzed. And if you do choose to use Rails, get to know tools such as New Relic. Don't ditch good ORMs because of early optimizations. You will never truly know the real bottlenecks unless you already have true traffic hitting your servers.

Fabio Akita at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.