Matt RaibleMatt Raible is a Web Architecture Consultant specializing in open source frameworks.


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Scaling with Rails

Whenever I talk to developers in the Java community about Rails, the first question out of their mouth is usually "But can it scale?" Today, David has written a nice post titled It's boring to scale with Ruby on Rails.

The one thing that I see time and time again is that Java developers don't seem to realize that some of the highest traffic sites on the net are using LAMP stacks similar to what Rails advocates. IMHO, I don't think "Rails can't scale" is a valid argument. In fact, I don't know if there's any argument or way to put down Rails anymore.

As a developer, my guess is the rates for programming in Ruby developer are less than for programming in Java (unless you're a Ruby Superstar of course), so that's one reason not to program in it. However, since Rails is one of those new bright and shiny things, chances are you might be able to get high rates for it. As far as Enterprise Adoption of Rails, unfortunately I think that's still pretty far on the horizon. I think the hardest part is convincing management that they'll be able to find developers to support it. Mind you, I didn't say good developers, just developers. Period. This is information I've gathered from talking to my Java developer friends.

Try convincing a Fortune 500 company to program in Rails vs. Struts and they'll probably choose Struts because there are thousands of Struts Developers. Is this a good decision on their part? I don't think so. I think it's more important to hire smart people that can learn a technology, rather than hiring those that know a technology. Of course, if someone knows a technology really well, there's probably no harm in hiring them.

I think Rails can become a real contender in the Enterprise if managers can be convinced that it'll be easy to maintain Rails application. Remember that most of software cost is maintenance. Because of this, the whole "it's super productive to develop with" doesn't matter so much - does it? Are Rails applications easy to maintain? My guess is yes, but how do you convince CTOs and CIOs? Another thing I think Rails needs for Enterprise Adoption is good tool support. Drag and Drop type of stuff. Why? Because management loves that stuff (because then they can develop apps) and it's a great sales tool. ASP.NET has been successful because of Visual Studio, not because of its ease-of-use and simple syntax.

Will I learn Rails and use it to develop applications? I certainly hope to, but it's hard enough convincing companies to use something other than Struts - so I don't know if I'll have much luck in selling Rails. The one cool thing about my new job at Virtuas is its an open source company, not just a Java open source company. This opens the doors for me to learn about Rails (and others) and compare them to Java Web Frameworks.

Update: Aaron Rustad has written an interesting article for DeveloperWorks that compares Rails to Struts+Hibernate: Ruby on Rails and J2EE: Is there room for both?

Posted in Java at Jul 12 2005, 08:45:26 AM MDT 28 Comments

I wonder what kind of capabilities RoR offers for these high-end enteprises services J2EE provides? I'm not aware of any "REE" ;-), and before any stack can run in these really demanding environments, it needs mature services (global transactions, asynchronous, document-style messaging, gateways to legacy systems/resources, management/monitoring--all of that provided today by J2EE)

Scalability really is such a loose term, it could mean anything. It's straightforward to scale a stateless app that fronts a single database, but to me that simpler case breaks down when you start talking about integrating different systems in a transactional manner.

Rails seems to me a more dynamic and simpler alternative to a Struts+Hibernate combo, but I don't see it as an alternative to J2EE in any way. I also think there is room in the Java space for similiar architectures built on lightweight scripting environments like Groovy. I'm particularly excited about what I see happening with Grails.


Posted by Keith Donald on July 12, 2005 at 09:08 AM MDT #

I'm really 'sick' of this Ruby/Rails tam-tam :).
Why on earth are people reinventing the wheel instead of improving it?
And where is Hani when we need him :) ?

Posted by Ahmed Mohombe on July 12, 2005 at 09:09 AM MDT #

Can't wait to actually play with it a bit. I could think of a lot of arguments against (scalibility of the /development process/ being the most important), but the way to really find out is to actually do something with it. It's good to learn a new language now and then anyway, and I really dig the minimalistic approach the Ruby community stands for. Now, for my agenda... that's a problem ;)

Posted by Eelco on July 12, 2005 at 09:53 AM MDT #

Agreed, the scaling argument isn't really valid. I think one of the major problems with Ruby on Rails, is, in fact, Ruby itself. Ruby isn't situated to be a language that is pervasive throughout large IT organizations. It just doesn't have the power of Sun or Microsoft behind it, building the tools and establishing the standards. Without that push, it will be less popular than PHP or perl, both of which have a very small share in IT environments. (Note, I differentiate IT and software development, keep that in mind)

