I have to write a queue object which indexes values added to it, makes them searchable on a number of criteria, and returns requested data. By my estimates this queue would be limited to around 2mm messages. THe queue must store and index the following fields of information
It is basically an SMTP queue, so I need to be able to search on destination domain, message id, and queueid, it also must have functions to query the size of the queue (# of msgs), add a record, remove a record, and get a records contents. I must also be able to update values in the queue. So lets say I want to change all values with the queue_id of 1 to the queue_id of 3, I would just call a function that would reassign all queue_ids of 1 to 3.
I know this sounds like a database, and believe me I have considered trying to use a DB for the solution, but SPEED is the huge problem here so it has to be done internally to the program.
Can someone provide me example code to accomplish this? or possibly point me in the direction of a package or class which already does something like this?
Worth 500 points.