WEll.

There are libraries ready to do exactly what you want.
I dunno why you try to reinvite the well that so many people did before you.

anyway check out ruby-talk archive some days ago someone created library 
to crate message queue using memcache - not that i think it's good idea 
- there are much better solutions - or even tuplespace which is in 
stdlib doing just that.

anyway have phun