Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
techno.blog("Dion"): Better, Faster, Lighter Ruby
[go: Go Back, main page]

March 08, 2005

Better, Faster, Lighter Ruby

Category: Java, Ruby, Web Frameworks

Justin Gehtland, co-author of Better, Faster, Lighter Java, has blogged about his experience porting an application running on a Java stack (Java/Spring/Hibernate/JSTL stack), to Ruby on Rails.

On speed of development

First of all, I’ve been able to re-implement 80% of the functionality in just under four nights of work. Some of that most assuredly has to do with the fact that I understand the domain pretty thoroughly by this point. But a lot of it has to do with the sheer productivity of the framework.


On the dev cycle

Secondly, implementating changes and running tests takes no time whatsoever. The configure, compile, deploy, reset cycle for running tests is time consuming on my original stack, and non-existent with Rails. This particular facet caught me off guard; I wasn’t expecting that to make much of a difference to the overall experience.

On performance

Rails is actually faster.

At runtime, the Rails implementation is at least as fast as the original stack in almost every case, and for a not-insignificant portion of actions, actually performs better. I haven’t run benchmarks yet, but I will as this effort progresses, but I was shocked (shocked, I say) to discover this.

Now, this is certainly anecdotal, and hasn't been run under any load tests or what have you.

A lot of Java guys poo-poo this idea, since "Ruby doesn't have good threading support" etc. Actually, due to the way FastCGI does its work working a Ruby process to a thread, Rails can absolutely scale.

Maybe Justin will be writing a new shorter Better, Faster, Ligher Java?

Page One: @see Ruby

;)

Posted by dion at March 8, 2005 10:14 AM | TrackBack
Comments

Hey Dion, I have a bridge to sell ya :-)

You gotta start reading with a more critical eye, man. He spent 5 months writing an app and then re-wrote 80% of it in a new language in 4 nights? That alone should get your radar jangling.

Then he says it's fast, sometimes even faster than the old stuff - but he won't know for sure until he measures it. Huh? He hasn't done measurements but he can say one or the other is faster?

Sorry Dion but the whole blog entry you're referring smells from one end to the other.

Posted by: Mike Spille at March 8, 2005 02:30 PM

Rewrite is the key word, though. I spent a couple months working on a J2EE project and I have a pretty good handle on PHP. Give me 4 days and I bet I could whip up 80% of the site, too. Granted, it would probably suck, but it would work ;-)

Posted by: PJ Hyett at March 8, 2005 03:36 PM

Justin has followed up, and it looks like he is going to follow up with metrics soon.

I think it is OK for someone to talk about their gut feelings. Does it mean they are correct? no. Can they express their opinion? sure. Do I think Mike Spille should do hard core enterprise work w/ Ruby? probably not :)

Dion

Posted by: Dion at March 10, 2005 11:59 PM

Good blog, Dion. I can fill in some of the holes for you. Let me point out that the current Java version was also a rewrite of another Java version. The company is based in Austin, and I'm acting CTO. The compelling reasons to move are clear. The feedback cycle in Java takes too long, and you need to write three or four times the lines of code to do meaningful work. We'd guess that the productivity gains on Rails are probably a factor of five or ten...very significant.

In the past, Java had always trumped more productive languages based on the community and the strength of frameworks. Now? I'm not so sure. Rails is going to make a dent.

I'm not ready to do Rails for everything, yet. But it's a compelling language for this application, and there are many like it. We believe it will perform, and scale. The application, indeed, feels much, much faster. I'll bet that the numbers will bear that out.

And I'm in the process of writing a book on the experience. I'll release details soon. Better, faster, lighter...er...indeed.

Posted by: Bruce Tate at March 11, 2005 04:32 PM
Post a comment









Remember personal info?




Sorry for this CAPTCHA, but my comment spam is a nightmare :(