Git Product home page Git Product logo

rekkles's Introduction

rekkles

Build Status NoSQL Go Report Card License

rekkles is a high performance no-sql database build on BadgerDB with redis protocol support. It meant to provide a key-value store alternative to redis.

  • Pure golang implementation, no c/c++ dependency
  • Compatible with redis protocol, Redis client are supported
  • Persistent all data to the disk
  • Better transaction support, ttl support

Install

go get github.com/gushitong/rekkles
  • rekkles server start options:
rekkles -h
Usage of rekkles:
  -a string
    	auth string
  -b string
    	listen address (default ":6380")
  -d string
    	working dir (default "/tmp/rekkles")
  -v string
    	value log dir (default "/tmp/rekkles")
  -s bool	
        sync all writes to disk. Setting this to false would achieve better performance, but may cause data to be lost. (default true)

Example

  • start rekkles server:
$ rekkles -d /tmp/araydb -v /tmp/araydb -b :6380
2018/09/29 12:05:53 started server at :6380    
  • connect rekkles with redis-cli:
$ redis-cli -p 6380
127.0.0.1:6380> SET k 1
OK
127.0.0.1:6380> GET k
"1"
127.0.0.1:6380> HSET hash k v
(integer) 1
127.0.0.1:6380> HGET hash k
"v"
127.0.0.1:6380> PING
PONG

Redis Command Support

Strings Lists Hashes Sets Sorted Sets
append lindex hdel sadd zadd
decr llen hexists scard zcard
decrby lpop hget sismember zcount
get lpush hgetall smembers zincrby
getbit lpushx hincrby spop zpopmax
getrange lrange hincrbyfloat zpopmin
getset lset hkeys zrange
incr hlen zrangebyscore
incrby hmget zrank
incrbyfloat hmset zrevrange
mget hscan zrevrangebyscore
mset hset zrevrank
msetnx hsetnx zscore
set hstrlen
setbit hvals
setex
setnx
setrange
strlen

Benchmark

This benchmark running on my local mac, rekkles should have better performance on SSD.

  • redis:
$ redis-benchmark -p 6379 -c 50 -n 10000 -q 
PING_INLINE: 56497.18 requests per second
PING_BULK: 56818.18 requests per second
SET: 58823.53 requests per second
GET: 57142.86 requests per second
INCR: 59171.60 requests per second
LPUSH: 59523.81 requests per second
RPUSH: 57142.86 requests per second
LPOP: 59880.24 requests per second
RPOP: 52631.58 requests per second
SADD: 61728.39 requests per second
SPOP: 56497.18 requests per second
LPUSH (needed to benchmark LRANGE): 59880.24 requests per second
LRANGE_100 (first 100 elements): 19047.62 requests per second
LRANGE_300 (first 300 elements): 9074.41 requests per second
LRANGE_500 (first 450 elements): 6501.95 requests per second
LRANGE_600 (first 600 elements): 4933.40 requests per second
MSET (10 keys): 45871.56 requests per second
  • rekkles:
$ redis-benchmark -p 6380 -c 50 -n 10000 -q 
PING_INLINE: 45662.10 requests per second
PING_BULK: 48543.69 requests per second
SET: 26881.72 requests per second
GET: 32051.28 requests per second
INCR: 30769.23 requests per second
LPUSH: 24937.66 requests per second
RPUSH: 38461.54 requests per second
LPOP: 24691.36 requests per second
RPOP: 39215.69 requests per second
SADD: 36496.35 requests per second
SPOP: 30120.48 requests per second
LPUSH (needed to benchmark LRANGE): 26954.18 requests per second
LRANGE_100 (first 100 elements): 8960.57 requests per second
LRANGE_300 (first 300 elements): 8045.05 requests per second
LRANGE_500 (first 450 elements): 8312.55 requests per second
LRANGE_600 (first 600 elements): 9049.77 requests per second
MSET (10 keys): 33670.04 requests per second

rekkles's People

Contributors

gushitong avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rekkles's Issues

install failed via `go get`

os: ubuntu 21.04
arch: x86_64
goversion: go version go1.16.2 linux/amd64

log:

oem@pc:~$ go get github.com/gushitong/rekkles                                                                                          
go: downloading github.com/gushitong/rekkles v0.0.0-20181102035910-f22ec09f5f24                                                        
go: downloading github.com/dgraph-io/badger v1.6.2                                                                                     
go: downloading github.com/pkg/errors v0.9.1                                                                                           
go: downloading github.com/tidwall/redcon v1.4.1                                                                                       
go: downloading github.com/tidwall/btree v0.4.2                                                                                        
go: downloading github.com/tidwall/match v1.0.3                                                                                        
go: downloading github.com/dgraph-io/ristretto v0.0.2                                                                                  
go: downloading github.com/dustin/go-humanize v1.0.0                                                                                   
go: downloading github.com/golang/protobuf v1.3.1                                                                                      
go: downloading golang.org/x/net v0.0.0-20190620200207-3b0461eec859                                                                    
go: downloading golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb                                                                    
go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96                                                     
go: downloading github.com/cespare/xxhash v1.1.0                                                                                       
# github.com/gushitong/rekkles/engine                                                                                                  
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:113:14: t.Txn.SetWithTTL undefined (type *b
adger.Txn has no field or method SetWithTTL)                                                                                           
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:140:6: opts.Dir undefined (type func(string
) badger.Options has no field or method Dir)                                                                                           
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:141:6: opts.ValueDir undefined (type func(s
tring) badger.Options has no field or method ValueDir)                                                                                 
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:142:6: opts.SyncWrites undefined (type func
(string) badger.Options has no field or method SyncWrites)                                                                             
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:143:25: cannot use opts (type func(string) 
badger.Options) as type badger.Options in argument to badger.Open                                                                      
go/pkg/mod/github.com/gushitong/[email protected]/engine/badger.go:147:24: cannot use opts (type func(string) 
badger.Options) as type badger.Options in field value 

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.