Jeff Mesnil
Weblog · Dev · Photos · Books

Rails is slow, J2EE is Fast - Haven't I already heard this?

February 28, 2005

On Dion's blog, someone commented that Rails is 8x slower than J2EE (don't get me started on such benchmark figures...).

It reminded me of the old "Java is slow, C is fast" argument that I heard some years ago (I still hear it but mostly from Slashdot crowd these days). Then people realized that C and Java have their respective strength and weakness and are best used in some areas than others.

So maybe, we will realize that the same thing apply here and that Java/J2EE and Ruby/Rails serve different purposes and are better suited for different kind of web applications. Maybe, just maybe, one size does not fit all...

I'm not sure I'll build the next Google or Amazon on Rails. But there is also a range of web sites for which Rails is the way to go. Besides, it has a great quality long forgotten in the Java world: that simple things should be simple and complex things should be possible.

I developped in Java for a living and enjoy it most of the time (a little less since I was introduced to Ruby by the way) but sometimes the complexity of Java/J2EE saddens me and I'm not talking about EJB only.

I understand that there are some kind of applications which require this complexity and I contributed to it (on a J2EE server, a JMS one and a distributed transaction manager).

But there is way much more applications which don't need it and would benefit from some simplicity.

From that point of view, developping on Ruby and Rails is an eye-opener. I saw that it makes simple things simple. Now I need more time and experience with it to see if it is possible to do the complex stuff. So far, I've got a good feeling about it.

I plan to talk a little more about my (good) experience with Rails and Ruby. And the best resource from a Java perspective is Brian McCallister's Waste Of Time.

As an aside, maybe Rails is 8x slower than J2EE but it is also 10x more productive so that compensates it... What a bunch of meaningless figures!