Cloud Native programming with Golang
上QQ阅读APP看书,第一时间看更新

So, what are microservices?

Simply put, microservices is the idea that instead of putting all of your code in one basket (monolithic application), you write multiple small software services or microservices. Each service is expected to focus on one task and perform it well. The accumulation of those services will make up your application.

Microservices application

For the MyEvents application, each software layer from the monolithic application will translate into a software service. This will then communicate together to form our application. Each one of those software services will be, in effect, a microservice.

Since those services collaborate to build a complex application, they need to be able to communicate via protocols that they all understand. Microservices that use web Restful APIs for communication make use of the HTTP protocol extensively. We'll cover Restful APIs in more detail in this chapter.