commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil O'Toole <>
Subject Re: [collections] Proposal for a Timeout Affected Priority Queue
Date Wed, 30 Jul 2003 22:06:09 GMT

--- Cheung Lo <> wrote:
> Proposal for a Timeout Affected Priority Queue
> I would like to propose the adoption of the TapQueue into the
> collections
> packages but need feedback on the following issues:
> 1.  Has anyone else had a need for a timeout affected priority queue?
> 2.  If so, what additional requirements did you have that is not
> already
> described?
> 3.  How do I submit a draft of the classes - do I attach a zip file
> or paste
> into the body of an email?
> 4.  Who do I send it to?

1. Yup, i hacked together a duct-tape and espresso solution for a
situation like this a few years ago. I remember at the time not being
very happy with it, and since I don't have access to that proprietary
code, I can thankfully forget i had anything to do with it. I would
very much like to see a first-class implementation in [collections].

2. Your description appears to suggest that the implementation only
bumps up the priority when the (single) timeout occurs. What might be
preferable is to have multiple timeout points (or some other aging

Here's an example. Let's say you had a priority scheme 0->9 (9
highest), and in comes a  policy admin job (as from your example). This
might get priority 1 (as opposed to a customer call, which might
initially have priority 6). Rather than waiting until the absolute
timeout occurs (say after 14 days) and then bumping the policy job
priority up to 9, it would be useful if after 2 days the policy job
gets bumped up to priority 2, then 2 days later to priority 3, etc.
Likewise I'd like my customer calls (which initially start at priority
6) to get bumped up to priority 7 after six hours, then to priority 8,
which would be the maximum priority for customer calls.

With this scheme policy jobs would gradually rise in priority, rather
than waiting until the deadline when the policy job would then become
absolute top priority (this does sound like my normal working pattern

To implement this there must be some way of associating an object (or
class of objects) with a particular (configurable) prioritizing scheme.
All sorts of things pop into my head ;) I'd really like to see what
you've come up with, and since i will probably have some OSS dev time
available fairly shortly, I'd be more than happy to lend you a hand
with development if needed.

3&4. As stephen said, a zip or a link. If the package is large (>100K?)
then you won't be able to mail it to the list anyway, so you would be
better off with a link.

- Neil

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message