FiveRuns Blog

On Rails production performance and monitoring

Posts
4 comments

Rails TakeFive: Five Questions with Ari Lerner

Welcome to this week’s Rails TakeFive interview, our weekly discussion about Ruby on Rails with noted developers from throughout our community. This week, Ari Lerner of CitrusByte and among other things, creator of PoolParty, a framework for maintaining and running auto-scalable applications on Amazon’s EC2 cloud.

FiveRuns: Hi Ari – thanks for joining us! Our own Adam Keys recently gave a talk at RailsConf titled Oh, the Fail I’ve Known. In the talk, Adam outlined a few different kinds of fail: learning failure (the knowledge was available but you didn’t have it), technological failure (you did have the right tool), problem failure (barking up the wrong tree), and so on. If you don’t mind, give us an example of the fail you’ve known?

Ari Lerner: The crumbling foundation fail:

We’ve all been there, the last remaining hours before a deadline and you just can’t get this one feature to work quite right, your specs are falling behind and you haven’t slept in 2 days. You figure you can hack up the remaining features before the meeting even though you know it is just a hack.

What is wrong with this approach is that those features that you implement and hack together end up as artifacts, end up staying in your code. Without a solid foundation for the feature you are constantly hacking against a poorly written weak base. Before you know it, the next crunch time is just around the corner and you are building hacks on top of your original hacks… and so it goes.

I’ve befallen this issue more times than I would like to recount. It can be a struggle, but don’t give up on best practices and the process. The application is really, in the end only as strong as your weakest line of code.

FiveRuns: Now that the Rails repository has been moved over to Github, can you talk a little bit about the benefits of Github and how SCM and agile development go hand-in-hand?

Ari Lerner: Git’s introduction into my workflow has not only revolutionized how I operate as a developer, but how my entire team works together. It is not the only distributed version control system in the world, but the power and flexibility it provides certainly makes the SCM process enjoyable.

I’ve also never felt as connected to other developers on my team as I have when working with Git. The SCM encourages discussion in a way that non-distributed VCSs cannot.

As a development shop, Github allows us to watch our commit frequencies, easily find our points of weakness, open new projects, and then share those with the world. In fact, it’s so incredibly useful that it’s replaced Google as my homepage – that’s how much I appreciate it.

FiveRuns: Bruce likes to talk about “backpacking” through other languages. What others have you dabbled in and/or are you learning right now? How have these travels impacted your work in Ruby? Your overall approach?

Ari Lerner: Knowledge is never a bad thing. Derek Silvers’ public departure from Rails last year summed up my feelings about other languages simply: It’s the most beautiful PHP I’ve ever written, all wonderfully MVC and DRY, and I owe it all to (Ruby on) Rails. With that in mind, I’m constantly learning new languages and techniques, reading through others’ code, and paging through science journals for this knowledge. Amongst several other worthy contenders, the language that has impacted me the most is Prolog. Conceptually foreign, it’s a language that engages both sides of the brain. I’ve recently been writing more C/Objective-C and sifting through yacc/lex.

Ruby – possibly my favorite development language – is incredibly powerful, but it’s ultimately a programming language. I don’t think that Ruby has made me a better programmer, but it has given me the tools to make that process easier. Just as Wesley outsmarts Vizzini in the classic poison scene of “The Princess Bride” with knowledge outside of the scope of the issue at hand, using knowledge outside of my comfort zone only makes me stronger.

FiveRuns: Beyond Merb, there are a great number of alternative frameworks for Ruby, including Nitro, Waves, Sinatra, Ramaze, and even the microframework Camping. Do you have any experience working with these frameworks? What have you seen so far that you really like? Dislike?

Ari Lerner: Rails, Django, Drupal, and others are all great tools – when wielded properly. I think that developers often get mired down when trying to use their one-size-fits-all-tool-of-choice when approaching a problem, and need to think critically about these tools and how to use them. You wouldn’t bring a butter knife to fight a dragon, nor should you… so why use beefy Rails to build a video transcoder when you can use Sinatra?

I have had quite a bit of experience working and contributing to Sinatra and have had the opportunity to push several applications into production. Not only are they maintainable and self-contained, but they are fun to write! I mean, how can you hate the

get '/' do
 "This is the return response from the root body"
end

You can’t.

The trend is growing in the alternative-framework community to slim the framework down and include only what is necessary. This is a great asset for these little frameworks. I hope the trend continues and I look forward to seeing what comes out next.

FiveRuns: Amazon + Rails seems to be a prevalent choice right now,looking way back to the first instances as early as 2006, and seeing how far we have come. Can you talk a little bit about the benefits and challenges here?

Ari Lerner: Amazon’s Web Services is probably the technology that excites me the most at the moment. The unprecedented flexibility enables developers to play, explore and harness the growing landscape of cloud computing. The last time I felt the joy of working with a new technology, I was writing “Drug Warz” on my Ti-83. If you have not yet looked into it, I highly suggest you take a peek.

Now to answer your question!

Cloud computing is all the rage today. Just as Rails revolutionized the web development framework, cloud computing is the next logical step in hosting, but it’s not going to solve all hosting issues. The non-technical challenge is to recognize it is just another weapon in your development tool-belt. The developer is the real secret sauce.

The largest technological challenges are configuration and maintenance of the EC2 instances. there is software on all sides of the spectrum that can aid in automating this process that can aid in automating this process, from my own open-source PoolParty to commercial RightScale that aids in support.

Amazon’s EC2 makes it tempting to throw away proven techniques of deployment and management, but breaking the encapsulation of the methodologies just spells disaster. I am always in favor of using all the right tools available, but in their proper place.

I think it would be a mistake to have your application aware of its own hosting environment. You don’t want your software knowing it is running on a cloud, it should do what it does best… be the application.

Ari Lerner is a solutions architect at CitrusByte in Los Angeles, Ca. He is a core contributor and has been working with Rails since version 0.6. He has recently released PoolParty, an open-source approach for managing and scaling cloud-computing instances. He graduated from the University of Arizona with a degree in Computer Science and in Theatre Arts.

Bookmark and Share
Continued Discussion

4 responses to this entry

Ari Lerner is the man behind the mask. Seriously. Ninja skills.

William Fernandez William Fernandez said:

on July 29, 2008 at 09:43 PM

@Ari: do you think that EC2 is the best hosting solution right now? Only for huge app or also for smaller?

Marek Marek said:

on July 31, 2008 at 01:29 AM

A lot of that depends on your applications’ needs. EC2 has a lot of advantages and disadvantages, just as all hosting solutions have. I happen to think it’s a viable solution for both large and smaller applications. The obvious advantage is that it’s a pay for what you use solution, rather than one-size-fits-all.

For further discussion about it, I’m usually always available at irc.freenode.net / #poolpartyrb on irc.

Ari Ari said:

on August 01, 2008 at 02:15 PM

Great interview!

Pool Party is a new tool by Ari Lerner that makes it easy to automate the deployment, monitoring, persistent storage (using S3Fuse), and load balancing of EC2 instances. While intended to be application agnostic, there’s naturally a major slant towards Ruby applications in general, with support for Rake tasks a core feature.

Emily Emily said:

on August 16, 2008 at 03:36 AM

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 September 05, 2008 at 06:37 AM

Flickr

FiveRuns tagged photos on Flickr.

  • FiveRuns RailsConf 2008
  • IMG_4660
  • FiveRuns Booth
  • IMG_4684
  • IMG_4690
  • IMG_4687
  • FiveRuns Booth
  • IMG_4685

See more FiveRuns tagged photos…

Other Categories

Entries are also organized under the following general topic categories.