Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FIFO queue (or stack) implemented on disk, not ram (preferably in C++) [closed]

Tags:

c++

c

queue

disk

Basically what I'm after is the equivalent of the Standard Template Library queue implemented in such a way as to use the disk for storage. The volume of data that will need to be in the queue is far greater than can be stored in the ram of most computers today.

Ideally, I'm after a library to use. However, any recommendation on how to implement this queue would be useful.

like image 552
Adam Avatar asked Oct 24 '09 03:10

Adam


3 Answers

You might want to look at the STXXL:

"The core of STXXL is an implementation of the C++ standard template library STL for external memory (out-of-core) computations, i.e., STXXL implements containers and algorithms that can process huge volumes of data that only fit on disks."

like image 56
James McNellis Avatar answered Sep 23 '22 06:09

James McNellis


You might want to look into the STLXX library. It contains a disk-based priority queue using the "Sequence Heap" model described by Peter Sanders.

like image 45
Charles Salvia Avatar answered Sep 23 '22 06:09

Charles Salvia


A wild idea: Implement an allocator class that reads/writes to and from a file on disk and pass it to STL deque or queue or whatever suits your needs.

like image 25
dirkgently Avatar answered Sep 26 '22 06:09

dirkgently