You probably wouldn't have to do that.  Check into something like resque: <a href="http://github.com/defunkt/resque" rel="nofollow">http://github.com/defunkt/resque</a><p>(depends upon your needs, of course)