I’m using a dict with struct key and struct value. Size of each key value pair is 0.5~3k bytes. The problem is that it can be accumulated to tens of millions of key-value pairs, which would cause OOM on my computer.
I use it as a cache, i.e. just add and query. I know disk based key-value store can do it. But the LevelDB and RocksDB libs of Julia were quite outdated. They don’t even pass Julia compiling.
Is there any other way I can try?
Here is a discussion of SQLite’s lsm1 extension. It perhaps can handle your use case. To manage everything with Julia, the SQLite.jl package is up-to-date, well maintained and quite efficient.
A similar approach using Rust (instead of Julia) is presented here.