According to Ezra Zygmuntowicz, I just deployed to production the second Merb app ever written. Woo-hoo. Or today, maybe I should say Woo-hooooOOOooooOOOOOoooo!
If you don't have your ear to the ground, you may have missed hearing about Merb. It's Ezra's new mini-framework written in Ruby. It combines a Mongrel handler and a framework that can route requests and render ERb templates. (Mongrel + Erb = Merb) Ezra started Merb as a better way to handle file uploads. Rails isn't particularly nice about uploads - its single-threading can lock up listeners for long-running actions like uploads, which is no fun. But Merb can do multiple threads, so it doesn't lock up and happily processes multiple requests with only one Mongrel process.
Like most of what I do these days, my Merb app is an internal tool so I can't show it off. But just to let you know how cool Merb is becoming, let me give you the rundown. I needed a little web service that allowed me to upload RPM package files and add them to our own private repository, then run a script to rebuild the repository metadata. So I wrote an extremely simple app in Merb. It consists of one Controller with just one action. Including configuration, the whole thing is under 40 lines of code. I didn't need to make a view template since all I wanted to do was return various result strings, and I could easily do those inline. I also wrote a little client command line script in Ruby that wraps curl to upload the files to the web service. (I had to use curl because Ruby doesn't have a simple solution for doing multipart file uploads.) Most of the code in both the service and the client script is actually error handling, checking and reporting for invalid file uploads.
Working in a pre-0.1 framework can be rough-going. But I'm having fun working with Merb and finding bugs for Ezra, and making some small contributions to the development of the framework. I'm going to keep kibitzing in with Ezra on Merb and helping him with some features as I'm able. It seems like it has the potential to be a good sidekick for Rails for an app that needs uploading, and a nice, simple alternative for small apps that don't need all the power that Rails provides.