speedb-io / speedb

A RocksDB compliant high performance scalable embedded key-value store
https://www.speedb.io/
Apache License 2.0
908 stars 71 forks source link

Mechanism for saving and reading Options in other string formats (like JSON or XML) #379

Open mrambacher opened 1 year ago

mrambacher commented 1 year ago

Currently, Options are stored in a file in something similar to a Properties file format, where there is a label and the name=value pairs on separate lines. Sets of options can also be passed to the ConfigureFromString method (";" separated name-value pairs) and converted to strings (delimiter separated name-value pairs).

This issue requests that we support other formats, such as JSON or XML. These other formats may be more widely known and could be easier to generate from or consumed by external tools.

For the Configure piece, this is mostly writing a different implementation of StringToMap. There is likely another method needed on the Serialize side (to store values in a map that can be converted to a string, rather than as a string directly).

Note that RocksDB users such as topling db have something similar, but it is more of an "add-on" rather than "integrated" functionality.

Guyme commented 11 months ago

@mrambacher - is this connected to a specific PR ? Please consolidate or add a PR

mrambacher commented 11 months ago

@Guyme There is no ability at this point to write an options file to JSON or XML format. The code to support writing Options to different formats is part of #692 and #719, but there is no work currently to support XML or JSON and the format of the Options file is not changed.

udi-speedb commented 11 months ago

@mrambacher - Is this pr required for #430 ?

mrambacher commented 11 months ago

N

@mrambacher - Is this pr required for #430 ?

No, #719 is required for #430, but other formats like JSON and XML are not required. And there is the possibility that #719 is not in itself adequate to address this issue (though it is a good start).