[erlang-questions] Large array of data structures

Kirill Zaborski <>
Tue Sep 18 22:58:51 CEST 2007


And by the way it looks like SleepyCat/Oracle people are working on native
BerkeleyDB driver for Erlang -
http://lionet.livejournal.com/18422.html(sorry but the page is in
Russian - it's about
http://bayfp.org/ meeting that took place recently).

Best regards,
Kirill.

On 9/18/07, Claes Wikström <> wrote:
>
> Dmitrii 'Mamut' Dimandt wrote:
> > I've received a question over at "Erlang in Russian" forum,
> > http://erlang.dmitriid.com/forum/topic/11 that reads:
> > "
> > I need to process a huge array of structures - about 60 million of them
> > in total. Each structure looks like this:  {PID, type (atom), direct
> > (atom), index (Integer), nextind (Integer), prevind (Integer), position
> > (Integer)}. I think such a structure would take up about 50 bytes and
> > the entire array would then need 60 * 50 = 3 GB. It means that the array
> > must be partly written to disk. In addition I need a fast access to PID,
> > index, nextind, prevind fields. Searching for a structure by these
> > fields should take about 2 microseconds, saving such a structure should
> > takle as much. Reading and writing is performed on the same structures
> > (about 30 000 of them) while the others simply wait. So the question is:
> > how can i implement such an array?
> > "
> >
>
>
> Use Berkely DB and some of the BDB drivers posted here on the list
>
> /klacke
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070919/dffeb715/attachment.html>


More information about the erlang-questions mailing list