FiveRuns Blog

On Rails production performance and monitoring

Posts
No comments

Rails TakeFive: Five Questions with Cliff Moon

Welcome to the latest in the FiveRuns Rails TakeFive interview series, where we pull together the best minds in the Ruby on Rails community to share their point of view on all things RoR. This week, we’re happy to have Cliff Moon, a web application developer for Powerset in San Francisco share his thoughts on Ruby on Rails.

FiveRuns: Welcome, Cliff, and thanks for joining us. Let’s talk about Merb – their official language is all about being agnostic – ORM agnostic, JavaScript library agnostic, and template language agnostic – what does this mean? And what does it mean to be “thread-safe”? Is there promise in implementing Merb alongside of Rails?

Cliff Moon: Merb is pretty great. We’ll be launching our product front end in Merb. The component agnosticism of Merb simply means that it doesn’t tightly couple with any one framework for ORM, JS, etc. In exchange for some pain getting set up, it buys you more flexibility and a smaller runtime footprint since it doesn’t throw the kitchen sink into your app.

One of the reasons we chose Merb for our front end was its ability to safely handle concurrent requests in a single mongrel. The front end is IO bound waiting for a backend service with a highly variable latency. It’s pretty much unacceptable for an entire mongrel to be out of commission waiting for a backend service. The traditional response for a Rails app is to simply increase the number of mongrels running on a host to the number of concurrent requests one expects see at peak traffic. The problem there, from a scalability perspective, is that each mongrel will have a pretty hefty memory footprint. So it means that you would have to commit more memory capacity per page served. For our app, we can serve about 5 concurrent requests from a single mongrel with Merb. The best part is that we really haven’t given up any productivity for these performance gains, at least beyond the initial hump of learning the framework.

FiveRuns: What about Rubinius – what do you see as the major advantage here, even though we’re obviously in the early stages?

Cliff Moon: Having more choices in Ruby runtimes is a very good thing. JRuby is pretty great, but we use too many C extensions for it to be a seriously consideration beyond some isolated applications. But we badly need a more stable runtime that can fully utilize the entire library of existing Ruby code. MRI has some pretty serious issues with memory management, threading, and performance in general. The memory leaks alone mean that it is unadvisable to run a Ruby daemon without some kind of supervisor like god or monit. Tom Werner, a colleague of mine, spent a good deal of time tracking down memory leaks in god only to find that the leaks were in the interpreter. It’s a good read, and it illustrates that alternatives are sorely needed. Whether or not Rubinius will catch on remains to be seen. Overall it is a good thing. The lack of a stable runtime can only hurt adoption, and Ruby is a language that deserves a runtime that doesn’t feel like a toy.

FiveRuns: There was a great article recently on the Rails community in Austin and the Austin on Rails user group specifically. Are you part of a local user group? Tell us about your local community, what you love about it, how it is grown, and what challenges the group sees ahead of itself, in both the near and long term.

Cliff Moon: I was a member of Philly on Rails before I moved out to San Francisco. It was pretty much my introduction to both Ruby and Rails and I met a lot of cool folks there. I still lurk on the mailing list, despite my relocation. The main challenge I see for user groups is remaining friendly and open enough for people new to Ruby and Rails while still maintaining the interest of more senior members. At a certain point, the issues you need help with get to a level of sophistication that pretty much outstrips the experience level of the group. You stop submitting questions since you know they won’t be answered, and the mailing list pretty much gets consigned to discussions about whether modules or inheritance is better.

FiveRuns: Is Rails still waiting for its killer app, or are we already there with Basecamp, Highrise, Twitter, Hulu, Revolution Health, etc.?

Cliff Moon: It’s interesting that one would even ask this question. “Killer app” traditionally refers to an application or service that is so good it drives mass adoption of a device, service, or platform. If that is the case, then I’d say that no, there really isn’t a killer app for Rails quite yet. I can, however, tell you what a killer app for Rails would look like. If one of the big social networking platforms were to tightly couple their API to Rails, then you’d see your killer app.

FiveRuns: In his RubyConf 2007 Keynote presentation Matz stated that “the suits people are surrounding us” – is this increasingly the case with the community, and what does this mean for the future of Ruby?”

Cliff Moon: I guess the idea here is that suits ruin every technology in which they take an interest. As went Java so goes Ruby and so on. I don’t buy the underlying premise; that commercial interest will ruin Ruby. First of all, suits have money. I like money. Money feeds my family and buys me beer. Suits getting interested in Ruby means there will be more money to compete for Ruby talent. That is a good thing. Will big enterprisey companies like Innitech and Innitrobe adopt Ruby and Rails? Yes, it’s already happening. Will they ruin Ruby? Only for the people working there.

What folks seem to forget here is that Ruby and Rails are both open source. If you don’t like where the projects are heading, then fork. If your fork is superior then all hail the new project. And if your employer is ruining the fun of programming in Ruby then quit. Lots of great companies are hiring.

Cliff Moon is a web application developer for Powerset in San Francisco, where he’s helping to build the next generation search engine. He’s one of the many Java refugees who hopped over the fence to Ruby. When not hacking together Ruby applications Cliff can usually be found either brewing, buying or drinking beer. If you want to hear him ramble about Ruby stuff, he’ll be giving a talk at the Philly Emerging Tech Conference coming up soon.

Bookmark and Share
Continued Discussion

No comments have been added yet.

Contribute

Continue the conversation and share your thoughts. A name is required. Your e-mail address will not be displayed on the site. Textile formatting may be used in your comments (but will not be rendered in the live comment preview).

→ Posted by You on August 07, 2008 at 06:33 PM

Flickr

FiveRuns tagged photos on Flickr.

  • FiveRuns Booth
  • IMG_4690
  • FiveRuns RailsConf 2008
  • FiveRuns RailsConf 2008
  • FiveRuns RailsConf 2008
  • IMG_4692
  • IMG_4686
  • IMG_4685

See more FiveRuns tagged photos…

Other Categories

Entries are also organized under the following general topic categories.