官术网_书友最值得收藏!

Chapter 1. What are Microservices?

Good projects need good solutions; this is why developers are always looking for better ways to do their jobs. There is no best solution for all projects because every single project has different needs and the architect (or the developer) has to find the best solution for that specific project.

Microservices are maybe a good approach to solve problems; in the last few years, companies such as Netflix, PayPal, eBay, Amazon, and Spotify have chosen to use microservices in their own development teams because they believed them to be the best solution for their projects. To understand why they chose microservices and understand the kinds of projects you should use them in, it is necessary to know what a microservice is.

Firstly, it is essential to understand what a monolithic application is, but basically, we can define a microservice as an extended Service Oriented Architecture. In other words, it is a way to develop an application by following the required steps to turn it into various little services. Each service will execute itself and communicate with others through requests, usually using APIs on HTTP.

To further understand what microservices are, we first need to understand what a monolithic application is. It is the typical application that we have been developing for the last few years, for example in PHP, using a framework like Symfony; in other words, all the applications we have been developing are pided into different parts, such as frontend, backend, and database, and also use the Model-View-Controller (MVC) pattern. It is important to differentiate between MVC and microservices. MVC is a design pattern and microservices are a way to develop an application; therefore, applications developed using MVC could still be monolithic applications. People may think that if we split our application into different machines and pide the business logic from the model and the view, the application is then based on microservices, but this is not correct.

However, using a monolithic architecture still has its advantages. There are also various huge web applications, such as Facebook, that use it; we just need to know when we need to use a monolithic architecture and when we need to use microservices.

主站蜘蛛池模板: 莆田市| 彰武县| 桂东县| 河源市| 日照市| 山阳县| 天气| 车致| 东安县| 客服| 会理县| 睢宁县| 乐山市| 屏东县| 河间市| 奇台县| 乌鲁木齐市| 来宾市| 常山县| 吴旗县| 汝州市| 永川市| 广昌县| 乡城县| 新和县| 玉田县| 道真| 黄梅县| 镇巴县| 武胜县| 都江堰市| 个旧市| 福鼎市| 泽普县| 华安县| 东莞市| 永和县| 泾源县| 庆安县| 宾阳县| 富平县|