background with evented starling and workling
introduction
We have been using Starling for background tasks on Revent with a few daemon processes pulling things off the queue. We recently had a need to do this again, and decided to up the ante with the evented version of starling and the workling plugin.
Chris Wanstrath of Err the Blog added in Event Machine to make evented starling, which got pulled back over to Twitter. Britt’s version and it’s various forks. We decided to use blaine’s version, which as of this writing is a copy of the fiveruns version, but we hear that he is continuing work on Starling and will soon be releasing a new version of the gem that incorporate these changes, and that his branch will be the “definitive” fork.
Workling seems like a decent setup, and it will be nice to consolidate our non-web-serving, constantly running, rails environment loading daemons down to one.
We go to github again for the latest on workling, as well.
Froze starling gem in vendor, so we start it with ruby -I vendor/gems/starling/lib vendor/gems/starling/bin/starling -d
Froze fiveruns version of memcache-client in vendor gems as well based on some bugs they found in 1.5.0. Another option might be to use Evan Weavers libmemcached wrapper.
One issue we came across, again, is how to test asynchronous operations. We’ve currently decided that we can test each side of the operation, the set and get, and have to assume the queue is working as advertised. Starling and workling both come with tests, so that doesn’t seem too unreasonable, but it does feel like there’s a hole in the test suite at a pretty critical point.
Continue Reading…Posted by seth on Jun 11, 2008
