New Site for Ruby on Rails plugins

Posted by Sam

I've spent the last 20 minutes or so playing on Railsify!. It's a new site dedicated to Ruby on Rails plugins. It's not the first site of it's kind and certainly not a comprehensive list of plugins yet, but it does have one really useful feature. You can create a list of favorite plugins. I can't tell you how many times somebody has asked me about what plugin I used for tags or for this feature or that feature and unless I've got a project open that is using that plugin I can't remember. This way I can keep my favorites all in one place and call them up anywhere I have web access.

Tags: rubyonrails

MySQL Replication Adapter for Rails

Posted by Sam

A few weeks ago Rapleaf released an adapter to handle MySQL replication inside Rails. Many Ruby on Rails users will remember a while back Dr Nic released Magic Multi-Connections that allowed Rails applications to talk to more than one database at a time.

I have to say that I much prefer the syntax of the Rapleaf adapter. In my mind it's a better way to handle MySQL slaves. Although I do have a couple of complaints. For starters, MySQL Replication Adapter is just that. A MySQL Replication Adapter. I'd like to see the same code available for all databases. Dr Nic's Magic Multi-Connections gem does it and it seems like something that should be database agnostic. My other nit pick is that you must use the syntax below to send queries to your slaves. MyModel.find(:all, :use_slave => true) I like that using the slaves for all reads isn't an all or nothing affair, but it seems to me that most of the time this is the behavior that you would want when you have this type of environment. So my suggestion is to turn, :use_slave => true, into the default behavior and override it as necessary. Just my two cents. But overall I'm very happy to see that Rapleaf is making an excellent contribution to the scalability of Rails apps.

Tags: rubyonrails