@hackage swapper0.1

Transparently swapping data from in-memory structures to disk

This package provides a wrapper for functors, which allows their data to be automatically swapped to disk and loaded back when necessary. Although interaction with filesystem is required, whole interface (with exception of initialization) is pure and safe as long as no external manipulation with used database files happens while the program is running. Because only actual data, not indices (in Data.Map.Map, for example), are swapped and some accounting information are remembered for each item, this system is suitable mainly for situations where values are considerably larger then indices. Furthermore, creating complete snapshots to a file of this structure is supported; such snapshot can be then loaded, with individual values being read as they are requested. This package uses the Tokyo Cabinet http://fallabs.com/tokyocabinet/ database, which needs to be installed on the system. A prototype of another data structure, SwapMap, is available in the git repository. It is similar to the Data.Map.Map and like Swapper allows transparent swapping of data to disk, but without requiring any accessory function and with the ability to swap both elements and indices. This one is, however, not complete and thus not provided here.