Closed cisaacson closed 3 years ago
level-rocksdb
will soon be updated too (https://github.com/Level/community/issues/98) and is recommended over direct use of rocksdb
:
It is strongly recommended that you use [the]
levelup
[interface] in preference torocksdb
unless you have measurable performance reasons to do so.levelup
is optimized for usability and safety. Although we are working to improve the safety of therocksdb
interface it is still easy to crash your Node process if you don't do things in just the right way.
Thanks @vweevers for the quick response, we will wait until level-rocksdb
is upgraded.
@vweevers What's the benefit of using level-rocksdb
over levelup
+ rocksdb
(aside from convenience)?
I see in the text you quoted that levelup
is recommended over using rocksdb
directly, but I don't see that the level-rocksdb
wrapper itself is recommended. I also see that the npm package hasn't been updated in two years, which makes it seem like it may be (or maybe should be) deprecated.
What's the benefit of using
level-rocksdb
overlevelup
+rocksdb
(aside from convenience)?
It also includes encoding-down
. Other than that, yes, it's just convenience.
I see in the text you quoted that
levelup
is recommended over usingrocksdb
directly, but I don't see that thelevel-rocksdb
wrapper itself is recommended.
We could improve those docs somewhat; it should say that using level-rocksdb
is recommended over using rocksdb
directly, because the level-rocksdb
package wraps it in a safer levelup
interface.
I also see that the npm package hasn't been updated in two years
I just released level-rocksdb
5.0.0.
@vweevers Congratulations on getting the new release out, I know it was a huge effort.
Got it, thanks for clarifying all that!
We are using level-rocksdb 4.0.0, it uses a very old version of rocksdb. Looks like this npm package (rocksdb) is meant to replace it and uses the latest version of rocksdb. Any reason we should not switch to the
rocksdb
package?