An Experimental distributed Key Value Store written in Go
- Add Pub Sub feature
- Protocol ? :D
- Support multiple datatype to store (now
Kece
only support simple string)
- Build binary from source
$ git clone https://github.com/wuriyanto48/kece.git
$ make build
$ kece --version
-
Run
kece
serverif
port flag
is not present,kece
will using9000
as the default port
$ kece -port 8000
)
( /( ( (
)\()) ))\ ( ))\
((_)\ /((_) )\ /((_)
| |(_)(_)) ((_)(_))
| / / / -_)/ _| / -_)
|_\_\ \___|\__| \___|
log -> kece server listen on port : 8000
- There are two type of data structure for store data,
HashMap
andBinary Tree
(default usingHashMap
). For choose data structure type, add flag-ds
.
$ kece -port 8000 -ds bt
$ kece -port 8000 -ds hashmap
-
Store simple data
you can use either
nc
ortelnet
as client
$ nc localhost 8000
$
$ SET 1 wuriyanto
$ +OK
$
$ SET *BJE* hello
$ +OK
$
$ GET 1
$ wurianto
$
$ GET *BJE*
$ hello
$
$ DEL 1
$ +OK
$
$ SET cache "this is cache value with lifetime 20 seconds" 20
$ +OK
-
Auth mechanism
if you want to use
Auth
on yourkece server
, simply add-auth your-server-password
when start your server
$ kece -port 8000 -auth my-secret
)
( /( ( (
)\()) ))\ ( ))\
((_)\ /((_) )\ /((_)
| |(_)(_)) ((_)(_))
| / / / -_)/ _| / -_)
|_\_\ \___|\__| \___|
log -> kece server listen on port : 8000
send auth to server
$ AUTH my-secret
$ +OK
$
-
Access KECE from code
follow this repository https://github.com/Bhinneka/kece-client-examples to see example how to access
kece
from specific language
Wuriyanto https://github.com/wuriyanto48
Before creating PR make sure your PR is passed. Use the linter first, then commit and push
$ make lint-prepare
$ make lint
$ make test