Skip to content

rwas2505/DistributedKVStore

Repository files navigation

DistributedKVStore

This app supports both grpc (http2) and rest (http1) services.

Run the app

In order to start both services quickly with docker run the below from the root directory to tear down any stale resources and then build and run the services fresh

docker compose down --rmi all
docker compose up -d

To start either service on its own with dotnet, run one of the below from the root directory

dotnet run --project .\src\KeyValueStore.Grpc
dotnet run --project .\src\KeyValueStore.Rest

Call the services

REST
PUT
PUT method http://localhost:5000/store/testKey
body:
{
    "value": "someValue2"
}
GET
http://localhost:5000/store/testKey
DELETE
DELETE method http://localhost:5000/store/testKey
GRPC

(below grpcurl commands executed in gitbash)

PUT
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key", "value":"some value"}' localhost:5001 Store.Put
GET
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key"}' localhost:5001 Store.Get
DELETE
grpcurl --insecure --proto ./src/KeyValueStore.Grpc/Protos/Store.proto -d '{"key":"some key"}' localhost:5001 Store.Delete

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published