Mike Perham

On Ruby, software and the Internet

Entries Tagged as 'Ruby'

Optimizing Heroku

June 1st, 2011 · 4 Comments

I spent some time recently playing with a trivial Rails 3 app using girl_friday and learned a few interesting things: Michael’s post on using Unicorn with Heroku is a fantastic idea and great way to improve the efficiency of your Heroku application’s web dynos. Heroku imposes a limit of 15 threads per Ruby process (there [...]

[Read more →]

Tags: Ruby

Threads Fibers Events and Actors

May 19th, 2011 · 10 Comments

I presented (from 3000 miles away!) today at EMRubyConf. My talk, “Threads Fibers Events and Actors“, is a short 13min chat on current trends in Ruby scalability and concurrency. To summarize: Ruby’s threading has historically been terrible. So we turned to event-based systems like EventMachine but the reactor pattern brings its own set of drawbacks. [...]

[Read more →]

Tags: Ruby

Actors and Ruby

April 23rd, 2011 · No Comments

I’ve spent the last month learning Rubinius’s Actor API for safer concurrency with threads. My entire career really has been focused on learning and building scalable and high performance infrastructure. My explorations with Fibers over the last year lead me to believe that they are essentially a workable hack to get around Ruby’s current issues [...]

[Read more →]

Tags: Ruby

Filling out PDF forms with JRuby

February 15th, 2011 · 4 Comments

I recently had to figure out how to programmatically fill out a PDF based on the form input from a Rails application. It looks like there’s nothing native to Ruby but there is a comprehensive PDF library called iText which will handle form duties. Using JRuby, we can access their Java API to fill out [...]

[Read more →]

Tags: Ruby

Using RDoc

December 16th, 2010 · 6 Comments

One longstanding weakness with the Ruby community is subpar documentation. I think many Rubyists tend to look down on actual API documentation, preferring instead to just read source code directly. I’ve been guilty of this too and I think some of this is due simply to unfamiliarity with RDoc. Let’s change that now. Creating RDoc [...]

[Read more →]

Tags: Ruby

Contributing to Ruby

December 8th, 2010 · 4 Comments

I had a very pleasant experience recently in contributing some net/http documentation improvements to Ruby. Ruby Core has made contributing very easy these days, it’s really as simple as: Fork http://github.com/ruby/ruby Make and commit your changes in your repo Send a pull request In other words, contributing to Ruby is now just as easy to [...]

[Read more →]

Tags: Ruby

Ruby Stdlib is a Ghetto, Pt. 2

November 25th, 2010 · 12 Comments

Eric Hodel disagreed with my recent point. I didn’t present much of an argument because I didn’t think there was much disagreement with my point. Let me elaborate. 1) It’s full of unnecessary libraries that should be separately distributed The Ruby community, at least in the US, has proven to be very open to change, [...]

[Read more →]

Tags: Ruby

The Ruby Stdlib is a Ghetto

November 22nd, 2010 · 33 Comments

Much of Ruby’s standard library (the set of classes shipped with the Ruby VM itself) is old and crufty. For laughs, go look at the code for some of the classes that you’ve never used. Chances are it’s from 2000-2003 and doesn’t even look like idiomatic Ruby. I’m wondering what classes should be removed from [...]

[Read more →]

Tags: Ruby

Dalli Performance and Garbage Collection

September 19th, 2010 · 1 Comment

I did an interesting experiment to compare memcache-client and Dalli performance this morning. I wanted to understand which library allocated more objects in order to know which library would have more GC overhead. Ruby 1.9 has a new module GC::Profiler which will generate a report with stats about each GC run. Since both gems have [...]

[Read more →]

Tags: Ruby

Dalli – memcached for Ruby

August 30th, 2010 · 24 Comments

Dalli is my brand new memcached client for Ruby. I’ve maintained Ruby’s memcache-client for two years now and been dissatisfied with the codebase for a while. Coincidentally, NorthScale approached me recently about building a pure Ruby memcached client which used the new binary protocol defined in memcached 1.4. We worked out an arrangement to sponsor [...]

[Read more →]

Tags: Ruby