Skip to content

arindam-b/grpc-java-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRPC Server:

Create a project with maven dependency

add proto file

run maven to generate class

Then run the server

GRPC Client:

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 Bloomrpc client to test grpc:

  1. Install choco in powershell

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

  1. Install yarn

choco install yarn

  1. https://github.com/uw-labs/bloomrpc

git clone https://github.com/uw-labs/bloomrpc.git
cd bloomrpc
npm install

  1. Run following command from bloomrpc folder in two different command window:

npm run start-server-dev
npm run start-main-dev

Kubernetes Deployment

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:

GRPC Communication

Releases

No releases published

Packages

No packages published