Persistent Queue implementations?

Karl A. Krueger kkrueger at example.edu
Wed Dec 25 13:12:27 EST 2002


Aahz <aahz at pythoncraft.com> wrote:
> Just how much ACID do you need, anyway?

Enough to fill the Albert Hall.

Persistent queue operations need to be atomic, in order to be thread-
safe.  Consistency is pretty much assumed since only single objects
are being enqueued or dequeued.  Isolation is necessary only to the
extent of blocking concurrent enqueues or dequeues.  And as for
durability, well, this is supposed to be a persistent queue, not a drop-
stuff-on-the-floor queue.


> If you really care, you should use a full-blown database.  If not, I'd
> take Kevin's advice to use cPickle, possibly using a separate thread
> to do the writes.

I'm working on a cPickle-based queue now ... will post it when it's done
(as well as a corrected version of the shelf-based queue I posted, with
more of the Queue protocol working).

-- 
Karl A. Krueger <kkrueger at example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews



More information about the Python-list mailing list