2

So I've been programming in PHP for the past 7 yrs. What I should be doing is learning OOP but all the talks about RoR and Django interest me even more. With that said, I started to follow RoR when it first came out. I knew of it through 37signals when I was first introduced to their products. At the time, I continued to use PHP, it was what I knew and I was able to produce code much faster than trying to learn a new language.

Fast forward to 2009 ... it was a few yrs ago when Twitter made headlines, when they implemented Scala due to RoR's inconsistency. My question, have things gotten better for RoR? I know I shouldn't go by one company's issue but of course the fanboys will probably jump all over this and bash or pump one language over another.

I would assume by now lots of bug fixes and enhancements have been made, but I would still like to hear what annoyances there are with RoR that still needs to be addressed.

TIA!

John Topley
  • 113,588
  • 46
  • 195
  • 237
sdot257
  • 10,046
  • 26
  • 88
  • 122

5 Answers5

9

Twitter's problems were not with Ruby or with Rails, and they have explained this at length.

This is becoming one of those various urban legends that everyone "knows" to be true, but isn't. It's quite hard to google for the story here, probably because of all the "follow me on twitter" buttons. Fortunately, a Stack Overflow answer referenced a detailed discussion on this that included Twitter developers.

I will give one other urban legend example that is (via RSI) somewhat programming-related: the Dvorak keyboard. Everyone knows that QWERTY is designed to be inefficient, to slow down the operator, and that it is an example of market failure, right?

Another urban legend: Dvorak vs QWERTY

Turns out this legend is not just completely false, but it has been deliberately, deceitfully falsified. Yes, the US Navy did test the patented Dvorak keyboard in 1944. But according to this report on the Dvorak keyboard:

How can we take seriously a study which so blatantly seems to be stacking the deck in favor of Dvorak? And, indeed, there appears to have been good reason for that deck stacking.

We discovered that the Navy's top expert in the analysis of time and motion studies during World War II was none other than...drum roll please...Lieut. Com. August Dvorak. Earle Strong, a professor at Pennsylvania State University and a one-time chairman of the Office Machine Section of the American Standards Association, reports that the 1944 Navy experiment was conducted by Dvorak himself.

Later tests by other organizations showed no advantage for Dvorak. It is also worth noting that slowing down typists was not a goal even in the early days of the typewriter. Actually, typing speed contests were conducted regularly with great publicity and the fact that typists were fast on QWERTY was a factor in the adoption of QWERTY.

Dvorak and Twitter and RoR

The false version of this story has been repeated for literally 65 years now, partly because almost no one cares about original sources, they just repeat the version they heard. Another parallel with RoR and Twitter is the religious/political angle. People have language and framework loyalties, and they have economic system loyalties, and the enduring legends play into existing bias. The Twitter story connects with some people's emotional perspective on the expertise they do and do not yet have; the QWERTY story connects with some people's personal dislike of free market economics.

Community
  • 1
  • 1
DigitalRoss
  • 143,651
  • 25
  • 248
  • 329
  • 1
    Sure thing. It's a good question, and you can't be blamed for hearing stories. If anyone didn't follow the links, the short version of the story is that Twitter has many layers of software, and they replaced a non-Rails Ruby queuing system with a custom-written one that one of their engineers had already written in Scala. Twitter's traffic load has broken most of the free SW they have tried, so this was mostly an issue of load-tolerance and implementation details, and had little to do with either Ruby or Scala. – DigitalRoss Dec 06 '09 at 04:51
2

Twitter switched some parts of their architecture from Ruby to Scala because when they started they used the wrong tool for the job. They were using Ruby on Rails—which is highly optimised for building green field CRUD Web applications—to try to build a messaging system. AFAIK, they're still using Rails for the CRUD parts of Twitter e.g. creating a new user account, but have moved the messaging components to more suitable technologies.

John Topley
  • 113,588
  • 46
  • 195
  • 237
  • Thank You, after reading the links provided above, I have a better idea of what went wrong. It wasn't RoR, it was the tools the developers used. – sdot257 Dec 06 '09 at 02:00
1

Your best bet is going to be working through a little prototype app. Rails is pretty nice once you get the hang of it. Though that is a similar truth to many frameworks.

Take a little piece of your app that's either easy or hard in php, and try to write it in rails. It shouldn't take too long and should give you a good real world example.

Personally these prototypes are my favorite. Systems with no users are the easiest to write.

Nathan Feger
  • 19,122
  • 11
  • 62
  • 71
0

Well, it's not only twitter that is based on Ruby on Rails. There is a long list with successful new projects - http://storecrowd.com/blog/top-50-ruby-on-rails-websites/ .

May be the only annoyance referenced by lots of users is the performance. However Ruby 1.9 addresses that problem and is compatible with most of the libraries already. Furthermore performance problems are function of Developers' programming knowledge in most cases and rarely a function of programming language speed.

My advice is just to give it a try for a week or two :)

Stan Bright
  • 1,355
  • 1
  • 15
  • 22
-2

Are you planning on having a site as heavily trafficked as Twitter?

If not, why are you worrying about issues that only came up under massive load?

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • um, who knows? Before I set out on deciding which "tools" to use, I would like to know if there are any outstanding issues. For example, why would I want to use mysql if sqlite is available? – sdot257 Dec 06 '09 at 01:59
  • Outstanding issues you have zero chance of encountering probably shouldn't affect your decision. – ceejayoz Dec 06 '09 at 16:08