Priority Queues

Rudolph van Graan rvg@REDACTED
Mon May 16 08:24:05 CEST 2005


Hi All,

I am currently thinking about the implementation of priority queues  
in erlang. Specifically, what do you guys suggest as an efficient way  
to achieve the following:

1. A queue with a definitive head and tail (i.e. first and last records)
2. The items in the queue need to be sorted according to some  
criteria that will always allow you to identify an entry as the  
"first" or "next" one
3. The queue length can be massive (100's of thousands or millions of  
records)
4. Insertion time should be constant
5. The queue must be persistent (i.e. mnesia or dets)
6. Once the first/head entry has been processed, it will no longer be  
in the queue.

Any suggestions?

Rudolph van Graan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2373 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20050516/a11a2678/attachment.bin>


More information about the erlang-questions mailing list