Personally, another problem I have with Ruby, related to the lack of tool support, is that the langauge itself bothers me. I just prefer Java so much more. I know, enclosures, and typing and yada yada yada. Say what you will about Java, about the lame generics support, etc... but when combined with an IDE like IDEA, it is truly a very productive language to write in. Going back to an environment where the IDE is not as "aware" of the code and where refactoring is simply a Find and Replace operation wouldn't be productive for me.

Posted by Patrick Lightbody on July 12, 2005 at 10:47 AM MDT #

Completely agree. The maturity of the tools and the capabilities of modern day IDEs are strengths of the Java platform. And Java truly is a productive language to write in.

Ruby On Rails is an application framework. Comparing RoR to a platform like J2EE is like comparing apples to oranges. Comparing RoR to a Struts/Hibernate makes sense, and when you'll do that you'll see fundamental differences in architecture that account for a majority of RoR's simplicity advantages for web applications that front a single database. My point is not all of RoR's advantages can be directly attributed to the fact its built on Ruby--some are--as Ruby is a more dynamic language--but not all of them. Take the ActiveRecord pattern vs that of a DataMapper for example--that's a major fundamental difference with tradeoffs that has nothing to do with the choice of implementation language.


Posted by Keith Donald on July 12, 2005 at 11:47 AM MDT #

If you need to develop an enterprise web application, sure, use J2EE. If you need to develop the other 99% of applications on the web, use RoR. I'm sure I'll get jumped on for that comment, but I strongly recommend you play with Rails for a few days before you chastise me.

Posted by PJ Hyett on July 12, 2005 at 01:50 PM MDT #

Not to be a puss, but we just moved EPSON's developer site from Java to Ruby on Rails. Hope that helps a little bit!

Posted by Jason Wong on July 12, 2005 at 02:34 PM MDT #

I haven't really developed any big enterprise JMS+standalone client etc application. All the development work done by me in the last five years would be better off being developed in RoR. I guess at this stage there is no point comparing RoR again J2EE. As the name suggetss J2EE is enterprise edition but a lot of web based projects which are developed just using Struts + hibernate should be scrutinized and most of them would benefit from RoR approach.

A person who is coming fresh out of college has to learn Struts + Spring middle tier + Hibernate + XML to develop a simple web based application. RoR shines there.

Posted by Neeraj Kumar on July 12, 2005 at 02:40 PM MDT #

I still don't get it -- I've looked at RoR in depth, and the "approach" just isn't revolutionary. It is evolutionary. And let me say, it does a DAMN good job of making things easy for developers. But it is pretty much the same tried and true pattern of web development found in most java, .NET, etc frameworks. I just don't get all the fuss -- why would someone want to switch to a language that is less supported (no refactoring) by tools and has far fewer libraries, just for the sake of an evolution. Maybe I'll take one more look, but honestly, I'd like to hear from folks who use Struts or WebWork and now use Rails, and see what it is that really made the difference.

Posted by Patrick Lightbody on July 12, 2005 at 03:25 PM MDT #

haha LAMP what big sites are you talking about?

Posted by moo on July 12, 2005 at 03:31 PM MDT #


Does any of these ring a bell :,,,, ...
(The latter even kicked out Java in favor of PHP!)

I heard several success stories of people dumping Java EE for LAMP, now I'd be really curious to see the same kind of case studies regarding migrations to Java EE or .NET...

Posted by Xavier on July 12, 2005 at 04:00 PM MDT #

Hey Matt,

Seems like you're beginning making the same transition I did, tell you what, come along to rubyconf and I'll buy you a few beers in return for your shout at apachecon.

As far as the other comments go, sure, rails doesn't have magic async document based messaging with global transactions and BPEL integration. I like that. It means I can't use rails build some horrendous EAI application which talks to hundreds of legacy applications. But you know what, that kind of development is horrible, soul destroying stuff. And it only represents a *tiny* fraction of the development market.

If most java developers were being honest with themselves they'd realise that 99% of apps don't need *any* of that crap. They want a database driven web application, and if you're using SOAP and JMS and distributed transactions to build it, you're wasting your clients' money.

Posted by Michael Koziarski on July 12, 2005 at 04:20 PM MDT #

Forgive my ignorance as I am by no means a programmer. I suppose I might even be considered a pointy-haired guy.

