cloudstate
cloudstate copied to clipboard
Implement a way to run the proxy and test against it
Splitting out an implementation task from #150, which is about documentation.
Currently, there's no simple way to run the proxy locally, which means there's no way to run a stateful service locally and talk to it using its gRPC interface.
Of course, you can run minikube or something like that locally, but for development, you may want to run your function with a debugger, for example, so you want to run it on your host machine, not in a container.
-- @jroper
Personally I've been using Docker to test local services. The following commands in separate terminals brings up the shopping cart.
docker run -it --rm --network mynetwork --name cloudstate -p 9000:9000 cloudstateio/cloudstate-proxy-dev-mode -Dcloudstate.proxy.user-function-port=8080 -Dcloudstate.proxy.user-function-interface=shopping-cart
docker run -it --rm --name shopping-cart --network mynetwork justinhj/shopping-cart
I then used Gatling with a grpc plugin to do load and integration testing, but this could easily use akka grpc instead. I also used grpcurl to manually test streaming functions since Gatling's grpc support does not support that yet.