Friday, September 16, 2005

Optimize for Productivity

Choosing a software stack for building a website isn't easy. There are lots of factors to consider. Scaling is an important one.

"Scaling" can be split into two factors: 1) how much hardware you can throw at the problem, 2) how well the framework/language utilizes the hardware.

When it comes to adding hardware, Ruby on Rails scales like any LAMP setup -- you can add app servers and web servers fairly easily. (Well, Rails isn't LAMP, it's LAMR.) The major bottleneck (and even then only for enormous sites) is the database server, but that's a general LAMP issue, not a RoR issue. (Correct me if I'm wrong, but I believe the same limitations apply to php, perl, and python-based setups).

Rails may not be able to outperform Java on similar hardware (on the other hand, it may. The jury's still out.) but there is enough evidence out there to safely conclude that Rails' performance doesn't suck. It's not ridiculously slow, and in some tests, it's on par with (or superior to) Java.

Some readers will be pulling their hair out here, thinking "under what circumstances?" Since Java is statically typed, which helps with some performance optimizations, there will be setups in which one can squeeze a lot more perf efficiency out of Java than Ruby. But just pretend for a minute that [1] (at least some of) those optimizations wouldn't be gotten around to, and [2] they still wouldn't, say, double the capacity of the hardware. Nobody knows for sure, but it seems reasonable.

In most cases, if hardware efficiency is fairly similar for several solutions (e.g. neither one is, say, 2x as fast as the other), performance questions become secondary to questions of development cost. Developers are way more expensive than hardware. If you need to use a beefier server to handle RoR, but it allows your developers to be slightly more productive, that's a good trade-off.

So, Ruby probably never outperforms Java. But in many circumstances, its performance is probably somewhere in the same ballpark, and we have several examples of sites that use it on a moderately large scale with success. For 99% of web development, that should be plenty of evidence. Right?

Don't agree? Fine. What would it take to convince you that RoR can scale? Why do you believe that any other language/framework can scale?

Employee #1

Two days ago, I accepted an offer to join a start-up. After the founder/CEO, I'm employee #1 and CTO. I'm very excited.

This is a change for me. I'm used to being a founder, not an employee. I'm used to feeling (and having) ownership. I'm spoiled, and it's been difficult to accept that I'm not always entitled to everything.

But, you know, starting a good company is hard. Really great business ideas are harder to come across than the Yeti. I spent roughly a year trying to come up with ideas, and I batted .000.

So I feel lucky and thankful. I met The Founder just as he was looking for a tech person to join him. And unlike me, he's got a Great Idea. And I'm going to help knock it out of the park.

This space == my memory bank through this process.