Kv_store is a distributed key-value store that is partition-tolerant, available,
and causally consistent.
IP: 10.10.0.0
Port: 13800
To PUT, GET or DELETE a key from the system, send a request to the
endpoint.
http path: http://IP:Port/kv-store/keys/
supported methods: GET, PUT, DELETE
data: keyName, value (if PUT)
To get the total number of keys stored by a node, the shards it stores,
and the number of keys per shard, send a GET request to the endpoint.
http path: http://IP:Port/kv-store/key-count
supported methods: GET
http path: http://IP:Port/kv-store/shards
supported methods: GET
http path: http://IP:Port/kv-store/shards/
supported methods: GET
data: shard ID
A view change adds or removes storage nodes from the system. This is
done by providing a view or list of ip:port pairs that represent nodes.
http path: http://IP:Port/kv-store/view-change
supported methods: PUT
data: new view
curl --request PUT
--header "Content-Type: application/json"
--write-out "\n%{http_code}\n"
--data '{"value": "sampleValue"}'
http://10.10.0.0:13800/kv-store/keys/sampleKey
curl --request GET
--header 'Content-Type: application/json'
--write-out '%{http_code}\n'
http://10.10.0.0:13800/kv-store/keys/
curl --request DELETE
--header 'Content-Type: application/json'
--write-out '%{http_code}\n'
http://10.10.0.0:13800/kv-store/keys/
curl --request GET
--header 'Content-Type: application/json'
--write-out '%{http_code}\n'
http://10.10.0.0:13800/kv-store/key-count
curl --request PUT
--header "Content-Type: application/json"
--data '{"view":"10.10.0.2:13800,10.10.0.3:13800,10.10.0.4:13800"}'
--write-out "%{http_code}\n"
http://10.10.0.0:13800/kv-store/view-change