List Feeds : Software to install Ruby on Rails


      view feed content Rails TakeFive - A Conversation with Glenn Vanderburg (RM-Install ( FiveRuns))   3 h, 37 min and 15 secs ago

Welcome to the Rails TakeFive interview series, where we have a virtual sit down with leading developers from the community and bring you their insights into all things Ruby and Rails.

This week, we're bringing back a popular theme and hosting a Campfire chat between FiveRuns developer, Rubyist and Raconteur Adam Keys and Glenn Vanderburg, noted Rubyist, speaker, author, and the Chief Scientist at Relevance.

In this chat, Glenn and Adam talk about testing, the Ruby Community, framework philosophies, VM implementations, and more. Let's get started!

<style> /*------------------------------------------------- CHAT TABLE -------------------------------------------------*/ #chat-wrapper { overflow: hidden; margin-bottom: 1px; width: 585px; border: 1px solid #DDD; } #chat-wrapper table.chat { font-size: 12px; margin-bottom: 1px; font-family: "Lucida Grande", verdana, arial, helvetica, sans-serif; } #chat-wrapper table.chat div { font-size: 12px; margin-bottom: 1px; font-family: "Lucida Grande", verdana, arial, helvetica, sans-serif; line-height: 15px; } #chat-wrapper table.chat td { padding: 5px; border-bottom: 1px solid #efefef; border-left: 1px solid #dcdcdc; } #chat-wrapper table.chat tr.outofwindow td { color: #aaa; border-bottom: 1px solid #f2f2f2; border-left: 1px solid #eee; } #chat-wrapper table.chat td.person { width: 1%; font-weight: bold; text-align: right; white-space: nowrap; vertical-align: top; background-color: #efefef; border-left: none; } #chat-wrapper table.chat tr.outofwindow td.person { background-color: #f5f5f5; } #chat-wrapper table.chat tr.you td { background-color: #ffc; } #chat-wrapper table.chat tr.chat_red td.person { color: #900; } #chat-wrapper table.chat tr.chat_blue td.person { color: #009; } #chat-wrapper table.chat tr.chat_purple td.person { color: #606; } #chat-wrapper table.chat tr.chat_green td.person { color: #363; } #chat-wrapper table.chat tr.chat_gold td.person { color: #660; } #chat-wrapper table.chat tr.chat_orange td.person { color: #D56C14; } #chat-wrapper table.chat tr.chat_indigo td.person { color: #A96B91; } #chat-wrapper div.chat_quote { font-style: italic; font-size: 24px; font-family: georgia; margin: 20px 0; } #chat-wrapper table.chat tr.break td { border: none; } #chat-wrapper #todays_transcript { font-size: 12px; font-weight: normal; padding-top: 15px; border-bottom: 1px solid #dcdcdc; color: #666; padding: 5px 0; } #chat-wrapper .pullquote { font-style: italic; font-size: 28px; font-family: georgia; margin: 20px 0; } </style>
Adam K. I've got some Ruby press-junket style questions to open up with. For the Glenn Vanderburg fan-club out there somewhere.
Adam K. What is your preferred flavor of testing? Test/Unit, RSpec, Shoulda, etc.?
Glenn V. I'm comfortable with all three of those, although I'm eager to start a new project and get more experience with Shoulda. I remain a little wary of RSpec ... it's a great framework, and seems to really help people new to TDD to understand how the process works. However, it's too big and complex for me to feel comfortable relying on it in such a foundational role in the process. I prefer my testing tools to be "so simple there are obviously no deficiencies," to use Hoare's phrase.
Glenn V. That said, I like what the RSpec guys have been doing recently. Cucumber is nice, and I'm glad that RSpec now plays nicely with test/unit-style assertions. I find the test structuring facilities of RSpec to be quite useful, but often I find that assertions are better for expressing the conditions than "should".
Adam K. Yeah, Cucumber is looking neat. We're playing with it a little here as we're adding more acceptance tests.
Adam K. What is your preferred approach to testing? Do you emphasize unit tests, story tests, acceptance tests or do you prefer some hybrid approach?
Glenn V. A hybrid approach, but with most of the emphasis on unit tests. I try not to be dogmatic about test coverage at every level or things like that. One of my colleagues at Relevance, Jason Rudolph, has been blogging and speaking recently about "How to fail with 100% test coverage," and I really think that's an important point. Testing and test coverage are about managing risk, and managing risk is always a cost/benefit proposition. Unit tests (especially if written in a TDD style) give you a huge benefit for essentially no cost. As you move up the testing chain, though, tests get more expensive and also (in most cases) provide less benefit.
Glenn V. That's not an excuse to not do acceptance tests and things like that. But I like to try to focus that on where the areas of complexity are, or where the errors seem to be appearing. If you let real, known errors drive where you build more costly tests, you know for certain that they're worth the cost.
Glenn V. In web applications, acceptance-level testing is always a problem. We're always looking for better ways to test JavaScript, for example. But at the moment, there doesn't appear to be a good way -- just ways that have different assortments of strengths and weaknesses.
Adam K. That's a great idea. I was listening to the Agile Toolkit podcast recently and the interviewee was saying that he found the value of unit tests falling away as he adopted a very different process that de-emphasizes traditional sprint planning. But it seems that would make it harder to refactor your code, if you lose the confidence that unit tests give you.
Adam K. Testing JavaScript is an tricky topic. What's your take on the current state of the art there?
Glenn V. Both of those points are true, but your response gets at the heart of the value of unit tests, a value that many people overlook: they are for way more than just guaranteeing correctness. Arguably, acceptance and integration tests validate the same logic that unit tests do. But you only get the design benefit from unit tests, and only unit tests are detailed enough to really help you through redesigns and refactoring.
Glenn V. The current state of JavaScript testing is that there are a whole bunch of tools available, but they're all severely limited in different ways. That means that, using any one tool, you can only really test part of your system's JavaScript code if you're doing anything reasonably sophisticated in JavaScript. Of course, with a higher-level acceptance testing tool like Selenium, I suppose you can test pretty much everything (because it just verifies changes at the DOM level), but that's an acceptance test rather than a unit test, with all of the disadvantages I've already mentioned.
Adam K. So when it comes to JavaScript testing, do you take a unit testing or acceptance testing approach?
Glenn V. JavaScript as a *language* is very testable. The core problem is that JavaScript is all about manipulating the browser, and so testing outside the browser is essentially cheating. But the browser gets in the way.
Glenn V. I've found that each project requires hard thinking about the best approach to JavaScript testing, which is part of the problem. Depending on how sophisticated your JavaScript functionality is, you may be able to do effective unit testing. But it usually has to be a hybrid, and it usually costs the project way more time and effort than testing other parts of the code.
Adam K. I've struggled with that cost as well. I wonder if the challenge is conceptual or technical?
Adam K. Conceptual in that something like Rails says "stick these kinds of tests in here and those kinds of tests over there", whereas with JavaScript it's a bit more of an unexplored frontier.
Glenn V. There's definitely something to that. I love the idea of the Rails JavaScript helpers; there are some parts of the JavaScript in my system that I can trust in the same way I trust that ActiveRecord just works for most things. But we're really still figuring out the best way of using JavaScript in real applications, and the helpers can't cover everything. (That's the same reason I don't think things like GWT are the answer ... it's still way too early in the game to begin limiting our options in the browser with tools like that.)
Adam K. With JavaScript going through its second or third renaissance right now, maybe we can hope for a JavaScript testing renaissance to piggyback along with it.
Adam K. Shifting subjects a little bit, let's talk about the Ruby community and web applications.
Adam K. The community seems to have arrived at a similar point to where Java was about five years ago. Rails has a great community and momentum and other frameworks are growing out of their niches. What can we as a community learn from how things shook out in Java-land?
Adam K. (I should mention that Glenn wrote one of the first serious tomes for Java and is pretty familiar with more than one Java framework. He's been around the block, so to speak.)
Glenn V. I've been thinking about that a lot. For the past few years, Ruby has felt a lot like Java did in the early days ... excitement and rapid growth, and now we're close to the point where Java started becoming very enterprise-ish and overly complicated. But I'm not very worried about Ruby taking the same path. Part of the problem was that Java was being pushed and steered by a big corporate entity with its own agendas. That's not the case with Ruby. Sure, there are big (and small) companies who have a lot riding on Ruby's (and Rails') success and continued growth. But none of them are to Ruby what Sun was to Java, and I think we're too smart as a community to let someone try to take on that role. Sure, offer support and new facilities, we'll all welcome that, *especially* if there's competition. But I don't think the core of the Ruby community will ever be a tightly orchestrated event like JavaOne, or a process like the JCP. And that's very good for us.
Glenn V. I'm just a *little* worried about how big the Ruby core library has become in 1.9. The growth rate is similar to that of the Java core libraries, which we deride as bloat. But most of the extra complexity is things like the character set support and complex numbers, and those aren't being driven by enterprise agendas. Those smell to me like things that were added because the community wanted them -- perhaps just a small corner of the community, but the community nonetheless.
Adam K. What about philosophies? For example, Rails is opinionated, Merb is agnostic, Mack is distributed and Sinatra is slim. ActiveRecord is just enough to make a database tolerable, DataMapper is a full-blown ORM and Sequel is a thin layer over SQL. Is there a good way to deal with a diffusion of ideas like that?
Glenn V. I think the way we're dealing with it is just fine. To some degree the market has spoken loudly, and the answer is "opinionated, 90%, modular, with plugins". There's a small percentage of the community that's really dissatisfied with some aspect of Rails, and that's a good thing ... but most still think it's a huge advance, and it'll take a lot more than 20% better along some axis to supplant it. But the dissenters are really valuable! It's good to have alternatives, and those ideas are being adopted by Rails where it makes sense. Certainly many ideas from Merb are already making their way into Rails, and ActiveRecord may soon see better SQL handling similar to what we see in Sequel. (And, for the record: Sequel is way more than just a thin layer over SQL, unfortunately. :-)
Adam K. I look forward to the cross-pollination of ideas. It never hurt nobody!
Adam K. OK, let's talk about virtual machines that support dynamic languages. You did a fantastic talk at RubyConf on how its quite possible to make dynamic language runtimes competitive in terms of speed.
Adam K. For those who couldn't attend your talk, how does one make a dynamic language VM fast, in a nutshell?
Glenn V. Thanks! Glad you enjoyed it.
Glenn V. Here's the short, unhelpful answer: optimize a bunch of stuff. :-) Which sounds flip and snide, but that's kind of what YARV and Rubinius are doing in the short term. Preprocess source into bytecodes, optimize method dispatch (especially by caching the results of the last dispatch at each call site), etc.
Glenn V. The big, relatively easy thing is to improve garbage collection. Garbage collection can be really fast, lots faster than manual memory management if you do a good job of it. A good generational garbage collector (like, for example, the one in the HotSpot JVM that JRuby gets to take advantage of) can make object allocation super-fast, and collection of short-lived object essentially free. Since nearly all objects in real systems are short-lived, that's huge.
Glenn V. The holy grail, so to speak, is a full, dynamically optimizing VM with what's called "type feedback". Again, this is what HotSpot does, but it's optimized for Java's characteristics, so I think there's a limit to how much it can help JRuby. (I'd love to be wrong about that!) And I suspect Gemstone Smalltalk does similar things, and since Ruby and Smalltalk have such similar execution models, MagLev can gain a big boost. But I'd love to see a good optimizing VM designed especially for Ruby, and I hope that's what Rubinius and/or YARV will turn into. And Rubinius seems to have the best foundation for it.
Adam K. Indeed. For anyone who couldn't make it to RubyConf, I'd highly recommend checking out the Rubinius and YARV presentations after watching yours.
Adam K. What was the most surprising thing you found in researching VMs for dynamic languages?
Glenn V. A dynamic VM gathers statistics about the program at runtime and does aggressive optimizations based on those statistics, aggressively inlining methods, optimizing the large methods that result, and compiling to native machine code on the fly. In a language as dynamic as Ruby, such optimizations are necessarily speculative -- any number of changes might invalidate the assumptions made during the optimization. But the VM can keep track of that and fall back to the bytecode version if necessary. But nearly all such changes will happen while the system is starting, way before the optimizations are done, so the advantages gained from the super-optimized code will far outweigh the cost of the occasional optimized method that must be thrown away.
Glenn V. The most surprising thing was the huge impact of inlining. I'd heard a lot of talks about this kind of thing in the Java world, and given a few of them, but when discussing inlining, I'd only ever seen toy examples.
Glenn V. So ...
Glenn V. for this talk I decided to see if I could show something real. I started with a simple Rails index action generated from scaffolding, and started manually doing inlining. I set some rules: I would inline any method I encountered that was less than 10 lines long, as long as I could convince myself that the compiler could know the correct method implementation to choose for inlining. And when I encountered calls to Rails core classes, I used Rubinius' Ruby implementation of the Rails core library, rather than the MRI C versions.
Glenn V. Well, I almost instantly got to the point where essentially every method call was on an object that was created in the same scope. It didn't take long for the initial six-line method to balloon to over 180 lines. And that's just the point at which I got bored and gave up ... I'm confident if I'd continued the process it would have grown to over 500 lines, and that's a conservative estimate.
Glenn V. An optimizing compiler has problems with little tiny methods, but a big block like that gives it a lot to work with. There was a lot of dead code that could be eliminated, a lot of common subexpressions, loops that could be unrolled, etc. I was amazed at how effective it was.
Adam K. I thought that was a great example of how Ruby really *could* get a lot faster. How do you think the Ruby implementation space will pan out in the next 12-18 months?
Glenn V. A couple things are no-brainers, I'd say. I think MagLev will ship in that time, and it'll be blazingly fast for people who are willing to pay for speed. I also think JRuby will make some real performance gains; the JRuby team know what needs to be done, and for the first time Sun is planning on changing the JVM in ways that are aimed specifically at dynamic language performance. (I sincerely hope Sun's current troubles don't hurt that effort.)
Glenn V. YARV will continue to get more stable, but not a lot faster. As far as I can tell, the YARV implementation is too closely tied to the existing C implementation of the core classes, which will get in the way.
Glenn V. The interesting one is Rubinius. There's been a perception of trouble with Rubinius lately, because progress seemed to stall while Evan rewrote the core VM in C++. (And "We're gonna start over and rewrite!" is a classic warning sign for a project.) But I'm convince the rewrite was the correct thing to do, and they're almost back to the point where they were before the rewrite. I think they'll start making rapid progress. I don't think Rubinius will be the fastest VM in the next 18 months, but I think it might be competitive by then, and with a lot of headroom for further improvement.
Adam K. Let's dive into the statement that being "too closely tied to the existing C implementation" would reduce the opportunities to make YARV faster. Intuitively, porting code to C makes it faster. What is different about optimizing VMs?
Glenn V. A lot of things about good dynamic VMs are counterintuitive. For example, you'd think by generating more garbage, you'd make more work for the garbage collector. But modern garbage collectors almost never touch garbage; they only deal with live objects. So by trying to avoid making garbage, you might be keeping more objects live for longer times, and *that's* what make the GC's life difficult.
Glenn V. To understand why C code can be slower, think back to my inlining example. The inlining process can't see inside the C functions, so inlining has to stop there. From one standpoint, that might not seem like a problem; that code's already pretty fast. But function-call overhead is still costly, and modern pipelined CPUs work best with long code blocks. Furthermore, since those functions can't be inlined with the rest of the code, they can't be optimized together. And that really limits the options for optimization. Here's an example from my talk:
Adam K. That's intriguing. So how would someone interested in making some of these ideas reality in Ruby get started?
Glenn V. Here's the original method:
Glenn V. View paste
def index @posts = Post.find(:all) respond_to do |format| format.html format.xml { render :xml => @posts } end end
Glenn V. after a little inlining, you get to this:
Glenn V. View paste
@posts = begin args = [:all] options = args.last.is_a?(::Hash) ? pop : {} Post.validate_find_options(options) Post.set_readonly_option!(options) case args.first when :first then Post.find_initial(options) when :last then Post.find_last(options) when :all then Post.find_every(options) else Post.find_from_ids(args, options) end end
Glenn V. (That's just the first line of the original, after inlining find.)
Glenn V. If the VM can inline the creation of [:all], and args.first, and if it knows about VM primitives, it can eventually eliminate that whole case statement and get down to this:
Glenn V. View paste
@posts = begin args = [:all] options = args.last.is_a?(::Hash) ? pop : {} Post.validate_find_options(options) Post.set_readonly_option!(options) Post.find_every(options) end
Glenn V. And if it keeps going, it can optimize away all uses of that args array, which means it can avoid ever creating it. That's a lot of optimization. But to do that, especially in a language as dynamic as Ruby, it has to be able to see inside the core class methods.
Adam K. And core classes written in C are opaque to the runtime?
Glenn V. Yes, they are.
Adam K. Gotcha.
Glenn V. How to get started? Well, there are a lot of interesting papers about the Self project, where these techniques originated. But we know now that not all of those techniques are good ideas; they have stiff costs in memory usage, for one thing.
Glenn V. The first commercial project to use these ideas was a Smalltalk implementation called Strongtalk, and that eventually turned into Java HotSpot. The source to both systems is now available, but unfortunately they're very complicated and difficult to understand from the source, I think.
Glenn V. Perhaps the best strategy, after reading the Self papers, is to take advantage of a rare opportunity. Three separate open-source efforts are competing to build the fastest JavaScript VM, and we get to watch.
Adam K. (Hence the aforementioned JavaScript renaissance!)
Glenn V. Google's v8, Mozilla's TraceMonkey, and Apple's SquirrelFish VMs are all using dynamic language VM ideas of various stripes. It's fun to watch, and systems being actively developed in the open are always easier to understand than mature systems whose code just gets dumped onto the world after the fact. So one great way to learn would be to start following one or more of those projects, and maybe even get involved. Once you've gained a little knowledge, you might be able to see how you could contribute to JRuby or IronRuby to help them play more effectively with the JVM and DLR, or you may be able to go deeper and write (for example) a native code generator for Rubinius.
Adam K. Where would one get started with one of these projects? Lurking on the mailing lists, perusing the code, looking in the bug tracker?
Glenn V. All of the above! The same way you get started with any open-source project. One good strategy is to start by improving the test suite.
Adam K. Duly noted. So, to wrap things up, the folks at Relevance are working on a new app called RunCodeRun. Its hosted continuous integration for open source projects. What's the story there?
Glenn V. This all sounds like rocket science, but the basic ideas are fairly simple ... it's just putting it all together that gets complicated. The lead developer of Google's V8 project, Lars Bak, told me that they went from a standing start to the level of performance they had on release day in 3 months, with a team of 3 developers. Of course, they all had experience on similar projects, and after that there was a lot of work left to integrate with the DOM and fix compatibility bugs. But the basics were not too hard.
Glenn V. We realized that continuous integration is a big hole in how a lot of teams implement agile development, and part of the reason is that there wasn't a hosted solution. So we decided to provide one. Hosting CI is a challenge -- we're taking other peoples' code and running it on our machines, for one thing, and dependency management is also hard. But after investigating it, we felt up to the challenge, especially if we aimed at a niche to begin with.
Glenn V. RunCodeRun is up today at http://runcoderun.com/, and it supports open-source Ruby and Rails projects hosted on GitHub. It's still in beta, but let us know if you want to try it out. We're preparing to support private projects as well, and plan to launch that support soon. We're really pleased by the level of interest; a lot of people are very excited about the possibility of a managed, hosted continuous integration server for their projects.
Glenn V. Everyone at Relevance has contributed, but Rob Sanheim has been the lead on the project, and he's done an awesome job.
Adam K. Its a really great idea, I'm hoping to see lots of projects on it. Avoiding the fits-and-starts the Rails project has gone through with CI will prove very valuable to the community.
Adam K. Anything else exciting we should look for from Relevance?
Glenn V. I agree completely. Source control, issue tracking, and other parts of the process have been easy for a while now, because of good hosted services. We want to add CI to that list.
Glenn V. Well, we're always doing interesting things on projects, and we try to speak frequently about them at conferences. We do project work, of course, and we also stay fairly busy doing security audits and code audits for existing projects. Finally, we're quite active in open-source development as well.
Adam K. Awesome. Thanks for your time!
Glenn V. My pleasure!

Glenn Vanderburg has more than 20 years of experience developing software across a wide range of domains, and using a variety of tools and technologies. Glenn is always searching for ways to improve the state of software development, and was an early adopter and proponent of Ruby, Rails, and agile practices. He is also Chief Scientist at Relevance.


[Rails TakeFive Tips "adam keys" "glen vanderburg" rails Rails takefive ]
View original post | Add to del.icio.us | Share

      view feed content Rails TakeFive - Five Questions with Jay Fields (RM-Install ( FiveRuns))   11 d and 22 h ago

Welcome to Rails TakeFive, FiveRuns’ periodic discussion about Ruby on Rails with noted developers from throughout our community. This week, we’re honored to be joined by Jay Fields, noted software developer, author, and speaker.

FiveRuns: Welcome Jay! And, thanks for taking the time. Let’s kick it off by getting your thoughts on the community. Can you name a few relatively unknown or unheralded developers who you think deserve to be recognized and tell us why they rock?

Jay Fields: George Malamidis, Philippe Hanrigou, Pat Farley & John Hume are all not as well known, but superstar developers. I’ve worked with all 4 of them on projects and I would go out of my way to work with all of them in the future. They all possess the fantastic combination of being both innovative and pragmatic. They all have blogs, speak at conferences and contribute to open source. You might not have heard of them yet, but you definitely will in the future.

FiveRuns: Okay, we’ve all made mistakes. Name one of your most embarrassing moments of FAIL, or one of your biggest rookie gaffes.

Jay Fields: Several years ago I was working for ThoughtWorks and I became the Tech Lead for a team building a Ruby application that used a DSL for the business rules. It was the most interesting work I had ever done, but I made a huge mistake. It was a very short project, 3 months in all. In general I believe that premature optimization is a mistake, but on a timeline that small we really needed to start looking at speed early in development. Unfortunately, I didn’t make it a priority. In the end we spent the last 2 weeks of the project working on the performance, and barely got the project out the door.

FiveRuns: Do you agree that Rails presents a big opportunity in the current financial environment, because of the 5-8x productivity boost, the fact that Rails is open source, and the limited accompanying infrastructure costs? How is the economy affecting your work and/or your livelihood?

Jay Fields: I think Rails presents a big opportunity regardless of the financial environment. In fact, I think history shows that to be true. Companies didn’t start adopting Rails because of the financial environment. The adoption of Ruby/Rails has been on the rise since it’s introduction. I do think adoption will slow eventually, but not until all of the talented Ruby/Rails developers are out of the job market. Ruby absolutely makes better programmers more productive, companies would be foolish to ignore that whether they are up or down. Ruby isn’t the answer to all problems, but if it is an answer to your problem and you choose a more ceremonious language, you’re probably making a mistake.

The economy hasn’t had any impact on my livelihood. Computers have become so integral to everyone’s life, I don’t expect any good programmers are out of work. In fact, regardless of the financial environment, I think good programmers will continue to enjoy larger than average raises. If you aren’t getting better than average raises, you either aren’t as good as you think you are, you are trading money for some other form of happiness, or you’re missing opportunities.

FiveRuns: Mike Gunderloy recently did a post outlining the process for contributing code to Rails. What was your very first contribution? What motivated you to get started? Nowadays, how much time do you spend battle-testing your code with friends and fellow developers? How often do you make use of the rubyonrails-core mailing list or the #rails-contrib channel on IRC?

Jay Fields: I’ve never actually had a patch committed to Rails, but I’ve had a few ideas that ended up making it into Rails in slightly varied ways. The most popular is probably the test class method that can be used when writing tests in place of defining test names that start with test. I was motivated to contribute to Rails because I felt that the current options were inferior to what was available, and I was tired of customizing Rails with each new project. There’s also a nice feeling (for me anyway) when you have an idea that can help the community as a whole. I’ve never used the IRC channel, but I’ve found the mailing list to be a great testing ground for patches.

FiveRuns: Have you ever taken a Ruby-related course or seminar, either in-person or virtually? Who are some of the best teachers and courses out there? For nubies? For pros looking to break through to a new level?

Jay Fields: I spend a fair amount of my time learning. I’ve always been in the work-smarter-not-harder camp. In the past few years I’ve attended as many as 6 conferences a year, and there’s almost always a few great presentations. I’m a big fan of conferences usually, but I’ve also been happy with the Pragmatic Studios and The Rails Edge mini-conference. There’s so many great guys in that group: Chad Fowler, Dave Thomas, Mike Clark, Stu Halloway, Justin Gehtland, Marcel Molina Jr, Ezra…. there’s really too many great guys doing Ruby and presenting to name them all. I’m also a huge fan of Geoffrey Grosenbach and PeepCode screencasts. Between those guys there’s information for everyone from a Ruby hobbyist to a professional Ruby developer.

Jay Fields is a software developer and consultant at DRW Trading and www.jayfields.com.

He has a passion for discovering and maturing innovative solutions. His most recent work has been in the Domain Specific Language space where he has delivered applications that empowered domain experts to author domain logic. He is very interested in maturing software design through developer testing and software testing in general.

Jay is also the author of <u>Refactoring: Ruby Edition</u> and a contributor to <u>Advanced Rails Recipes</u>.


[Rails TakeFive Tips "jay fields" rails Rails takefive ]
View original post | Add to del.icio.us | Share

      view feed content Monitoring Memory (RM-Install ( FiveRuns))   [1 views] 12 d and 21 h ago

One of the critical components FiveRuns Manage allows you to monitor is the memory usage of your Rails application server. Memory usage is one of the metrics that can provide insight into the availability and responsiveness of your Rails system. These measurements are global to the operating system and independent of your individual Rails application processes.

Which Metrics To Track?

To accurately gauge memory resources, Manage correlates the relative metrics. In the example below, a low percentage of free system memory does not necessarily indicate a resource constraint. The operating system may allocate the bulk of available physical memory to optimize server performance.

Sustained contention for RAM however, can generate swapping to your virtual memory system. This is a good indicator the physical memory is constrained and you are paying a performance penalty by swapping out to disk. Manage tracks both physical and virtual memory statistics like swap in, swap rate and page file usage.

Threshold Triggers

Browsing memory metric graphs is exciting and all, but maybe you’ve got some other things do? No problem. Manage allows you to configure custom alerts using your Rails environment’s baselines and important metrics. The memory example above could be built into a trigger with two simple conditions to provide a more accurate notification of a system problem. When conditions meet your criteria, an email alert is generated with a synopsis of the situation and a link back to the FiveRuns console where you can investigate in more detail.

FiveRuns Manage leverages the full stack of your Rails server metrics, to keep you informed of your application’s status. What are the other important metrics you depend on to keep your production Rails applications online? Let us know and we’ll cover them in future blog posts!


[Rails Tips memory metric monitor ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns Welcomes New Partners (RM-Install ( FiveRuns))   14 d and 4 h ago

We are happy to announce several new partners who have recently joined our RAMP partner program. Welcome, and we look forward to working with you!

If you have a Rails app, and are looking for development help, we highly recommend any of these companies. If you’re a Rails development shop and looking for ways to earn additional margin, check out our new performance optimization and deployment readiness services. Just let us know if we can help!

Integrum is a close-knit, experienced, internet-savvy group that makes web applications using the latest technologies and web standards to emphasize business value, community, and user-experience. Integrum builds for the internet because they like to and because they are good at it. It’s that simple.

Y|Factorial is a Rails consultancy founded in 2007 by Rails contributor and author Ryan Daigle. Specializing in an agile and transparent project life-cycle, Y|Factorial efficiently delivers intuitive software built on Ruby frameworks like Rails, Merb, DataMapper and more.

Open Rain is a premier custom software solutions developer specializing in dynamic, data-driven websites for online business. Founded by computer scientists, OpenRain breaks the mold of archaic web development practices using high-velocity, rapid-feedback cycles and small, highly qualified teams with rigorous quality standards. Cutting-edge web solutions are developed with JavaScript, CSS, XHTML and Ruby-based web frameworks.

Brown Beagle Software is a reliable producer of quality Ruby On Rails code. The Brown Beagle headquarters is in Perth, Western Australia, but their services are provided for companies all over the world. They’ve built quality Ruby On Rails systems for clients with a diverse set of requirements ranging from the health industry through to white label Internet services.

Unshakable Media is a multimedia production company creating user-friendly and search engine friendly Ruby on Rails Applications. They build both custom applications and production ready applications. They also have a video productions team along with an internet marketing team. Altogether Unshakable Media is a great company to take your site and applications to a new level by adding web 2.0, video, marketing, and other innovative strategies to get your business to the top. They say at Unshakable Media that they are “Empowering Your Site For Success!” So come check them out at www.UnshakableMedia.com or 512-983-2206.


[Announcements Partners Rails "brown beagle" "open rain" "ryan daigle" integrum Partners partners ramp RAMP yfactorial ]
View original post | Add to del.icio.us | Share

      view feed content Who’s using Ruby Enterprise Edition in production? (Phusion Passenger (a.k.a. mod_rails for Apache) )   15 d and 5 h ago

A while ago someone had asked who’s using Phusion Passenger in production. The positive responses were overwhelming; thanks to all who had replied!

Ruby Enterprise Edition seems to get a bit less attention than Phusion Passenger, so we’re wondering how many people use Ruby Enterprise Edition in production. We need this information for marketing purposes, and seeing that we’re providing REE for free, we’d be really grateful if you could take some time to tell us. Please send replies to the mailing list.

And if you can, please also tell us which of your websites are powered by REE and how much traffic they get.

Thank you.


[Ruby Enterprise Edition ]
View original post | Add to del.icio.us | Share

      view feed content Managing Rails Application Health (RM-Install ( FiveRuns))   17 d and 3 h ago

How do you ensure your Rails app is running well? There are many application, database and server metrics available and each can provide useful information about your system. Organizing and evaluating that data allows you to quickly assess how your application is performing and identify problems. This post introduces the ways FiveRuns Manage helps you ensure your Rails applications remain healthy and responsive.

Manage was designed to monitor your complete Rails environment and deliver organized, actionable status information. The Manage dashboard aggregates metrics from your full Rails stack, including operating system, database, Mongrel, memcached, Apache and nginx. Metrics are trended over time and provide drill down detail for interesting measurements or those indicating a potential problem.

The Right Tools To Measure Rails Health

Starting with individual apps and groups of application clusters, Manage summarizes the current Rails availability status. Threshold triggers provide even more detailed monitoring of specific rails metrics and other applications on your system.

Select a Rails application or cluster above for detailed performance analytics. The Application Dashboard below identifies the slowest measured controllers across the Rails environment on the right and those receiving the most activity below. Sparkline graphs on the left provide a summary of recent Rails performance trends and each link to detailed statistics. The metric span can be adjusted between 1 and 24 hours to view a specific period of interest. In this example, the Rails application’s response time is increasing, but there is no additional request load occurring during the same period, which could indicate a problem trend.

The Manage System Browser displays these trends in more detail and allows correlation with other system metrics. If the degraded Rails application response time is being is caused by a memory leak on the app server or low disk space on the MySQL back end, this is the place to find it.

The System Browser is also a great place to assess baselines for your Rails environment monitors. Metric data is available spanning periods up to 48 hours and covering every level of the application stack.

Digging Deeper

For even greater precision, Manage Reports combine critical Rails health measurements into a single, consolidated view. System Overview Reports are provided out of the box or customize your own to the individual controllers, models and actions most important to you.

To keep a constant on eye on your Rails application’s health status, Manage triggers events when thresholds you set are exceeded. You can choose be notified by email with a summary of the event and links back to the FiveRuns Manage console for complete troubleshooting.

Stay tuned for future posts on using FiveRuns Manage to keep your Rails applications healthy, including additional information on specific metrics, use of triggers and how to create custom reports that focus on your key metrics.


[Rails Tips health manage performance ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns announces the Rails Performance Challenge! (RM-Install ( FiveRuns))   17 d and 21 h ago
Win free consulting services from FiveRuns!

With our new Performance Optimization and Deployment Readiness Services, we’ve already helped some of our customers optimize their websites and applications. Now, we’re looking for some particularly nasty performance problems to help solve. Send us your biggest Rails application performance issue and you could be one of five winners of free consulting services from FiveRuns!

Just email your name, company name, url and a description of your most pressing Rails application performance issue to performancechallenge@fiveruns.com. We’ll choose five companies to receive free FiveRuns Performance Optimization Services!

Here are the details:
  1. Entries must be received by midnight, December 1, 2008. Winners will be picked on or about December 2nd, 2008.
  2. Winners will be given one day (8 hours) of FiveRuns Performance Optimization Services. FiveRuns does not guarantee improved performance (but we will try our best to solve your issue!).
  3. Winners are picked at FiveRuns discretion.
  4. Winner must have access to application named in submission, and must give FiveRuns temporary access to source code.
  5. Winner agrees to installation of FiveRuns Manage. (FiveRuns Manage will be installed at no additional charge.)
  6. Winner agrees to FiveRuns using his/her name and company name in promotional efforts: PR, blogs, Twitter, etc.

Ready…Set…Go!


[Announcements Community Events ]
View original post | Add to del.icio.us | Share

      view feed content TuneUp support for Merb updated (RM-Install ( FiveRuns))   20 d and 18 h ago

We congratulate the Merb team on a successful 1.0 release!

We’d like to announce a new version of the TuneUp panel slice gem for Merb (which sits up at GitHub), as well as the core TuneUp dependency.

v0.5.3 is a bugfix release, addressing issues with uploading runs and removing development dependencies that were causing loading issues. The installation instructions have also been updated, removing the now-unnecessary installation task (assets are now copied automatically on startup, as with the TuneUp for Rails) and changing the routing instructions.

Many thanks to Matt Aimonetti for his continued help tracking down issues and providing Merb slice “best practice” guidance. Cheers!


[Open Source merb Open Source open source release tuneup ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns Expands Partnership with BitRock, RubyStack Now Includes TuneUp (RM-Install ( FiveRuns))   24 d and 1 h ago

Last year, we launched a partnership with BitRock, an innovator in open source tools and stacks, and introduced FiveRuns Install, a Ruby on Rails stack optimized for production environments. Install has been a great success, with thousands of downloads from the community. This week, we’ve happy to announce that we’ve expanded our partnership with BitRock and now their BitNami RubyStack, a freely available, ready to run distribution of Ruby on Rails, will include FiveRuns TuneUp, our free/open source application profiling tool for Ruby on Rails and Merb developers.

The BitNami RubyStack was released in 2007 and has been downloaded tens of thousands of times. It’s a freely available, ready to run distribution of Ruby on Rails, packaged with BitRock’s multiplatform installer, making it easy to have an enterprise-ready Rails environment up and running in just a few minutes. By including FiveRuns TuneUp with the RubyStack, we wanted to give developers a complete environment for installing, developing, and profiling Ruby on Rails applications that can be optimized for performance and scale.

BitRock has been a terrific partner, and we’ve been continually impressed by their expertise and leadership in the open source stack business, so we’re very excited to further our relationship and offer up this bundle to the Rails development community. RubyStack is currently available for Linux, Mac OS X, and Windows, with support for Solaris coming soon. It is free to download and use under the terms of the Apache 2.0 license.

For more details, or to download a copy, visit BitNami.org.


[Announcements Open Source Rails bitnami bitrock install rubystack tuneup ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns Rubyist Bruce Williams Selected to Attend Obama Event (RM-Install ( FiveRuns))   26 d and 22 h ago

Congratulations to FiveRuns Rubyist Bruce Williams!

Bruce was selected to join Barack Obama tonight at his election night party in Chicago’s Grant Park as one of 10 winners from across the country who participated in the Front Row to History campaign. Bruce invited Damon Clinkscales, who most of you know as the founder of Austin On Rails, to join him tonight as his guest.

We’re incredibly proud of Bruce and Damon – the only two Austinites (and Rubyists) selected to participate in this historic event! Of course, the guys had to whip up a site to monitor their activities while in Chicago. You can follow Bruce’s and Damon’s live-tweets at obamaftw.org. Watch for pics and other updates throughout the evening.

And don’t forget to Vote!

p.s. I neglected to give credit to Erik Kastner for helping Bruce and Damon with obamaftw.org. Thanks, Erik!


[Announcements People bruce williams obama ]
View original post | Add to del.icio.us | Share

      view feed content Using TuneUp In Production (RM-Install ( FiveRuns))   27 d and 1 h ago

TuneUp is FiveRuns’ open source plugin for profiling the performance your Rails and Merb applications. TuneUp is intended to be run locally in your development environment, since the instrumentation returns detailed analysis of a single browser invocation. Bottlenecks can be identified before deployment and before your users experience a performance issue.

Why?

There are some times it may be useful to run TuneUp in production. Perhaps you’d like to share the profiling view across a team. Maybe you’d like to compare the metrics of that same request, against your production database’s configuration, on the actual hardware or under the live platform’s operating system.

All you need to do to activate the TuneUp instrumentation in production is create the following file:

/YOUR/APP/config/tuneup.rb

Containing the following:

Fiveruns::Tuneup.config do |config| config.environments << :production end

That’s it. Restart your rails app on the server and it will render the TuneUp instrumentation bar to your local browser. From there, you can toggle it on and off and profile the live server requests remotely.

Why not?

Running TuneUp in production should be done in a closed environment. The instrumentation bar, sequel queries, controller names and other analytics about the code base are displayed. Also, multiple browsers accessing the application concurrently may skew the profiling results.

If you’d like to permanently monitor your servers’ Rails performance in production, check out FiveRuns Manage.


[Merb Open Source Rails ]
View original post | Add to del.icio.us | Share

      view feed content Rails Performance Testing Tools (RM-Install ( FiveRuns))   31 d and 20 h ago

I’ve been playing with benchmarking tools this week. After reviewing the open source options, I ended up working with just a few of the dozens of choices. Some are new and Rails specific. Some are no longer maintained yet remain popular choices. Here’s a sample:

There are not only a lot of tools, there are a variety of approaches to take. Are you looking know how fast your application can return a single user’s transaction? Is a better durability test to know how much traffic your application can sustain over longer periods? Should you test individual pages of the web app or build workflow sequences to more closely simulate real world activity?

For your performance test method, what’s your choice of benchmarking tools?

<embed src="http://www.polldaddy.com/poll.swf" height="389" width="252"></embed>
[Community Open Source Rails benchmark performance poll tools ]
View original post | Add to del.icio.us | Share

      view feed content Phusion Passenger, now with Global Queuing (Phusion Passenger (a.k.a. mod_rails for Apache) )   32 d and 20 h ago

I’m not sure what I should write down here seeing as David Heinemeier Hansson pretty much sums it all up:

Indeed, Passenger now supports the ability to choose for global queing at the request of 37signals, which has the potential to be the first of many exciting collaborations with the company responsible for applications such as Basecamp, Campfire and of course, the Rails framework.

For more info on this feature as well as on Phusion Passenger’s architecture, we’d kindly like to refer you to Passenger’s user guide and architectural overview.

For completness sake, I’ve included the relevant information with regards to this feature below for your reading pleasure.

What does this option (Global Queuing) do?

Recall that Phusion Passenger spawns multiple backend processes (e.g. multiple Ruby on Rails processes), each which processes HTTP requests serially. One of Phusion Passenger’s jobs is to forward HTTP requests to a suitable backend process. A backend process may take an arbitrary amount of time to process a specific HTTP request. If the websites are (temporarily) under high load, and the backend processes cannot process the requests fast enough, then some requests may have to be queued.

If global queuing is turned off, then Phusion Passenger will use fair load balancing. This means that each backend process will have its own private queue. Phusion Passenger will forward an HTTP request to the backend process that has the least amount of requests in its queue.

If global queuing is turned on, then Phusion Passenger will use a global queue that’s shared between all backend processes. If an HTTP request comes in, and all the backend processes are still busy, then Phusion Passenger will wait until at least one backend process is done, and will then forward the request to that process.

When to turn on global queuing?

You should turn on global queuing if one of your web applications may have long-running requests.

For example suppose that:

The situation looks like this:

Backend process A: [* ] (1 request in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue)

Each process is currently serving short-running requests.

Phusion Passenger will forward the next request to backend process A. A will now have 2 items in its queue. We’ll mark this new request with an X:

Backend process A: [*X ] (2 request in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue)

Assuming that B, C and D still aren’t done with their current request, the next HTTP request - let’s call this Y - will be forwarded to backend process A as well, because it has the least number of items in its queue:

Backend process A: [*XY ] (3 requests in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue)

But if request X happens to be a long-running request that needs 60 seconds to complete, then we’ll have a problem. Y won’t be processed for at least 60 seconds. It would have been a better idea if Y was forward to processes B, C or D instead, because they only have short-living requests in their queues.

This problem will be avoided entirely if you turn global queuing on. With global queuing, all backend processes will share the same queue. The first backend process that becomes available will take from the queue, and so this “queuing-behind-long-running-request” problem will never occur.

Turning global queuing off will yield a minor performance improvement (about 5%, depending on how fast/slow your web application is), which is why it’s off by default.


[Phusion Passenger ]
View original post | Add to del.icio.us | Share

      view feed content How Many Mongrels? (RM-Install ( FiveRuns))   33 d and 21 h ago

So your shiny new Rails application is ready for production. Time to configure the server application layer. A common question we hear at FiveRuns is: What’s the best number of Mongrels to use? There are a plenty of opinions, including yours, so feel free to comment below.

Test Drive

Early on, Zed recommended performance testing with httperf and an increasing numbers of mongrels to determine the best number for your setup. Test a file served directly from the web server and then test your app via a single mongrel instance. This provides a static file reality check and then a decent baseline from which to improve the responsiveness based on additional mongrels.

> 1

Depending on the memory footprint of each mongrel process and the available system memory, you may have an upper limit to consider for your server. Some administrators use at least two mongrel processes to balance the queue and avoid any locking behind a single mongrel or Rails request. My tests with a very entry level 256 MB virtual machine yielded the best performance using 3 mongrel instances behind an Apache2 front end.

Us

The average number of mongrel processes used by our customers is 5 per Rails app and 12 per server on systems with 8 GB of physical memory. This is what we run here at FiveRuns too. For example, a common setup is to have two high volume applications, served by 5 mongrels each and a lower volume Rails app with 2 mongrels. A lightweight front end like nginx balances traffic among the mongrel ports in use and optionally, any additional application servers in the hardware pool.

None?

Choosing not to answer the “How many Mongrels?” question is becoming a popular option. Passenger handles the port management between the front end and application layer, including the optimal number of back end processes. Thin is lightweight and crazy easy to install and configure. Each yield comparable or better performance metrics. Ebb also lists significant performance gains over mongrel.

So with configuration ease and performance gains, why choose mongrel today? Still grateful for delivery from FastCGI/lighttpd? (like me?) Perhaps you are gauging the community adoption of the alternatives? Maybe it’s a proven part of your existing architecture?


[Miscellaneous Open Source Rails ebb mongrel nginx passenger thin ]
View original post | Add to del.icio.us | Share

      How Many M (RM-Install ( FiveRuns))   34 d and 5 h ago

      view feed content Introducing FiveRuns Services (RM-Install ( FiveRuns))   40 d ago

As we’ve worked with our customers, our partners, and the community over the past couple of years we have gathered lots of tips, tricks, and best practices around Rails application performance, administration, and deployment. We’ve heard the message loud and clear – people are looking for help in speeding up their apps – so we are happy to announce two new services offerings to fit the bill: Performance Optimization and Deployment Readiness.

Now, you can call us in to help you tune-up, ���x-up and scale-up your Rails applications so that you can get all the performance and scale that your application and business demands. We’ll deliver these services directly, or through one of our development partners, whichever works best for you.

We’re also happy to announce that we have partnered with Relevance, a leading consulting, development, and training company that is focused on Ruby on Rails, to deliver the new services as part of their consulting engagements. Relevance clients will be offered the FiveRuns performance optimization and deployment readiness services as well as use of FiveRuns Manage and TuneUp performance monitoring software products as part of their Relevance engagement.

From Justin Gehtland, president of Relevance: “Relevance specializes in delivering agile Ruby on Rails application development and training services to our customers. FiveRuns’ expertise in optimizing application performance prior to deployment and continually monitoring it while in production expands the scope of our services, provides significant value to our customers, and enables us to better meet their application development needs.”

And the results are encouraging. TradeKing, a nationally licensed online broker dealer and pioneer in incorporating social networking features into online trading, worked with us to optimize the performance of their website using the new services.

From Mike Massey, director of community development at TradeKing: “Rails has made it easy for us to develop our applications quickly and beautifully, but understanding how they will perform has been somewhat of a black hole. FiveRuns’ extensive experience in Rails application performance coupled with their monitoring and profiling tools have helped us increase the performance of our site by an order of magnitude and helped ensure the best online trading experience for our customers.”

Here are the details of the new offerings:

FiveRuns Rails Performance Optimization Service. We’ll do a full review of your Rails application and the production environment to help pinpoint performance bottlenecks, optimize the stack and production con���guration and prepare for future scale. As part of this service, we will:

FiveRuns Rails Deployment Readiness Service. This service is designed to ensure successful application performance, on even the most aggressive application deployment schedules. We’ll include analysis of the desired performance characteristics of your application and the Rails stack components on which it runs. We will also:

We’re also happy to put together custom services to address performance scale problems you are having with your Rails applications.

So, if you have a performance problem that needs addressing, we’d love to work with you on it. More details on the services can be found here. Or, just shoot us a note and we’ll be in touch.


[Announcements Rails deployment performance rails Rails relevance services tradeking ]
View original post | Add to del.icio.us | Share

      view feed content Automatic Production Rails (RM-Install ( FiveRuns))   42 d ago

Welcome to the second FiveRuns blog post to automate server configuration for Ruby on Rails. We received great feedback and suggestions about the original script, Automatic Rails at Slicehost, which installed the basics. This time we’ll use standards like Capistrano deployment, separate web and application layers and an active database backend. While the Hello World application surely dazzled your friends and family, this time we’ll take it up a notch and deploy a working, full stack community web application, Trevor Turk’s cool Rails app, Eldorado.

The What

This script connects to a new Ubuntu 8.04 server and configures all necessary applications and libraries. Since we are installing a lot more this time, it’s a bit long to post here, so I’ve linked to it on Github. You still only need to provide 2 pieces of information: the target address of your server and the password. Execute the script locally which downloads Eldorado, the associated configuration files and then connects to your server to push the installation.

The previous script installed:

This time we use:

The How

1. Download the script from Github. I’ve abbreviated the URL.

wget http://tinyurl.com/57sjce -O configure_ubuntu_eldorado.sh

2. Run the script.

sh configure_ubuntu_eldorado.sh

That’s it! You’ll be asked for your password twice, once to set up the OS via ssh and once to run the Capistrano deployment tasks. Speaking of passwords, best practices include dedicated deployment and MySQL user accounts. This script uses the root account for simplicity.

The Why

The script originated as a DRY effort for Slicehost deployments. You can now point it at other providers, remote Ubuntu servers or virtual machines. It’s become a handy way to explore a working Rails environment without manually installing every component. Also, writing configuration automation is a great way to hone your deployment skills. Thanks go to Trotter Cashion for the suggestion to maintain the scripts on Github, where they’ve been forked and extended. Check out Jørgen Orehøj Erichsen’s blog adding support for Passenger and Ruby Enterprise Edition.

All the scripts and configuration files are on Github so feel free to post any feedback or suggestions.


[Open Source Rails Tips ]
View original post | Add to del.icio.us | Share

      view feed content Automatic Production Rails (RM-Install ( FiveRuns))   42 d ago

Welcome to the second FiveRuns blog post to automate server configuration for Ruby on Rails. We received great feedback and suggestions about the original script, Automatic Rails at Slicehost, which installed the basics. This time we’ll use standards like Capistrano deployment, separate web and application layers and an active database backend. While the Hello World application surely dazzled your friends and family, this time we’ll take it up a notch and deploy a working, full stack community web application, Trevor Turk’s cool Rails app, Eldorado.

The What

This script connects to a new Ubuntu 8.04 server and install all necessary applications and libraries. Since we are installing a lot more this time, the script is a bit long to post here, so I’ve linked to it on Github. You still only need to provide 2 pieces of information: the target address of your server and the password. Running the main script locally will download a copy of Eldorado and a few associated configuration files.

The previous script installed:

This time we use:

The How

1. Download the script from Github. I’ve abbreviated the URL.

wget http://tinyurl.com/57sjce -O configure_ubuntu_eldorado.sh

2. Run the script.

sh configure_ubuntu_eldorado.sh

That’s it! You’ll be asked for your password twice, once to set up the OS via ssh and once to run the Capistrano deployment tasks. Speaking of passwords, best practices include dedicated deployment and MySQL user accounts. This script uses the root account for simplicity.

The Why

The script originated as a DRY effort for Slicehost deployments. You can now point it at other providers, remote Ubuntu servers or virtual machines. It’s become a handy way to explore a working Rails environment without manually installing every component. Also, writing configuration automation is a great way to hone your deployment skills. Thanks Trotter for the suggestion to maintain the scripts on Github, where they’ve been forked and extended. Check out Jørgen’s blog adding support for Passenger and Ruby Enterprise Edition.

Check out the scripts used on Github and feel free to post any feedback or suggestions.


[Open Source Rails Tips ]
View original post | Add to del.icio.us | Share

      view feed content Rails TakeFive: Five Questions with James Elwood (RM-Install ( FiveRuns))   45 d ago

Welcome to this week’s Rails TakeFive, our weekly discussion about Ruby on Rails with noted developers from throughout our community. This week, we thought we’d take a little different tack and bring you words of wisdom from one of our customers on how they use Rails and FiveRuns Manage to help keep their site humming.

James Elwood is Network Ninja Master for Geezeo.com, a free web-based personal finance application that makes it easy to track all your finances, see where all your money is going, set financial goals and learn from others. Built in Rails, it’s an awesome application and community, and has received a ton of great buzz from the financial community.

FiveRuns: Welcome James, and thanks for taking the time to share your thoughts! Let’s start by talking about how you got started with Rails at Geezeo. When and why did you decide to build Geezeo on Rails? What are some of the biggest benefits you’ve seen?

James Elwood: I came on board a little after Geezeo made the decision to build on Rails. One of first early iterations of our product was built in PHP by an outsourced team. This first iteration provided an initial idea for the site but did not allow a process where the team could rapidly take an idea and make it functional in a short period of time. Coming out of the outsourcing experience the team had been reading Agile Web Development with Rails. Because of this experience and all the buzz in the industry about Rails, we decided to go with Rails full steam ahead.

Sitting back mainly on the sysadmin end I am impressed with how rapidly the team can take something sketched on paper and push it out the door. In prior jobs, often the littlest changes would involve stepping back through legacy code trying to shoehorn in new features with no guarantee that a deliverable would happen in the current quarter or even year. The challenge for me in supporting them is just trying to keep pace with them as the requirements shift and they find new and inventive ways to boost performance and streamline operating costs. My experience is that Rails and the development methodologies surrounding it play a huge part in our ability to dream, design, build, and deliver.

FiveRuns: How has FiveRuns helped streamline and enhance your systems management processes?

James Elwood: By nature I am lazy and have an extreme dislike for perpetual repetition. I also hate re-inventing the wheel when I could be innovating the next big thing. But let me clarify, lest my bosses think that 70% of my time on the job is spent asleep. My feeling is that if you can automate a task then do it because that will free you up to tackle more pressing tasks or ones that add increased value.

At my last job we had the horrendous daily task of writing out the back up logs. (Literally writing them out. By hand, With pencil and paper). It was one of those jobs that you grit your teeth and wish that you could convince the powers that be to look at how you could manage that process by exception. FiveRuns lets me do that for Geezeo.

I rest easy knowing that FiveRuns will wake me up in the middle of the night to tell me that something is wrong with the server. Glancing over graphs on the dashboard gives me a quick and concise view of how my entire stack is performing and if something looks amiss I can drill in for more detail. That beats gnawing on the end of a pencil logging into every server, every morning of every workday. If anything FiveRuns has lowered my pencil budget substantially.

FiveRuns: Can you name a time when FiveRuns was vital to Geezeo’s upkeep?

James Elwood: FiveRuns helped point out an oversight on my part that killed our MySQL backups for a better part of the day (not one of my prouder moments!). We use replication so that we can have an online spare as well as for backups. Since we have been on EC2 since the early days we got into the habit of using mysqldump to get a snapshot of the database off the slave and tossing it up on to S3 for the inevitable “what if?” scenario.

The problem started when I forgot to uncomment one little line in the backup script, the one about stopping the slave. The slave was dutifully replicating while earnestly trying to dump the database to file and in the process just getting plain ugly with itself. So one morning, on a chart scanning expedition, I noticed that the CPU on the slave was tweaked which led me to check into what the instance was or was not doing.

By pointing out my shell scripting oversights, FiveRuns also made it obvious that I really ought to write a report that tells me if I missed any backups in a given period (no way am I picking up that pencil again). Being reminded of my shortcomings and mistakes is critical for me to not drop the ball. I guess in that regard, FiveRuns is like my mom on the job, “Don’t forget to look over your homework and when you get a chance would you please clean out that temp directory sometime this century?”

FiveRuns: How has using FiveRuns improved the user experience at Geezeo?

James Elwood: Soft spots and weaknesses, that it what I am looking for when I use the service. Is there anything on the server side that I can tighten or add capacity to? Are there any controllers that are sucking the life out of the Internet that the team should be made aware of? FiveRuns is part of the process aimed at refining and improving our stack. I’m never really satisfied with anything I work on because when I get the chance to step back I can see where I could have done things differently so I use the service to continually solicit feedback with the hope that I can make the things I do feel a little less unfinished.

FiveRuns: What types of product features or integrations would you like to see in the future from FiveRuns?

James Elwood: Some of the things I love to see is more push reporting, there are times when the work load gets too much and the only applications you might have open are mail and a terminal. Getting the charts pushed out in an email even on a weekly basis would be nice, especially the application metrics. If that could be configured to report on the pieces that a developer is working on and just push those metrics out on how it is performing in the various the environments we are monitoring it could be a big win. Everyone is often heads down during a sprint and can loose sight that the sun still comes up and goes down everyday. Combined with TuneUp I think it would give developers insight into how the code is performing.

James Elwood is the Network Ninja Master for Geezeo.com, the go-to guy for all networking and web development projects. With 10 years experience in network administration and information technology, James has been a integral part of Geezeo’s success. Before coming to Geezeo, James served as Network administrator for BKM total office, one of the worlds largest distributors of Steelcase office furniture. James holds a Bachelors degree from Connecticut State University and an MBA in Technology management from the University of Phoenix.


[Rails TakeFive Tips geezeo james elwood rails Rails takefive ]
View original post | Add to del.icio.us | Share

      view feed content Join FiveRuns at the Dubliner on West Portal in San Francisco! (RM-Install ( FiveRuns))   46 d ago

FiveRuns will be speaking at the San Francisco Ruby Meetup on Thursday, October 16 at 6:30pm. And, afterwards, we’ll be heading over to the The Dubliner on West Portal to have drinks, food and chat some more.

Bring your business card, mention FiveRuns and get $3 drinks. Or, look for Theo, Greg or Mike, get a FiveRuns sticker and get $3 drinks. Hope to see you at the Meetup, at the bar, or both!


[Community Events ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns TuneUp Merb 0.5.2 Released (RM-Install ( FiveRuns))   47 d ago

We’re proud to release version 0.5.2 of TuneUp for Merb. This release fixes one bug, which was the incorrect display of TuneUp in Safari.

Here’s how to update:

Enjoy!


[Merb Open Source ]
View original post | Add to del.icio.us | Share

      view feed content FiveRuns TuneUp for Merb (RM-Install ( FiveRuns))   51 d ago

Since TuneUp was released in May, we’ve been thrilled by the interest we’ve seen from across the Ruby community. It’s become a day-to-day debugging, performance tuning, and communication tool for many Rails developers, and over the last few months the involvement of the community in improving the stability and usability of the plugin as an open source project, hosted on GitHub, has been tremendous. Thanks, everyone!

So, what’s next for TuneUp?

Over the last year or so the Ruby community has seen an explosion of new web frameworks. We all love Rails, but a little friendly competition is a good thing, right? At FiveRuns we’re first and foremost Rubyists, and we’ve been having a lot of fun playing with these alternatives and thinking about how we can support them in our products.

We’ve been especially interested in Merb, which has been steadily growing in popularity and stability, and has popped up in feature requests from our customers. We’ve talked to a number of shops that include Merb development in their bag of tricks, and support for Merb in TuneUp has been a frequent follow-up question after demos at Ruby user groups.

So, today we’re announcing FiveRuns TuneUp for Merb, direct from MerbCamp in San Diego and just in time for the official release of Merb 1.0.

Let’s take a peek.

TuneUp for Merb is packaged as a Merb Slice, and works with Merb v0.9.5 and higher (it might even work with previous versions). Installation and setup is easy (we love slices); in just a few steps you’ll see a panel above your application that will provide in-depth information on the current action.

Currently, TuneUp for Merb provides information on filters, renders, and DataMapper activity (let us know what other ORMs you’d like to see. Sequel? ActiveRecord?). You can see what proportion of time you’re spending in the model, view, or controller, as well as how long each step takes to execute, where it’s being called (with support to jump to those files in TextMate), and for DataMapper activity the SQL query that was executed and a detailed breakdown of the Query object. Even if you’re not focused on performance, the TuneUp panel is a powerful exploratory tool; as with the Rails version, we expect we’ll hear developers are using it for debugging just as often as they use it for tuning.

The TuneUp Community

Another thing about TuneUp that we’ve received a lot of great feedback on is its use as a communication tool. With a single click from the panel you can send up the same detailed information on an action to http://tuneup.fiveruns.com, where you can keep it private (just to save it), share it with specific people, or even make it public—where the entire community can help you solve problems.

How do I get it and install it?

Installation is easy – in just a few steps you can start seeing detailed performance metrics on your Merb app. It comes packaged as the fiveruns_tuneup_merb gem. The detailed instructions are on the TuneUp web site.

Once configured, you can instrument your local Merb applications with TuneUp. For further capabilities, like uploading and sharing of TuneUp runs via the TuneUp website, please create an account and add the API key from your profile page. Please help us grow the public TuneUp community by uploading runs, sharing them and participating in the discussions.

Open Source

Our commitment to open source is the same as always. GitHub is a fantastic service, and we’re happy to make fiveruns_tuneup_merb (and dependency fiveruns_tuneup_core) available for forking. The project is still in its infancy, is most certainly a beta, and any help you can provide on making it more stable by contributing code (or sending bug reports and feature requests to our support team at


[Announcements Merb Open Source github merb ruby ]
View original post | Add to del.icio.us | Share

      view feed content Get your FiveRuns TuneUp 0.8.17 (RM-Install ( FiveRuns))   52 d ago

We’ve just unleashed FiveRuns TuneUp v0.8.17. This release fixes an issue when running on JRuby. It also corrects a snafu I introduced by building 0.8.16 against a modified working copy. My bad! If you were previously getting an exception coming out of _data.html.erb, this release should fix that.

The moral of the story is, you should always run git status or svn status before you build a Gem!


[Open Source ]
View original post |