ryandotsmith/queue_classic — pull request #37 by copiousfreetime (2012-01-23 07:14:43+00:00)
Title: major changes across the board

I started down the path of just removing the class variables and getting notify/listen to be more granular, and as i mentioned at Waza what might happen, I ended up rewriting pretty much the whole thing.

I kept a semblance of compatibility. If you are using the rake files and putting jobs on the queues in the same json format, then you'll probably have an easy transition. If you were using it from the Ruby API level, then you'll have a bit of a change.

The concepts is very similar, and the implementation is a whole lot different. I can completely understand if you want to ignore this pull request. I wanted to give you first refusal. If you do, I'll be happy to start up a new project with what I have here and give queue_classic loads of credit.

From a feature perspective, this is what it boils down to:

* Removal of all the static class variables from the original code base.
* Automatic Queue creation, when a producer or consumer (see terminology below) attaches to a queue, it is automatically created, like beanstalk.
* NOTIFY/LISTEN is now per queue based, and notifications are only received by consumers that are listening on the appropriate channel.
* Stats on what is being done where. We can do a little bit of introspection into the system now.
* Connected clients are recognized via the pg_stats_activity table and used to populate fields in the *stats*.
* The relative_top of the Fuzzy FIFO algorithm is now automatically calculated based upon the stats table.
* Runnable Jobs are created from Mesasge bodies enableing queue classice to be used wither with its own style jobs or with Resqueue style jobs (see the json format for the payload).
* The Worker forking process is implemented using Servolux::Piper and can listen on multiple queues in the same way that Resque can listen on multipel queues.