- Microservice Patterns and Best Practices
- Vinicius Feitosa Pacheco
- 184字
- 2021-06-30 19:02:49
Endpoints for web applications
As we have already seen with the published interfaces, it is now important to define the content of these endpoints and their size.
An important topic that is not always addressed is the componentization of the endpoints that are exposed. Think about a microservice responsible for user information. Some development teams decided to create a large endpoint that provides all possible information stored about a user. This type of endpoint, one getUser type, may seem simple for development, but not for scalability.
A great deal of useless information for those who consume the API may be being passed, or is heavily specific information to transmit and expensive to be generated by the microservice. Thinking practically, the most sensible approach is to create an information API more fragmented and diverse, and if a getUser is necessary, create an orchestrator of the smaller information and pass on a single endpoint. The following diagram is a good example of this:

This type of strategy is called endpoint builder, where the heavy point of information actually is compositions of other lighter data sources.
- 通信網(wǎng)絡(luò)基礎(chǔ)與設(shè)備
- 電子政務(wù)效益的經(jīng)濟(jì)分析與評價
- 社交電商運(yùn)營策略、技巧與實(shí)操
- PLC、現(xiàn)場總線及工業(yè)網(wǎng)絡(luò)實(shí)用技術(shù)速成
- 計(jì)算機(jī)網(wǎng)絡(luò)工程實(shí)用教程(第2版)
- 語音信號處理及Blackfin DSP實(shí)現(xiàn)
- 一本書讀懂TCP/IP
- 圖解物聯(lián)網(wǎng)
- 新媒體交互藝術(shù)
- 移動互聯(lián)網(wǎng)環(huán)境下的核心網(wǎng)剖析及演進(jìn)
- 物聯(lián)網(wǎng)商業(yè)設(shè)計(jì)與案例
- 網(wǎng)絡(luò)設(shè)備配置與調(diào)試項(xiàng)目實(shí)訓(xùn)
- 國外物聯(lián)網(wǎng)透視
- 移動應(yīng)用開發(fā)技術(shù)
- CTO說