Archive for the 'Ruby' Category

Handling Eventual Consistency with Amazon SimpleDB and Ruby

Eventual consistency. The storage system guarantees that if no new updates are made to the object eventually (after the inconsistency window closes) all accesses will return the last updated value.

My coworker wrote up our experience writing ruby integration tests against Amazon SimpleDB. You should know that we were in an […]

Headius on Maglev: Is it Ruby?

Charles Nutter had the following to say on the maglev ruby performance numbers:

Except that these are results reported entirely in a vacuum. Whether this is fib following the “rules” of Ruby is entirely an open question. Whether this is method dispatch adhering to Ruby’s call logic is entirely an open question. Whether this […]

Checking Gmail POP+SSL with Ruby 1.8.6 in 10 minutes or less.

I needed to check Gmail via POP + SSL and didn’t want to use Ruby 1.9, what did I do?

Step 1: Install the latest version of stunnel

Step 2: Put the contents of the stunnel config file you see below some place convenient like ~/gmail-pop-stunnel.conf

foreground = yes client […]

Ruby on Rails doesn’t scale… wait; reverse that.

Dr Nic comments on Friends for Sale Architecture - A 300 Million Page View/Month Facebook Ruby on Rails App with this gem:

Um you guys probably weren’t at the meeting when it was decided that “Rails doesn’t scale”. I’ll forgive you this once, but don’t let me catch you scaling Rails again.

Acunote/Nimble Method Patches Speeding up Ruby on Rails

The new Ruby on Rails patches by Acunote/Nimble Method are speeding up Ruby on Rails by a claimed 5X… a friend of mine tried just the ActiveRecord::Base change and reported this:

Yup. I actually just did the ActiveRecord::Base change alone and got a good boost. The code change is pretty solid too. […]

Shard your data or you have failed at life.

Protip: if you are starting a business whose success hinges on scalability of a data store, you had best figure out how to shard across N machines before you launch. Using a single instance of MySQL for the whole thing is a strong indicator that you have failed at life. […]

2008: The year of JRuby?

2008 will probably be the year of JRuby. JRuby solves the two biggest pain points I hear from developers about Ruby.

People think Ruby is slow, so I can’t try it out. I don’t know how we would deploy it, what is all this Apache/Mongrel/Rewrite stuff? Can’t I just deploy on our app server?

Headius by […]

Who is Jay Ruby? Oh, “JRuby”…

I went to the local Barnes and Noble to check out JRuby on Rails and was amused when the clerk started an author search for “Jay Ruby” when I asked if it was in stock.

Law of Demeter, MVC views, and the Presenter pattern

Over on Pivotal Blabs there is an interesting post Lovely Demerter, Meter Maid commenting on the last section of Misunderstanding Law of Demeter by Dan Manges. I’m a big fan of making views (the V in MVC) compliant with LoD by using the Presenter Pattern in Rails, go have a read and let us […]

Interesting patch for Ruby on Rails to limit errant (bad) queries.

I’m a happy fan of ORM, but I have to agree that turning a blind eye to the actual generated SQL can lead to horrible things happening.

If you’re doing RoR you might want to check out this patch to limit the possibility of ridiculous queries being generated.

I’ve just committed a patch to ActiveRecord […]