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

Decomposing by business capability

In the early stages of product development, monoliths are the best suited to delivering features to users as quickly and simply as possible. This is appropriate, as at this point in a products development you do not have luxury problems of having to scale your teams, code bases or ability to serve customer traffic. Following good design practices, you separate your applications concerns into easy-to-read, modular code patterns. Doing so allows engineers to work on different sections of the code autonomously and limits the possibility of having to untangle complicated merge conflicts when it comes time to merge your branch into the master and deploy your code. 

Microservices require you to go a step further than the good design practices you've already been following in your monolith. To organize your small, autonomous teams around microservices, you should consider first identifying the core business capabilities that your application provides. Business capability is a business school term that describes the various ways your organization produces value. For example, your internal order management is responsible for processing customer orders. If you have a social application that allows users to submit user-generated content such as photos, your photo upload system provides a business capability. 

When thinking about system design, business capabilities are closely related to the Single Responsibility Principle (SRP) from object-oriented design (OOD). Microservices are essentially SRP extended to code bases. Thinking about this will help you design appropriately sized microservices. Services should have one primary job and they should do it well. This could be storing and serving images, delivering messages, or creating and authenticating user accounts.

主站蜘蛛池模板: 田林县| 诏安县| 日喀则市| 阜宁县| 梅河口市| 南投县| 天峨县| 乐平市| 通海县| 信阳市| 临西县| 德阳市| 高陵县| 丰镇市| 筠连县| 平度市| 海丰县| 扎鲁特旗| 桃江县| 越西县| 西乌珠穆沁旗| 武邑县| 鸡西市| 老河口市| 大荔县| 吴忠市| 枞阳县| 璧山县| 合阳县| 泾川县| 乌鲁木齐县| 黄大仙区| 西乌珠穆沁旗| 静安区| 廊坊市| 海安县| 樟树市| 营口市| 获嘉县| 全南县| 牡丹江市|