Create a project with maven dependency
add proto file
run maven to generate class
Then run the server
Create a maven project with dependency
Take the proto file
In main method of the client class, use cloudGrpc (Grpc) to get stub. Look for stub in the implemented class, what kind of stub it is. Here is blocingstub.
and run the client.
Please refer screen shot to understand the workflow.
- Install choco in powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Install yarn
choco install yarn
git clone https://github.com/uw-labs/bloomrpc.git
cd bloomrpc
npm install
- Run following command from bloomrpc folder in two different command window:
npm run start-server-dev
npm run start-main-dev
docker build -t grpc-service:v1 grpc-project/
docker build -t grpc-client:v1 grpc-client/
kubectl apply -f grpc_server.yaml kubectl apply -f grpc_client.yaml
Logs: