[Haskell-cafe] Persisting a Map

Andrew Cowie andrew at operationaldynamics.com
Thu Dec 19 00:58:21 UTC 2013

I have a Map. It's a lovely Map, with keys and values and everything.
It's not _that_ large. Few 10s of MB at most. Unfortunately, I need to
persist it somewhat reliably.

I'd somewhat like to avoid having to use an external database (obviously
a key/value store like Riak would work, but that's a major dependency to
impose on the system) so I'm wondering if there is a low tech way to do

I can control concurrent access to the file (or whatever), and the file
system is robust. So that part is fine. I just need to externalize the

I'm wondering if just using cereal or so would be sufficient (there is a
Serialize instance, of course), or whether I should be using some
acid-state thing, or a Haskell binding to gdbm,  or sqlite, or...

Any suggestions?


More information about the Haskell-Cafe mailing list