I have a large map that won't fit in memory and I thus want it to live on the disk. I have the following options:
- Use a pure Java library like MapDB: This works but I don't get Scala
collections sugar like
getOrElseUpdate
and++=
and theapply
/update
methods. I could create my own wrapper class aroundMapDB
in Scala but I really don't want to manually implement all theMap
traits. - Use something like redis/memcached: I could not find a good scala library that gave me the
Map
traits for redis or memcached. This may be the better performance solution but it introduces a complexity of running a db
So is there any nice scala only library that implements the Scala collection sugars for maps and yet it falls back on disk and/or a key-value store for large maps?