Skip to content

kriw/toy_kvs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toy kvs

Simple key value store for homework of Security-Camp2017.

Requirement

yara

See https://github.com/hillu/go-yara .

directIO

See https://github.com/ncw/directio

Usage

Server

./run.sh server [endpoint]
  • The default endpoint is /tmp/tmp.sock.

With output,

DEBUG=true ./run.sh server [endpoint]

Client

./run.sh client

Benchmark

./run.sh benchmark
client-num: 2, repeats: 5, elapsed: 17.904102ms

./run.sh benchmark -client-num=1 -repeats=3
client-num: 1, repeats: 3, elapsed: 8.942194ms

Example

$ echo "This is a test." > po.txt
$ ./run.sh client
> set po.txt
> key: 11586d2eb43b73e539caa3d158c883336c0e2c904b309c0c5ffe2c9b83d562a1
> OK
> get 11586d2eb43b73e539caa3d158c883336c0e2c904b309c0c5ffe2c9b83d562a1
> This is a test.

> save poyo
> OK
>
$ rm po.txt
$ ls | grep poyo
poyo*

About

Toy on memory kvs for learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published