In this chapter, we started with the definition of microservices. The main difference between a monolith application and a microservice is the way tightly coupled architecture is broken into loosely coupled architecture. Microservices talk to each other using either REST-based JSON or RPC-based protocol buffers. Using microservices, we can break business logic into multiple chunks. Each service does one job pretty well. This approach comes with a disadvantage. Monitoring and managing microservices is painful. Go provides a wonderful toolkit called Go Kit. It is a microservices framework using which we can generate boilerplate code for microservices.
We need to define a few things in Go Kit. We need to create implementations, endpoints, and models for a Go-Kit service. Endpoints take requests and return responses. Implementations have the actual business logic of services...