Server application
Summary
Server application provides a key-value datastore service based on gRPC. You can find the service definition in here.
Usage
The server application supports the following flags,
--port
: the port number the server will listen,--root
: the document root path to store uploaded shares,--no-compress
: if set, all shares will be stored without compression.
If those flags are omitted, default values are used. Thus, you can start a server by just run kvs-server
.
Docker support
A docker image to run the server, itslabq/simple-kvs
, is also available.
Containers based on this image expose port 13009 and store uploaded shares into /data
. The following command runs a container with mapping local port 13009 and $(pwd)/data
to the container’s port 13009 and /data
:
$ docker run -it -p 13009:13009 -v $(pwd)/data:/data itslabq/simple-kvs
Installation
Compiled binaries of the server application kvs-server
are available on Github. To use these binaries, after downloading a binary to your environment, decompress and put it in a directory included in your $PATH.
You can also compile by yourself. First, you need to download the code base:
$ git clone https://github.com/itslab-kyushu/simple-kvs $GOPATH/src/itslab-kyushu/simple-kvs
Then, build server command kvs-server
:
$ cd $GOPATH/src/itslab-kyushu/simple-kvs/server
$ go get -d -t -v .
$ go build -o kvs-server
To build it, Go > 1.7.4 is required.