Alex Kahn

Gotham Ruby Conference 2010: A Recap

May 26, 2010

Over the weekend I attended the fourth "Gotham Ruby Conference": (GoRuCo). The conference was well-organized, the content was top-notch and there were tons of great people there. !! "Photo by sd": The day opened with a welcome from a Pace University's Jonathan Hill. Jonathan, who is assistant dean of Pace's Computer Science program, described the longstanding relationship between Pace and the New York Ruby community, pointing out that GoRuCo has been held at Pace since its first year. Pace uses Ruby and Rails extensively in its Computer Science program and, in turn, its graduates often find employment through this community. Jonathan expressed real appreciation for the health and energy of the Ruby community in New York. It was neat to feel this connection and know that Pace was more than just a rented space for the conference. *Nick Gauthier* presented the first talk, Grease Your Suite, on making slow test suites run faster. This talk demonstrated how he improved a test suite in a Rails project from 13 minutes down to under 20 seconds. To do this, Nick used lifo's "fast_context":, his own "Hydra": for distributing tests across CPU cores or machines, and Ruby Enterprise Edition for its ability to tune Ruby's garbage collection. He also gained speed by mocking PaperClip's image manipulation, using fixtures to replace truly-resized images. Nick got further performance by tweaking a journaling setting for the @ext4@ filesystem (Nick is a staunch Linux-on-the-desktop user), as well as by disabling @atime@. Nick noted that the improvements from these tweaks gain as much in speed as running tests on a solid state drive. With such a fast test suite, the Continuous Integration server can return to its true calling--ensuring a green build in a production-like environment. While I don't have any projects that are burdened by tests that take too long, I nonetheless left this talk with strategies to grease my suite. Get all the details in "Nick's slides": The next talk, by *Aman Gupta*, was on a new Ruby profiling tool, Memprof. Aman provided a tour of the tools he'd worked with for profiling Ruby's memory use: @ObjectSpace.each_object@, gdb.rb, bleak_house, and patching Ruby in order for it to provide heap dumps. These tools are all helpful, he said, but they require writing patching or running special versions of Ruby, or don't provide complete enough information on the contents of the objects in memory or their context in code. Memprof, created by Joe Damato with contributions from Aman, solves the above problems: Installing it is simple (@gem install memprof@), use is simple (@Memprof.dump_all@, for example), it outputs to JSON, and provides all the necessary information and context about objects in memory, including references between objects. Memprof's JSON output makes it easy to dump its output into a database like MongoDB, which "": does. Aman's talk struck at just the right level: deep enough to keep us interested, but not so deep as to lose the audience. And if you've ever checked out "Aman and Joe's blog": you'll know how deep this this rabbit hole goes. My thanks to Aman for that. Managing Rubyists, a talk by *Luke Melia*, was directed at Ruby developers who manage a team. This was the only non-technical talk of the day and it was one of the highlights for me. In the talk, Luke laid out 15 principles or techniques for managers to follow for their team and its members to achieve happiness, motivation, productivity and growth. I was blown away by the care Luke took with this subject and the regard he has for the developers he works with. Luke takes his craft as a manager as seriously as Rubyists take their code. Check out "Luke's slides and notes": for the details. If you're a manager, be sure to check out Luke's "recommended reading": After lunch, *Chris Williams* (of JSConf fame) presented Rails Caching à la JavaScript. In his talk, Chris made the case a straightforward approach to working around performance issues with Rails: using page caching to avoid the Rails stack altogether for most requests, and making JSONP AJAX requests to retrieve the personalized aspects of a page. Even though this AJAX request is handled by Rails, its rendering overhead is offloaded to the client (Chris recommends "mustache.js": for client-side rendering). Despite Chris' preface that the technique described is not ideal for most Rails applications, the talk drew skepticism and ire from the audience. Nonetheless, the talk was enjoyable, humorous, and made a strong argument for a straightforward caching strategy. Next, *Alex MacCaw* showcased Bowline (pronounced "bowlin'" like "the knot":, a new framework for creating cross platform desktop apps using Ruby, JavaScript and WebKit. Alex gave a tour of developing an app with Bowline, showing off its in-memory model layer, "SuperModel":, its bindings between Ruby and JavaScript and neat features such as seamless background updates for installed applications and synchronizing data across remote client apps. In all, Bowline looks to be a very ambitious and promising project. *Paul Dix*, author of the forthcoming "Service Oriented Architecture with Ruby on Rails":, presented on how to create web service clients using ActiveModel to scale an app. This is not scaling an app for traffic, but how to scaling as complexity and team size grow. Paul demonstrated how to leverage ActiveModel to implement client models with validations, dirty tracking, callbacks and even persistence. If you are struggling to deal with complexity in a large application and to abstract components into separate services, Paul offers an excellent approach. Definitely look out for his book this August. The last talk of the day, Scaling to Hundreds of Millions of Requests, was presented by *James Golick*. In this talk, James outlined how he improved performance and scaled a very active "community site": James shared his experience moving from Amazon EC2 to physical hardware and the immense performance increase this brought. James also went over his trials with MongoDB and using MySQL "non-relationally" with "Friendly": before finally settling on Cassandra. As James argued in "a recent blog post": Cassandra is one of the NoSQL databases that truly scales horizontally. Look for James speaking further on this topic at Railsconf. The final hour of the conference comprised of "Rejectconf," a round of lightning talks and a chance to speak for people whose talks weren't accepted for the conference program. Some highlights were Pat Nakajima presenting his "Bookmarklet Factory": ("how to downvote 100 Gizmodo comments"); Edward Ocampo-Gooding presenting on "open data in Ottawa":; Aaron Quint presenting on "Jim":, a JavaScript manager, bundler and compressor; and Michael Bernstein presenting on "Ohm":, the Redis object mapper with an "extensive contrib collection": Then it was beer time. In all it was a great conference. Thanks to the conference organizers and hello to all the folks I met. And hello to all the folks I didn't get a chance to meet but wish I had. Keep your eyes peeled on "the conference site":; videos will be posted in the next two weeks.