ZN-KVS is a RocksDB replacement with optimized tail latency, throughput etc.
More detail of architecture desgin is here.
Compile project to static library, which can be integrated into yourown project.
Advanced options of compilation is here.
# Add some dependencies
sudo apt install libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libgflags-dev git
sudo apt install build-essential autoconf gcc g++ ccache libncurses5-dev byacc cmake
# Create build directory
mkdir build
cd build
# Build with default
cmake ..
make -j4
ZN-KVS inherites exported interface from Rocsdb. So you can use ZN-KVS just like Rocksdb, except that adding one line code "options.pureMemTable = true".
Example code of Usage:
int main() {
Options options = Options();
options.env = Env::Default();
options.pureMemTable = true;
rocksdb::DB* db2 = nullptr;
rocksdb::Status s = DB::Open(options, dbname_+"/db_test", &db2);
WriteOptions writeOptions = WriteOptions();
ASSERT_OK(db2->Put(writeOptions,"542", "v2"));
ASSERT_OK(db2->Put(writeOptions,"444", "v1"));
ASSERT_OK(db2->Put(writeOptions,"ps", "v3"));
ASSERT_OK(db2->Put(writeOptions,"ps", "v4"));
ASSERT_EQ("v1", OpenGet(db2,"444"));
ASSERT_EQ("v2", OpenGet(db2,"542"));
ASSERT_EQ("v4", OpenGet(db2,"ps"));
db2->Close();
delete db2;
}
std::string OpenGet(DB* db,const std::string& k) {
ReadOptions options;
std::string result;
Status s = db->Get(options, k, &result);
if (s.IsNotFound()) {
result = "NOT_FOUND";
} else if (!s.ok()) {
result = s.ToString();
}
return result;
}
with only 1G data test, ZN-KVS can has At list 100% search performance improvement than Rocksdb.
Please let us know if you are using ZN-KVS, thanks!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.