GithubHelp home page GithubHelp logo

hahahashen / pikiwidb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openatomfoundation/pikiwidb

0.0 0.0 0.0 1.48 MB

a high-performance, large-capacity, multi-tenant, data-persistent, strong data consistency based on raft, Redis-compatible elastic KV data storage system based on RocksDB

License: BSD 3-Clause "New" or "Revised" License

Shell 0.27% C++ 79.07% Python 2.26% C 0.48% Go 0.19% CMake 1.59% Tcl 16.15%

pikiwidb's Introduction

PikiwiDB

δΈ­ζ–‡

A C++20 implementation of Redis Server, use RocksDB for persist storage.(not including cluster yet)

Requirements

  • C++20
  • Linux or OS X or FreeBSD

compile

It is recommended to use the latest version of Ubuntu or Debian for Linux systems

Execute compilation

If the machine's GCC version is less than 11, especially on CentOS6 or CentOS7, you need to upgrade the gcc version firstly.

Execute the following commands on CentOS:

sudo yum -y install centos-release-scl
sudo yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++
scl enable devtoolset-11 bash

Execute this command to start compiling Pikiwidb:

./etc/script/build.sh 

Pikiwidb is compiled by default in release mode, which does not support debugging. If debugging is needed, compile in debug mode.

./etc/script/build.sh --clear
./etc/script/build.sh --debug

run

bin/pikiwidb etc/conf/pikiwidb.conf

Support module for write your own extensions

PikiwiDB supports module now, still in progress, much work to do. I added three commands(ldel, skeys, hgets) for demonstration.

Persistence: Not limited to memory

RocksDB can be configured as backend for PikiwiDB.

Fully compatible with redis

You can test PikiwiDB with redis-cli, redis-benchmark, or use redis as master with PikiwiDB as slave or conversely, it also can work with redis sentinel.

High Performance

  • PikiwiDB is approximately 20-25% faster than redis if run benchmark with pipeline requests(set -P = 50 or higher).
  • Average 80K requests per seconds for write, and 90K requests per seconds for read.
  • Before run test, please ensure that std::list::size() is O(1), obey the C++11 standards.

Run this command, compare with redis use pipeline commands, try it.

./redis-benchmark -q -n 1000000 -P 50 -c 50

Command List

show all supported commands list

  • cmdlist

key commands

  • type exists del expire pexpire expireat pexpireat ttl pttl persist move keys randomkey rename renamenx scan sort

server commands

  • select dbsize bgsave save lastsave flushdb flushall client debug shutdown bgrewriteaof ping echo info monitor auth

string commands

  • set get getrange setrange getset append bitcount bitop getbit setbit incr incrby incrbyfloat decr decrby mget mset msetnx setnx setex psetex strlen

list commands

  • lpush rpush lpushx rpushx lpop rpop lindex llen lset ltrim lrange linsert lrem rpoplpush blpop brpop brpoplpush

hash commands

  • hget hmget hgetall hset hsetnx hmset hlen hexists hkeys hvals hdel hincrby hincrbyfloat hscan hstrlen

set commands

  • sadd scard srem sismember smembers sdiff sdiffstore sinter sinterstore sunion sunionstore smove spop srandmember sscan

sorted set commands

  • zadd zcard zrank zrevrank zrem zincrby zscore zrange zrevrange zrangebyscore zrevrangebyscore zremrangebyrank zremrangebyscore zpopmin zpopmax zunionstore zinterstore

pubsub commands

  • subscribe unsubscribe publish psubscribe punsubscribe pubsub

multi commands

  • watch unwatch multi exec discard

replication commands

  • sync slaveof

Contact Us

pikiwidb's People

Contributors

lqxhub avatar dingxiaoshuai123 avatar longfar-ncy avatar panlei-coder avatar 578223592 avatar callme-taota avatar super-pan66 avatar hero-heng avatar luky116 avatar centurybbx avatar jettcc avatar happy-v587 avatar whr1118 avatar alexstocks avatar tangruilin avatar baerwang avatar mixficsol avatar hahahashen avatar loveyacper avatar iam-wenyi avatar polaris3003 avatar tedli avatar haiyang426 avatar clearocean621 avatar zztaki avatar ruipu-chang avatar chanfun-ren avatar mirthfullee avatar olivia110120 avatar qlqlqiqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.