A Client-Server gRPC Microservice with Java(spring-boot)
Unary RPC
: the client sends a single request and receives a single response.Server streaming RPC
: the client sends a single request; in return, the server sends a stream of messages.Client streaming RPC
: the client sends a stream of messages, and the server responds with a single message.Bidirectional streaming RPC
: in bidirectional streaming, both the client and server send a stream of messages.
~/proto$ mvn install
~/grpc-client$ mvn install
~/grpc-server$ mvn install
This will generate proto buff client binding for java
~/proto$ mvn comiple
https://github.com/grpc/grpc-java
~/grpc-client$ mvn spring-boot:run
~/grpc-server$ mvn spring-boot:run
http://localhost:8080/author/{id}
http://localhost:8080/books/{authorId}
http://localhost:8080/books/expensive/book
http://localhost:8080/books/author-gender/{authorGender}