Here is the easily extendible queue and agents library. You can easily extend QItem, QAgent to process the QItem and QManager that creates the queue of QItem's and dispatches them to QAgents. There is also a subclass that can be used for database interactions.