Pivotal Labs

Why Rails will Reign Supreme, revisited

edit Posted by Christian Sepulveda on Tuesday March 18, 2008 at 07:25PM

Following up from my previous post on the same topic, I'd like to clarify a few points that hopefully address several of the comments on the post.

While the title of the post may be provocative, I am not asserting that Ruby/Rails will be the only framework; I generally don't believe there needs to be a single framework or in similar absolutes. (For more on this, see my post "Framework Wars: Now all Restaurants are Taco Bell") The following sentence in the post captures the scope of my position:

I think Ruby/Rails can and will replace Java as the language and platform of choice for software development in the enterprise and will similarly establish itself as the premier option for Web 2.0, cementing the bridge between both markets.

Java has the largest market share, estimated between 20% and 30%, depending on your source. (One example, though there are others, can be found in the following article "Programming Language Trends." ) Basically, I think Rails will have the largest market share; as Java is currently the default option for software projects (especially in enterprise), I think Ruby/Rails will be the new default. But as with Java, other frameworks will still thrive and will be more appropriate in various cases. I think this shift will take place over the next two to five years.

There are three critical questions that need to be addressed:

  • Is Java's position vulnerable?
  • Is Rails technically viable?
  • Why Rails, as opposed to another framework?

Java Vulnerability

The majority of my previous post on this subject addressed Java vulnerability; I think PHP was a disruptive innovation that changed the economics of software development. It is hard to justify a software project as requiring $10 million, more than 20 developers and a few years when a similar application was just created by two developers in six months.

PHP delivered the first blow that has made Java vulnerable, as stakeholders are increasing pressure and questioning of the costs of development. However, Java is general purpose langauge and there is a considerable investment in existing applications and infrastructure. While vulnerable, a successor needs to have similar flexibility.

Rails Viability

Rails is not without its problems, as I noted in the previous post:

There is much work to be done on Rails though. There are scalability issues and integration patterns are immature (on average, at least).

Scalability is the most frequently cited criticism of Rails. (I will reference the two related topics of scalability and performance simply as scalability.) It should be noted that for enterprise, which is the primary target audience regarding the claims in this post, most applications do not have more than a few thousand users and scalability is not much of an issue. However, scalability for a popular consumer web application and an internal IT application is very different. I am not trying to simply dismiss the scalability questions, but I think it is only one factor and a broad set of issues affects technology selections.

Twitter is probably the largest Rails application and there has been much discussion of Twitter's scaling challenges, though the Twitter team continues to improve the situation. Similarly, Facebook is hailed as an example of PHP scaling. While there is no Rails app (to my knowledge), which has scaled to Facebook traffic, Facebook and Twitter are not common scenarios. In these cases, the elected platform will only help or hinder to a degree; the decisions of its developers and how they use their technology options will have the overwhelming impact.

Rails scales horizontally, similarly to PHP, though perhaps not as efficiently in its use of hardware. That said, I think Rails is commonly criticized for scalability problems because it is unfortunately easy to make naive decisions, which still follow Rails conventions, but cause scale problems at low user or page volume. Is this a fundamental failing of Rails? Yes and no. On one hand, you can make decisions with any framework that will cause scalability problems early. However, part of the promise of Rails is that if you follow the conventions, you will be okay.

Scalability is not quite the black, unknown art that it used to be. Most of the patterns and approaches to achieve high scalability are well understood. Java had significant scalability and performance problems in its youth that were addressed. Today, some massively scaled applications are written with Java. Currently, there are Ruby and Rails initiatives that are working on improving performance and scalability, from Rubinius to various ActiveRecord improvements. I expect to see major Rails scalability improvements in the coming year. As an example, the Facebook application Friends for Sale is a Rails app with 300 million views a month.

Why Rails?

Assuming Java is vulnerable and technical viability isn't an obstacle, why Rails and not another framework? I think there are two other commonly cited alternatives: PHP and Pyhon/Django.

As I noted earlier, PHP is responsible, in my opinion, for first exposing Java's vulnerability to be replaced at the market share leader. However, I think it is hard to use PHP for general purposes beyond web applications and this inhibits its adoption in enterprise. For example, I can't imagine a socket-based message queue in PHP.

