Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can RocksDB handle multiple read-only clients? [closed]

I need a key-value database, like redis or memcached, but not in memory and rather on disk. After filling the database (which we do regularly and from scratch), I'd actually only need the get operation, but from many different processes (so Kyoto Cabinet and LevelDB do not work for me).

I need like 5 million keys and ~10-30gb of data, so some other simple databases don't work as well.

I can't find any information on whether RocksDB can handle multiple read-only clients; it's not straight-forward to build on my OS so I wanted to ask before doing that. If it can't, is there any database which would work? Preferably with an Ubuntu package and Python bindings ;-).

We're just using many-many small files now, but it really sucks, as we want easy backups, copying, etc. I also suspect this may cause slowdowns, but it doesn't really matter that much.

like image 765
Valentin Golev Avatar asked Nov 25 '25 15:11

Valentin Golev


2 Answers

Yes, you should be able to run multiple read-only clients on a single RocksDB database. Just open the database with DB::OpenForReadOnly() call: https://github.com/facebook/rocksdb/blob/master/include/rocksdb/db.h#L108

like image 100
Igor Canadi Avatar answered Nov 27 '25 03:11

Igor Canadi


The simplest answer is probably Berkeley DB, and bindings are a part of the stdlib: https://docs.python.org/2/library/anydbm.html

like image 29
Alex Gaynor Avatar answered Nov 27 '25 05:11

Alex Gaynor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!