better handling of options
Options parsing is handled in the NIF by folding a proplists containing options and creating the different rocksdb objects:
-
rocksdb::DBOptions
for the database options -
rocksdb::BlockBasedTableOptions
for the table options -
rocksdb::ColumnFamilyOptions
for the column family options
Parsing this proplists imply the definition of new atoms and convert the erlang term to the formant wanted by rocksdb. This increases the times used for a nif call and add more complexity each time we want to add the support for a new option.
Recent rocksdb intruced the Option String and Option Map APIs: https://github.com/facebook/rocksdb/wiki/Option-String-and-Option-Map
but also a way to read the options from the stored file.
Proposal
instead of creating the options objects in the NIF we first create a string map that could be read by rocksdb directly with less effort.
Requirements
Expose cache and rate limiter pointers to allow us to pass them directly to rocksdb via string
TODO
-
create map of options from atom in Erlang SIDE -
... TBD