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

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.

主站蜘蛛池模板: 清水河县| 长宁县| 佛山市| 海阳市| 新宾| 渝北区| 项城市| 安阳县| 黔江区| 康定县| 襄城县| 岱山县| 濉溪县| 红桥区| 衡阳市| 普兰县| 青海省| 米脂县| 黑水县| 莆田市| 辛集市| 滨州市| 银川市| 秭归县| 廉江市| 富宁县| 阿瓦提县| 花垣县| 威远县| 蓬溪县| 阿勒泰市| 沛县| 白沙| 固阳县| 宣城市| 绍兴县| 霍山县| 洞口县| 常州市| 罗山县| 青阳县|