Skip to content

Github mirror of "mediawiki/services/kask" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

License

Notifications You must be signed in to change notification settings

wikimedia/mediawiki-services-kask

Repository files navigation

kask

Kask is a (multi-master) replicated key-value storage service.

Building

Kask's dependencies target packages shipped in Debian Stretch; To build and execute on a Debian machine:

$ apt install \
      golang-github-gocql-gocql-dev \
      golang-gopkg-yaml.v2-dev \
      golang-github-prometheus-client-golang-dev \
      golang-golang-x-tools \
      golint \
      git
$ GOPATH=/usr/share/gocode make

Executing Tests

$ make unit-test
$ CONFIG=config.yaml.test make functional-test

Executing Tests and Benchmarks

$ make GOTEST_ARGS="-bench=. -benchmem" test

NOTE: config.yaml.test is excluded from version control and is recommended for local configuration.

Running

Create the Cassandra schema

$ cqlsh -f cassandra_schema.cql

Startup

$ ./kask --config <config file>

Using

$ curl -X POST -H 'Content-Type: application/octet-stream' \
       -d 'sample value' http://api.example.org/sessions/v1/test_key
HTTP/1.1 201 CREATED
Content-Type: application/octet-stream
Date: Tue, 11 Dec 2018 22:50:46 GMT
Content-Length: 0

$ curl http://api.example.org/sessions/v1/test_key
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Date: Tue, 11 Dec 2018 22:51:10 GMT
Content-Length: 3

sample value

See also

For more information about Kask, see the wiki page.

About

Github mirror of "mediawiki/services/kask" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

License

Code of conduct

Stars

Watchers

Forks