Introducing Politics
2008-11-06
I’m going to be introducing my new Politics gem at RubyConf 2008 tomorrow. This gem provides a few modules which solve a couple of distributed computing problems we were having at FiveRuns in providing fault tolerant, scalable processing across many machines.
Here’s my RubyConf slides (1MB, Keynote), minus the screencasts I created to demo the two worker modules in action.
There are two modules provided:
TokenWorker
ensures that one process from a group of redundant processes will be elected to perform processing for the next N seconds.StaticQueueWorker
distributes a predefined set of work to a dynamic set of processes every N seconds.
Both depend on the standard Ruby library and memcached
. StaticQueueWorker
also depends on net-mdns
for Bonjour functionality.
You can find the code on github with a more detailed overview and examples of how to use the modules in your own code. If you find the software useful, please consider recommending me at Working On Rails.