[erlang-questions] Behaviour of queue

Fredrik Andersson sedrik@REDACTED
Thu Sep 9 22:13:43 CEST 2010


On Thu, Sep 9, 2010 at 10:13 PM, Fredrik Andersson <sedrik@REDACTED> wrote:
> On Thu, Sep 9, 2010 at 8:08 PM, Robert Virding <rvirding@REDACTED> wrote:
>> On 9 September 2010 19:04, Jachym Holecek <freza@REDACTED> wrote:
>>> # Fredrik Andersson 2010-09-09:
>>>> I have a question concerning the behaviour of the erlang queue module.
>>>> Does it store everything in memory or will it fallback to storing
>>>> things on disk if memory is running short? If it does not I need to
>>>> implement a layer on top of queue that will fallback to store things
>>>> on disk if needed.
>>>
>>> It's implemented as a pair of lists, that is all data lives on heap
>>> of given process. Other option to implement a queue is to use ETS
>>> table, but that's in-memory too so not sure it helps. You could go
>>> with DETS table too, but I don't have first-hand experience with it.
>>
>> What Jachym was implying but never really explicitly stated is that
>> the queue module is so simple that it is easier to completely rewrite
>> it with the storage mechanism of your choice rather than add another
>> layer on top of it. In this he is completely right.
>>
>> Robert
>
> Ok, Since we already have another layer on top of the queue module in
> my current project I will simply extend that to write stuff to disk
> when needed.
>
> Thanks :)

Apparently I sent this message to Robert only. Here you go list :)

>
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>>
>


More information about the erlang-questions mailing list