The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Scaling to multiple databases with Rails

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David Heinemeier Hansson

Posts: 512
Nickname: dhh
Registered: Mar, 2004

David Heinemeier Hansson is the lead Ruby developer on 37signal's Basecamp and constructor of Rails
Scaling to multiple databases with Rails Posted: Apr 15, 2007 11:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by David Heinemeier Hansson.
Original Post: Scaling to multiple databases with Rails
Feed Title: Loud Thinking
Feed URL: http://feeds.feedburner.com/LoudThinking
Feed Description: All about the full-stack, web-framework Rails for Ruby and on putting it to good effect with Basecamp
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by David Heinemeier Hansson
Latest Posts From Loud Thinking

Advertisement

Remember that point about Rails lacking an easy-to-use way of dealing with multiple read/write databases? Strike that. Nic Williams has released Magic Multi-Connections. It makes it dead easy to use a cluster of databases to scale read and write speeds higher than a single connection would ever allow.

That in itself is wonderful. Williams let code be his reply to the discussion of Twitter's woes on scaling the database. I would of course rather have seen this work come out of Twitter, but I'm happy that they got a free offering handed to them regardless. They didn't even have to pass step 1 in Brian McCallister's road map for getting stuff fixed in open source. And the turn-around time was within the same day of this whole thing blowing up.

Now how could this be. How could Nic fix such an apparent "critical flaw", as others have billed the lack of this facility in Rails, in such a short time? Simple, he did it in less than 75 lines of Ruby as a plugin for Rails. Less than 75 lines.

In my mind, that's the crux of the story. That extending Rails to do what you want is often much simpler than you think. That you can't compare extending a high-level framework written in a language like Ruby to, say, patching Apache or MySQL. The barriers of entry are simply not in the same sport.

So let's use this occasion to celebrate the wonders of open source ("some times you can just ask and you will receive"), but at the same time keep the effort involved in this example as a guidance for the future ("maybe next time, I could just have a look at how hard it would be to fix myself"). And of course, a big thanks to Nic Williams to making a big fuss a non-issue.

Read: Scaling to multiple databases with Rails

Topic: 5 Question Interview with Twitter Developer Alex Payne Previous Topic   Next Topic Topic: DHH Responds to Stateful Web Applications Row

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use