That is so incredibly frustrating to become familiar with one platform and set of contructs (e.g. appfuse/Java EE) only to have them forsaken for the new gadget with the shiny marketing scheme. It is quite ironic (as one of the CEO types) to be called on the carpet for going for those platforms that are "shiny" (i.e. .Net), when all the while the Java EE community can't make up its god-loving mind which glamorous tool it wants to use next.

Meanwhile we have a project like appfuse which not only has merit which I can easily pitch to my investors as possessing a robust scope for development, moreover it has a strong following. I have personally spent over two years becoming familiar and tracking the project. And now I have to worry that it might be abandoned for Ruby????? Arrrrggghhh!

And Java guys wonder why so many of us "CEO guys" choose .Net in the end. Believe me, it isn't because it's the best choice, sometimes it's the only choice. We want to know that our technology will be around as long as our business.

Posted by David Thompson on July 12, 2005 at 04:31 PM MDT #

David - I promise you from the bottom of my heart that AppFuse will <strong>never</strong> be abandonware. I plan on continuing to develop it for years to come. I will not be leaving Java for Ruby - I'm merely interested in learning if the hype is justified.

Posted by Matt Raible on July 12, 2005 at 04:46 PM MDT #

David, living in a compatitive world can be tough sometimes :) But what would you choose, a world (Java) where innovation happens all of the time (and yes, part of innovation/ competition is that most attempts fail), or a world (.NET) that would hardly have any innovation at all was it not for that other, competing world?

Posted by Eelco on July 12, 2005 at 05:08 PM MDT #

J2EE vs. Rails is a boring comparison to make. I did J2EE. I do Rails. I do lots of other stuff too. Tools are just that tools.

But, it might be interesting that my rates aren't at all different between the Java work I do and the Rails work I do. And, I could probably hike my Rails rates right now into the stratosphere because there's a lot of demand for Rails work--more than there are supply of people who know what they are doing.

Posted by James Duncan Davidson on July 12, 2005 at 08:19 PM MDT #

I have to admit that as a software development manager in a medium size IT shop, I really don't consider Ruby or Ruby on Rails viable for us for many of the reasons outlined in the post. Coming out of a Coldfusion environment, with Fusebox (a sort of MVC framework for Coldfusion), I helped make the decision to go with J2EE going forward over .NET. Essentially that decision was based upon us being a pretty hardcore Linux/open source shop with almost know Windows infrastructure beyond desktops and SQL server. Heck we use Groupwise for an email client.

It's taken a year to get the majority of our developers comfortable and familiar with Java, Struts, and iBatis. Unit testing and the like are still sinking in. Turning on a dime and switching over to Rails just isn't very viable. There was also a lot of help available getting developers up to speed on Struts and J2EE in general from structured classes to books to a few knowledgeable java developers we already had on staff. In the Ruby world that's just beginning and even our senior java developers would have to get up to speed.

I've heard people refer to the current fascination as 'Ruby Fanboys' as they rush to play with the shiny new toy. Still I'm I have somewhere on a todo list an item that says I should pick up Ruby as a new language maybe in the next year. I'm expecting mainly just to learn a new language and gain some insights into how another language handles similiar problems. If Ruby eventually develops into a larger solution with more market share I just might consider it down the line. My guess would be though it may very well fit into a niche like Python, another language I learned long ago, but rarely use today even though it does have a dedicated community.

Posted by Ed Gibbs on July 12, 2005 at 08:51 PM MDT #

Dear James, RE: And, I could probably hike my Rails rates right now into the stratosphere because there's a lot of demand for Rails work--more than there are supply of people who know what they are doing. I did a dice search. There were three companies listing Ruby and Rails jobs (all in S.F. no where else). The supply may be small, but the demmand is not stellar either. Two of the companies that listed Ruby and Rails also listed Java, Tomcat, Struts, JSP, etc. as required skills. Let's say, just of the sake of argument, that I don't live in S.F. Perhaps dice is not the best place to search for new work. Can you suggest another job site that has a high demmand for Rails or is this just word of mouth demmand?

Posted by Rick Hightower on July 13, 2005 at 03:31 AM MDT #

One thing I don't understand:
Why TF the Ruby monks don't get on the .NET crowd but loose our(java) time with their 'religion lessons' :).

Posted by Ahmed Mohombe on July 13, 2005 at 04:44 AM MDT #

Ahmed: i agree. wonder why people are keep posting those posts to JavaBlogs when there is no mention of Java. "JAVA"Blogs. Not RubyBlogs hello..

