- PHP Microservices
- Carlos Pérez Sánchez Pablo Solar Vilari?o
- 379字
- 2021-07-09 18:50:03
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.
- 一步一步學(xué)Spring Boot 2:微服務(wù)項(xiàng)目實(shí)戰(zhàn)
- Debian 7:System Administration Best Practices
- 編寫高質(zhì)量代碼:改善Python程序的91個(gè)建議
- 三維圖形化C++趣味編程
- Mastering OpenCV 4
- Java應(yīng)用開發(fā)技術(shù)實(shí)例教程
- Serverless架構(gòu)
- Hands-On Kubernetes on Windows
- 從零開始學(xué)Python大數(shù)據(jù)與量化交易
- Test-Driven iOS Development with Swift
- JavaWeb從入門到精通(視頻實(shí)戰(zhàn)版)
- Building Microservices with Go
- HTML5程序開發(fā)范例寶典
- jQuery Essentials
- 陪孩子像搭積木一樣學(xué)編程:Python真好玩+Scratch趣味編程(全2冊)