More reasons for Rails NOT to be mainstream 11

Posted by Bob Silva Thu, 31 Aug 2006 02:02:00 GMT

Kevin Clark, a fellow #cabooser, and great programmer posted an article on his blog today that for one reason or another sparked some contraversy. He wrote about Rails coding practices that he believes (either through experience or following the core mailing list) should not be used anymore. The pros and cons of scaffolding in production, engines, components, protected instance variables and help vampires are all things that have been discussed openly in various venues and Kevin advocated against them with his reasons why.


What happened next is hard to describe but it's like a pack of wolves came out and shredded him apart. Not sure where these "Rails" programmers came from but I hope they don't stick around. Besides, how can you get upset at a guy that looks like a cute little chia pet?

LiteSpeed 2.2 eases Rails Configuration

Posted by Bob Silva Wed, 30 Aug 2006 21:22:00 GMT

The guys over at LiteSpeed really stepped it up this time with their support for Ruby on Rails in their newest release of LiteSpeed 2.2. The ability to configure and deploy a Rails site now has its own configuration page in the administration GUI.



Once you define the defaults for RoR applications on your webserver, you can setup and deploy a site in just a few clicks. Prior to the 2.2 release you had several options for getting LiteSpeed to redirect requests to dispatch.lsapi, you could use rewrites or 404 redirects. Now in 2.2 you can just use the new Rails context feature. LiteSpeed will handle the connections to dispatch.lsapi.



Speed plus agility, what a great combination. Check out their Wiki for some quick start instructions on getting up and running with Ruby on Rails on their platform. I'm interested in seeing what performance benefits I will receive with their Enterprise Version running Rails on the new SMP server, hope they offer educational discounts.

Ode to MacPro 3

Posted by Bob Silva Fri, 25 Aug 2006 00:56:00 GMT

Just a quick little slideshow to show the new setup.

7MB Quicktime Movie

Full time Apple Mac OS X 11

Posted by Bob Silva Tue, 15 Aug 2006 23:45:00 GMT

I've had my MacBook Pro for a couple months now and I've really enjoyed using it. I keep finding out that "things just work", like the time I was rebuiling my PC and Mac laptops and my Linux server had an emergency. I was working on the PC at the time, and...well crap, wheres my ssh program?!? Okay, swivel on over to the Mac, load up Terminal and fix the problem. Or the time I wanted to burn a DVD, gosh darn it, which Burning software do I want to download? Swivel over to the Mac, stick the disc in and click a few times and I have my DVD burned.

Now the MBP hasn't been without problems. I ran into the (now admitted) battery problem during Rails Conf. Couldn't use my MBP unless I had a plug to give it some juice. Also, when it's hooked to the 30" cinema, occasionally, the output gets corrupted and I see little aquagreen dots all over my desktop, a reboot usually clears it up thankfully. Back to my story, I haven't totally swapped to the Mac because I still have a (rather new) desktop PC at home. AMD 64-bit X2 3800+ with a couple terabytes of disk space, 4 gigs of ram and 3 21" CRT's hooked to it. I really enjoy this setup with three monitors and didn't really want to give it up just to use the MBP at home.

Out with the new, in with the newer. I figure I wouldn't ever move to Mac all the way if I wasn't forced to use it both at home and at work, so I bit the bullet and ordered a shiny new MacPro for home. I had a limited budget so I had to scale back for now but I got the essentials. I went with the 2.66 duos, left memory at 1G, cut the hard drive to 160GB (I'll pull the 4 Hitachis out of my current desktop), added the extra SuperDrive and Bluetooth (got my free 2GB iPod Nano after rebate) and best of all, 3 20" cinemas. I'll post some pics when I get it all setup. It's gonna be sweet!! I hope they don't wait too long to get PC drivers out for the new hardware just in case I need the occasional native PC app. (I use Parrallels at work already and it's OK, but not for gaming.)

The trade off? Gotta sell my '90 GMC 3/4 ton pickup to pay for it. That's the only way I could get the wife to reluctantly agree to it. That and a few dinners followed up by **censored** should smooth things over pretty well. A new Mac *and* more sex? I think you know who's getting the better deal here! Update

The monitors arrived today, MacPro still hasn't shipped so I can only drool over this picture.


Choosing a Rails Deployment Platform - So Many Choices 4

Posted by Bob Silva Sat, 12 Aug 2006 16:13:18 GMT

Choosing a Rails Deployment Platform is a well-documented but still confusing activity. You have so many choices you need to make, FCGI, Mongrel, Apache, Lighttpd, LiteSpeed, LSAPI, Rewrite Engine, 404 Handler, mod_proxy ... and the list goes on.

The Plan

I just ordered a new webserver to replace my aging Dual 850mhz box and I thought I had a plan worked out. Since I still have legacy PHP applications, I chose to use LiteSpeed to power them. LiteSpeed outperforms Apache/mod_php by quite a bit of margin when serving PHP generated content. LiteSpeeds UI for administration also makes it much simpler to manage all the VIrtual Host setups as well.

All the cool kids are using mongrel nowadays for Rails Deployment. Always wanting to hang with the cool kids, I decided that Apache2 would proxy balance to a mongrel cluster for my applications. I planned on running Apache2 on a separate interface anyways to host my projects with SVN.

Testing It

Ok, we have LiteSpeed and Apache2 running on different interfaces on the server. I run ab2 against the LiteSpeed/PHP first using a static html file, then using a Hello World PHP page. The static page registered in at 20K+ rps. Wow, looking good so far. The PHP clocked in at 5K+ rps. Pretty good numbers so far. +1 for choosing LiteSpeed to run the PHP applications.

Moving on to Apache2. I created a Hello World Rails application, lit up a 6-pack of mongrels (using a concurrency of 10 in ab2), ran ab2 and WTH????. 60rps. What a let down. I rerun the test just hitting the index.html of the Rails app, and the numbers come back up to 15K+. Doesn't sound right to me so I tweaked Apache for awhile but to no avail.

Just for SAG, I decided to setup a Hello World Rails application in LiteSpeed. For this configuration, I chose the LSAPI and used a 404 Redirect. Since I didn't want my hopes dashed right away, I decided to just hit the index.html of the Rails app. 10K rps. Hmmmm. That's lower than the Apache2 marks. Maybe this wasn't a good idea. So I'm thinking the Hello World will cash in around 45-50 rps. Let's run it. WTH????. Averaging 400 rps in this configuration. I tinkered around with Apache2 some more to try to get the numbers up, but it just didn't happen.

The Result

With the simple benchmarks I did, they gave me enough information to make a better choice for a deployment platform for Rails. I didn't test lighttpd at all and don't plan to. I don't really care that LiteSpeed is a commercial offering, the developers listen to their customers (even the freeloaders like me) and incorporate changes or fixes quickly. They've been extremely supportive of the Rails community and continue to make changes tailored to running Rails applications.

Rails Documentation Fund 2

Posted by Bob Silva Fri, 04 Aug 2006 22:22:08 GMT

There is an effort underway to raise $5000 to fund the update and expansion of the Rails API documentation. This should be a worthy cause if they find the right person. Give whatever you can give, in the end we all benefit.

Rails Documentation Fund