Demo for microservice talk in Golab Florence 2019. This demo is focused on gRPC microservices.
The application is built with 3 microservices:
It exposes a REST API using grpc-gateway.
It also includes grpc middlewares to support metrics (via Prometheus) and tracing (via Zipkin).
Launching the docker-compose, it will launch Prometheus and Zipkin:
Execute the docker-compose:
docker-compose build && docker-compose up
With the tool grpcurl, it is possible to send a request to the compose
microservice exposed in port 4042.
grpcurl -plaintext -d '{"id": 1}' 127.0.0.1:4042 compose.proto.ComposeService/GetAuthor
The expected result is:
{
"id": "1",
"name": "Miguel de Cervantes",
"books": [
{
"id": "1",
"name": "Don Quixote"
},
{
"id": "2",
"name": "Rinconete and Cortadillo"
},
{
"id": "3",
"name": "Exemplary novels"
}
]
}
In order to test the REST API:
curl -v http://localhost:8080/authors/2