fergiemcdowall / norch

A search server that can be installed with npm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rocksdb as backend?

yiwiz-sai opened this issue · comments

commented

Does norch have plan to use rocksdb as backend in the future?
rocksdb is based on leveldb, it did lots of modifications so that has better performance.
https://github.com/facebook/rocksdb/wiki/Performance-Benchmarks

It could certainly be done, you would make the change in search-index, by switching out levelup with level-rocksdb on this line

Would it be more elegant to optionally accept an instance of leveldb in constructor params ? (to take advantage of leveldb plugins)

Sorry, out of context here

It would be cool to be able to choose your backend by sending a parameter on startup.

This would be useful since some DBs are better than others in certain scenarios. (http://influxdb.com/blog/2014/06/20/leveldb_vs_rocksdb_vs_hyperleveldb_vs_lmdb_performance.html)

commented

oh, cool, yes, the ability to choose backend is very important, hope it could give param, so needn't change source.

You can choose the backend in the underlying search-indexlib, we just need to make that functionality available in Norch

This now works by initialising an instance of search-index with the levelup of your choice and then using that search-index to initialise norch. The documentation could definitely be improved, but it does work, at least insofar as leveldown switching works