Another challenge for PHP, in my opinion, is that sustainable development is not as easily achieved as it is with Ruby. Automated testing is more flexible in Ruby/Rails and I think the abstraction/plugin architecture of Rails leads to more maintainable applications. (I know of a PHP application, whose developer is quite talented and decided to port from PHP to Rails. The Rails version had only 9% lines of code of the PHP version. While it can be dangerous to draw conclusions based solely on LOC, an application that is 9% the size of the original is easier to maintain and is more flexible.) While such design patterns are possible in PHP, I don't think they are employed in the average case and I think the average case influences market adoption.

Python and Django are commonly compared to Ruby and Rails. A simple google search of "rails vs. django" yields numerous articles. Ignoring zealot rants on both sides, I think most balanced discussions conclude both platforms can enable productive development teams and the creation of compelling applications. I don't think technical comparisons inform why Rails has the edge in gaining market share, but market trends themselves.

Consider the following data that I collected by searching on two popular job sites:

From Monster: Rails - 267 jobs, Django - 143 jobs
From Hot Jobs: Rails - 25 jobs, Django - 8 jobs

I offer these data examples only to convey that I think more developers/stakeholders are taking the Rails plunge than Django. As Pivotal and others have experienced, there are multiples to be gained in productivity gains. I am not claiming Django can't offer similar productivity gains, but I think it would have to offer even multiples over Rails to get significant numbers of stakeholders or developers to shift from Java to Ruby and then to Django. I haven't heard anyone claim Django offers productivity multiples over Rails.

Whether you believe the current Rails attention is based on merit or hype, as more and more organizations adopt Ruby/Rails, a synergistic, self-sustaining cycle takes hold and this is the primary consideration in my opinion. As referenced in my last post, Geoffrey Moore, in "Crossing the Chasm", discusses the adoption curve of technology. He notes that there is a gap in the adoption curve between a relatively small market of early adopters and the huge mass market. Crossing this "chasm" depends on keeping up with market demand and addressing any issues that hinder adoption. This is can be daunting for any organization, but Rails can leverage a strong and motivated community. Rather than a single organization with a few developers trying to bridge any gaps, there are many developers in multiple organizations (and independents) actively working to improve Rails. A few examples (that are also already achieving good results) include Engine Yard, Rubinius, jRuby, and Glassfish.

I close with the short version of my argument:

Ruby on Rails will replace Java as the programming language and platform with dominant market share. Java is vulnerable because alternatives such as PHP have proven viable for application development with dramatically lower costs. While Rails has its shortcomings, concerns such as scalability continue to improve; Rails is not unlike other early-technologies in this regard (consider Java in 1996-98). While other platforms may offer similar productivity benefits to Rails, such as Django, Ruby/Rails is growing in popularity and adoption. This growth can lead to positive, self-sustaining feedback cycle as each phase of Rails adoption improves Rails and encourages more Rails adoption.

