- PHP Microservices
- Carlos Pérez Sánchez Pablo Solar Vilari?o
- 320字
- 2021-07-09 18:50:04
Design and architecture to build the basic platform for microservices
Creating an application based on microservices is not like a monolithic application. For this reason, we have to pide our functionalities into different services. To do this, it is important to follow an adequate design and structure each of the microservices according to its requirements.
The design takes care of piding the application into logical parts and groups them according to their existing relationship. The architecture takes care of defining which concrete elements support each of the microservices, for example, where the data is stored or the communication between the services.
Throughout the book, we will follow the given structure for each microservice. In the following image, you will see the structure of one of the microservices, the rest of them are similar; however, some parts are optional:

All the requests for our microservices come from a REVERSE PROXY as this allows us to balance the load. Also, we use NGINX as a gateway for the API built in PHP. To reduce the load and increase the performance of PHP and NGINX, we can use a CACHE layer.
In case we need to execute big, resource consuming tasks, or the tasks do not need to be executed in a concrete time window, our API can use a QUEUE system.
In case we need to store some data, our API is responsible for managing the access and saving the data in our DATA STORE.
Note
In this book, we will be using containerization, a new virtualization method which spins ups containers instead of full virtual machines. Each container will have only the minimum resources and software installed to run your application.
We can use Telemetry (it is a system that gets the stats from the container) and autodiscovery (it is a system that helps us to see which containers are working properly) to supervise the container ecosystem.
- 程序員修煉之道:程序設計入門30講
- jQuery EasyUI網站開發實戰
- Magento 2 Theme Design(Second Edition)
- Data Analysis with IBM SPSS Statistics
- Building Cross-Platform Desktop Applications with Electron
- OpenShift在企業中的實踐:PaaS DevOps微服務(第2版)
- PostgreSQL Replication(Second Edition)
- PHP 7從零基礎到項目實戰
- GitHub入門與實踐
- 算法秘籍
- Python應用與實戰
- 征服C指針(第2版)
- Visual FoxPro程序設計實驗教程
- 高性能MVVM框架的設計與實現:San
- Java面向對象程序設計(第3版)