Thursday, December 20, 2007

Message queues in Ruby

Multiple times now I have looked for a message queue system for ruby. I love Amazon SQS, but sometimes, it doesn't fit the bill. Every time I search I only come up with the ruby queue (rq) tool. Recently I found Reliable Messaging for Ruby (reliable-msg), a ruby messaging library, that is both simple and feature rich.

I found that it exercises a bug in ruby 1.8.5 in rdoc. After applying the fix listed in the bug report, I was able create my directory for persisting messages just fine (I didn't want to take the time to set it up in mysql). It worked fine for me following the example on the web page, but I had to use ReliableMsg::Queue instead of just Queue.

Come to find out, Drb isnt' much of a framework for doing distributed processing. It's more of a protocol with some really nice helpers. Of course you can build your own distributed processing on top of it, but here are two pages about cool distributed processing systems for ruby.

Personal Finance

In college I took a personal finance course. This course didn't just teach you how to manage your checkbook and use a budget, but how to plan for the best possible financial situation from now through, insurance, your kids' college, and your retirement. The content of the course is now posted in really great detail online at This is the best resource I have seen to really learn about personal financial management.

Monday, December 03, 2007

ExtJS customizations

I have been working with the Ext javascript framework lately at on a client project and realized that I need to post this stuff because I have made quite a few nice components for it. It is at Right now it's not much more than a simple extraction from my project and there are no examples yet as I obviously can't post the client project. Some of the things I have built are:

  • CrudGridPanel: A grid panel that I reuse for each Rails model for all the CRUD interaction. Works together with the CrudEditor. One nice feature is that the grid saves it selection everytime it changes and reselects the rows based on id when the data store reloads.
  • CrudTreePanel: Same as the CrudGridPanel except that is displays it's data as a tree. It uses the DataStoreBacking plugin to load the nodes for the tree from an ext data store.
  • CrudEditor: Encapsulates the edit form and the server CRUD actions. Everything uses REST.
  • Some extensions to allow plugins for data stores, data stores that mirror each other's data (used to keep different sets of persistent filters), and better LoadMask handling.
  • LoadAttempts: A plugin for data stores that retrys failed loads.
  • ReloadingStore: A plugin that periodically reloads the data store automatically.
  • PersistentFilters: A data store plugin that creates filters that don't disappear with reloads. Uses the same model as event listeners (addFilter, removeFilter).
  • DataStoreBacking: A TreePanel plugin that loads the tree from a data store and keeps it up to date as the store's data changes.
  • DDBulkMultiSelect: A panel/form field that has two trees and works as a multi select. You drag items between them to perform the selection. In the future it will allow you to drag nodes with children and all of the child nodes will be properlly included in the selected column too.
  • TreeComboBox: Uses the DataStoreBacking to create a combo box whose's contents are an up to date tree rather than a DataView.
As I have time I will clean things up and post examples. This is my first open source code contribution and the first time my code has been exposed to the "wider world". So please give me feedback on how I can make it better code, more usefully, more generally applicable.