Comments

  1. Ex-RoR Fan Boy Ex-RoR Fan Boy on March 20, 2008 at 06:32PM

    "Ruby on Rails will replace Java as the programming language and platform with dominant market share"

    I think you are wrong.

    By the way I recommend you this read: http://antoniocangiano.com/2008/03/20/djangos-tipping-point/

  2. Christian Sepulveda Christian Sepulveda on March 21, 2008 at 05:57PM

    To Ex-RoR Fan Boy: Do you think I am wrong because you don't think Java is vulnerable or because Rails won't be its successor?

    Given the link you provided, I assume it is the latter. I think the comment thread on the post you noted actually has many examples the establish the market momentum of Rails -- both in its own right and over Django.

    Claiming market momentum, obviously depends on what metrics you use, but I think most of those available give Rails a significant edge.

    Now if you don't think market adoption is a primary issue, then that would be a different argument.

  3. Ted Ted on March 22, 2008 at 06:43AM

    "I haven't heard anyone claim Django offers productivity multiples over Rails."

    That's because most of us, Python programmers, are busy coding. We don't blog as much as Rails weenie. We solve problems. We don't do marketing.

    I've used both Ruby and Python for professional work. I can tell you right now up-front no bullshit that Python has more mature frameworks in any fields. Pick a field: web-development, science, statistics, math, GUI, graphics, binding, network programming.

    Both languages are similar, I don't see why I can't work faster than Rails developers. I definitely can see myself working faster than Rails developers because I don't have to struggle with very-buggy-Rails-plugin.

    I remember using Streamlined, you know, the one that was being touted the Rails "admin" interface answer to Django's. I used that framework (or plugin, whatever) exactly this time around last year. Boy, it sucked so bad. The documentation was basically one wiki page. It didn't handle upgrade properly. It was badly designed.

    Oh, did I mentioned the people behind StreamlinedFramework are not some average Joes? You know them names? Justin Gehland? Stuart Halloway? famous book authors....

    I'm not the only one who echoed the same problem shows up repeatedly in Rails community. The attitude of Cowboy Coder will sink Rails. Oh, did I forgot to mention Zed also said the same thing?

    Let's digest a little bit on Python vs Ruby community.

    FriendFeed, Paul Bucheit (Gmail fame), is written in Python. Lots of smart people here.

    YouTube, scale like mad, is written in Python (95%), the company is filled with super smart people.

    Google, anyone knows Google, filled with super smart people.

    Industrial Light & Magic, animation and visual effect company that does cool movies like Pirates, War of Worlds, etc, filled with strong engineers/math, is using Python.

    The old Yahoo! Mail was written in Python

    Facebook uses Python (sure, PHP for main page, whatever, I asked their engineers, it's Python).

    Let's see Ruby community. Ok?

    Twitter: send message 37Signals: another project management (with no Gantt Chart, too hard) 43things: put 43 things, uh-huh... nothing else BlinkSale: send invoice online, uh-huh, again, nothing else

    So I'm seeing trends here: smart and strong Engineers and Computer Scientists are using Python. Yet another Me-Too "Simple Product" is using Ruby on Rails.

    I suggest you to sit down and think hard before you downplay Python in one way or the other.

  4. AW AW on March 23, 2008 at 01:22AM

    You heard the man -- if your web application is based on RoR you're doomed.

    Doomed, I tell you! Doomed!

    captcha: garage.

    How fitting, given the post. =D

  5. Brian Takita Brian Takita on March 23, 2008 at 06:48AM

    “First they ignore you, then they laugh at you, then they fight you, then you win.” -- Mahatma Gandhi

  6. Christian Sepulveda Christian Sepulveda on March 23, 2008 at 09:53PM

    Regarding Ted's comment, I don't think anyone is claiming there aren't smart people using Python.

    And as far as the successful sites you mentioned, I don't think their success was due to using Python, but their ability to build a compelling product.

    There have been many sites that have failed using Python as well, not because of any technical shortcoming of the language, but the site failed to gain enough interest to sustain it.

    Similarly, Twitter isn't successful or popular because it uses Rails nor did Facebook garner a $15 billion valuation because it uses PHP.

    I've tried not make this a religious debate of Python vs. Ruby/Rails or a similar face-off. I am sorry if that hasn't been clear.

    If you are interested in a challenge to my position that isn't asserting technical superiority either way, then I encourage you to look at: http://blog.citrusbyte.com/2008/3/22/why-rails-will-not-reign-supreme-and-why-you-shouldn-t-want-it-to/

    or the link referenced in the first comment or this post.

  7. Evan David Light Evan David Light on March 24, 2008 at 06:41AM

    Insightful post. I started writing a response but it grew a little unwieldy. Ultimately, I'm unsure of the Ruby/Java-in-'98 analogy that you used (even though I use it too). Read more here: http://evan.tiggerpalace.com/?p=41

  8. Giles Bowkett Giles Bowkett on March 24, 2008 at 04:35PM

    Reigning supreme is for TechCrunch to worry about. We're programmers; we need to make our decisons based on rational reasons, not social proof. Whether Rails reigns supreme or not is a different question from whether or not Rails continues to be useful and valuable and fun to program in. I strongly believe the latter question is the only question worth asking.

    It bothers me that people are having these debates about the popularity or non-popularity of Rails. It's entirely possible that we're entering an era of polyglot programming, where no one language clearly dominates; in fact it's possible that past situations where one language clearly dominated only existed in the first place because we didn't have the Internet and couldn't accomodate a more varied and interesting programmer culture. I think it's absolutely DISGUSTING that programmers are so fixated on which programming language "dominates" the other languages. It's inappropriate to a multicultural, multilingual society to be seeking a monocultural and monolingual approach to programming. This whole question is so fucking WRONG I just want to slap people.

    Fortunately I think history is going to slap you for me. I'm going on record with my prediction: the age of dominant languages is OVER. Internet killed the programming language star. There is way too much going on in way too many different languages for the idea of a dominant language to be accurate; and there is way too much power and momentum at work in every language's culture for a dominant language to EVER emerge again; and this polyglot situation is so logically INHERENT to open source and the Internet that even if the momentum, the power, the communities, even if all those things were not there, they would spontaneously emerge, because they are ALL inherent emergent byproducts of the Internet itself. There is NO WAY IN HELL another dominant language will EVER EMERGE AGAIN, and I am SO FUCKING TIRED OF PROGRAMMERS WHO CANNOT FIGURE THIS OUT WHEN IT'S SO FUCKING OBVIOUS FROM THE NATURE OF THE INTERNET ITSELF!!!!!!!!!!!!!

    ONE !1 1

    Read Clay Shirky, god damn it.

  9. Mike McLean Mike McLean on March 24, 2008 at 07:13PM

    I lost interest right about here:

    It is hard to justify a software project as requiring $10 >>million, more than 20 developers and a few years when a >>similar application was just created by two developers in >>six months.

    You must have worked with inordinately dumb java programmers.

    Real world, having worked with both and on teams using both, the productivity is the same given the same process and talent.

  10. Christian Sepulveda Christian Sepulveda on March 25, 2008 at 08:14PM

    Hello Mike.

    I've actually had the good fortune of working with some very good Java programmers, in a variety of different companies (some of which are the largest Internet companies acclaimed for their technical talent).

    In all cases where I knew they had working experience with Rails and Java, they all experienced much higher productivity in Rails.

    I don't doubt your experience, but mine is certainly not based on bad Java developers.

  11. R Cober R Cober on March 26, 2008 at 08:25PM

    I agree with Giles

    "..the age of dominant languages is OVER.."

    I do prefer to do my web application development in Rails. I find it more fun and more productive than J2EE.

  12. Jose Ignacio Santa Cruz G. Jose Ignacio Santa Cruz G. on March 27, 2008 at 02:19PM

    Marrying with a programming language is denying the opportunities around us.

    My experience says that Java is ruling the market, at least in Chile there are not so many Ruby development projects. Perhaps in the future I'll have to change my Java t-shirt to a Ruby t-shirt, but not today.

    By the way, there are big companies that still use and mantain systems written in COBOL...

  13. Ruby’s not ready Ruby’s not ready on April 08, 2008 at 06:03AM

    A few really good observation about the big issues with Ruby:

    http://glyphobet.net/blog/essay/228

  14. Federico Federico on April 16, 2008 at 09:06AM

    Ruby is not specialized enough and it's struggling to find a reason to exist. If it's not comparing itself with Python, it's doing it with Java or PHP, and that's where it's failing. A language now a days needs to be more specialized, like PHP for example.

    Now, when it comes to frameworks, Ruby/Rails doesn't offer anything different from Python/Django, and we are talking about Django, a very unpopular framework. Even Guido, the creator of Python, said he wasn't going to use it. He practically killed Django with that statement. Also, nothing better than mod_php has been created yet, and that's where the power of PHP is, in LAMP itself.

    When it comes to dynamic languages, Ruby, Python, Perl and PHP are great scripting languages, and what's great about them is that they all fight for the same cause: Making static languages dynamic.

Add a Comment (MarkDown available)