Posted by ahmet on July 13, 2005 at 08:08 AM MDT #

James - Your points about RoR seem at odds with what others claim about RoR.

1) People claim RoR is so great because it is easier for the developer, but you state that those "who know what they are doing" do not number many.

2) You state that you could hike your RoR rates into the stratosphere as a result of 1 - but the point of RoR is that BECAUSE it is so much easier and more productive for the developer, that development is CHEAPER.

That doesn't seem to be the case. It seems to be just another shiny object. I'm with Patrick - the Ruby langauge doesn't have the vast community and support, or even maturity that Java benefits from.

It seems that at the moment due to developers having to learn more "stuff" that development time will increase, product quality will decrease, and that you'd be better off sticking to what everybody already knows and uses (in this context, Java).

Using some templates in Eclipse or IDEA, I'm pretty sure your simple database backed CRUD applications could be built in the same amount of time as with RoR, with the added benefit of the enterprise scalability goodness.

Posted by Lee on July 13, 2005 at 10:19 AM MDT #

Lee, Ruby is as old as Java. When you look at the design decisions Gosling & crew made versus those Matz made, Java is basically C++--, while Ruby is a modernization of Smalltalk. Take that for what you will. I've seen more Ruby programmers who know Java, Smalltalk, PHP, Perl, Lisp, etc., than Java programmers who know any other language.

Posted by anon on July 13, 2005 at 10:41 PM MDT #

For all those complaining about a lack of IDE, I say there is nothing wrong with it. When I was programming with J2EE for a while, I would never have tried to do that without an IDE. With Java, you just can't. But I have gladly forsaken my IDE for my programming in RoR. The language is simple and consistent, and really lends itself to be used in a text editor. And with Ruby on Rails, big refactorings aren't a huge problem, because Rails follows DRY (Don't Repeat Yourself) everywhere. I also feel that the development cycle of Ruby on Rails is better. There's no recompiling, deploying crap that takes ant a minute before you can test one little change. It's just edit, save, then reload browser. Over time, this becomes much more productive.

Also, since most Java IDEs are written in Java, they all have one big problem: they use a lot of memory. Don't deny it, I actually upgraded my computer's memory because it would get bogged down with both an IDE and Tomcat running. I would never want to program like that again.

Posted by Matt Moriarity on July 16, 2005 at 06:38 AM MDT #

Regarding the lack of an IDE, I don't know RoR more than what I've read and seen from the demos. As far as I've seen so far it would be resonably easy to create an Eclipse Plugin to handle RoR projects. There is already an Eclipse plugin for Ruby :

Posted by Damian Harvey on July 16, 2005 at 07:00 PM MDT #

We successfully adopted RoR for some of our minor projects; our "Rails Team" (junior coders, experiences in JSP/Struts) became the most productive after two weeks of self training, reducing helps form system administrator and with no help from senior coders.

The questions we had to face:

1) Does it work?
2) Who will maintain?
3) Who will buy?
4) Will it match unpredicted environments?
5) Is it going to be here in 5 years?

Our topic here falls in question 4), still open with question 5); Java gives proved replies, as PHP or Python, while RoR still doesn't. The day it will, the scaling stuff will probably sound like a joke.

Posted by Luca on July 17, 2005 at 11:36 AM MDT #

Ok...fair is fair. I needed to post this comment for public record. My apologies to Matt Raible. My post above was a bit of a flame (with a pinch of pure whining). Now that I have actually reviewed RoR I can better understand Matt's comments. It is a promising application. (I put a review on my blog.) Thank you, Matt for being a good programmer - i.e. one who is always asking the question, "What's just over the horizon?"

Posted by David Thompson on July 25, 2005 at 01:00 PM MDT #

>Try convincing a Fortune 500 company to program in Rails vs. Struts and they'll
>probably choose Struts because there are thousands of Struts Developers.

I work for such a company and we are taking a serious look at Rails for an upcoming rewrite. We seem to be leaning that way right now and I'm certainly pushing it as hard as I can. I think I've gotten the team on board but the question for us now is whether or not we should rewrite in the first place. If we do chose to rewrite, I'm almost certain we'll chose Ruby on Rails.

Posted by Brian McQuay on August 11, 2005 at 10:54 AM MDT #

[Trackback] Five questions everyone should be asking of the analyst community...

Posted by Thought Leadership on December 26, 2005 at 11:32 AM MST #

Post a Comment:
  • HTML Syntax: Allowed