MySQL Forums
Forum List  »  Newbie

What is the best way to implement a queue system?
Posted by: Nigel Higgs
Date: August 01, 2009 04:31PM

I am very new to MySQL and PHP (started 2 weeks ago), and was wondering if someone could give me some advice on the best ways to create a queue system.
Here are the details of the queue system I need:

- The queue system I need will have a limited number of entries (I think it'll be about 1000).
- If the queue is full no new items will be allowed to be added to it.
- New items need to be added to the end of the queue.
- The first entry in the queue will need to be read then, as long as a certain condition has been met, moved to the end of the queue again, otherwise is deleted.
- The condition that needs to be met has yet to be decided, but it will be something along the lines of, the entry has reached the top of the queue less than x times, or the entry has been in the queue less than x days.

Speed is not really an issue as I only expect the database to be modified every few minutes at the most, but obviously, the more efficient the methods are the better.
So, how would people recommend creating this system?

Many Thanks,

Options: ReplyQuote

Written By
What is the best way to implement a queue system?
August 01, 2009 04:31PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.