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

Bounded context/domain-driven design

As part of the application design, the business domain needs to be broken down into smaller subdomains or business capabilities. We need to carefully examine the business entities and their attributes to define service boundaries. For example, in the case of customer ID entity, the address of the customer might be integral to the customer. Within the context of the application, address maintenance might be a separate activity and might need to be handled separately. Similarly, customer preferences or shopping habits might be required for personalization. In this case, the personalization engine is more interested in this set of attributes.

Should we be slapping together one big customer service having all kind of attributes or can it be divided based on the perspectives derived from the business? These different perspectives are what led to the definition of bounded context as part of the domain-driven design.

The bounded context is a domain-driven design paradigm that helps to add a seam and create service groups. Bounded contexts work in solution-space to indicate that the services are related and belong to a common functional domain. It is built by one team that works with one business unit as per Inverse Conway's law. A bounded context may communicate with the other services/business capabilities through:

  • Exposing internal APIs or services
  • Emitting events on the Event Bus

A bounded context may have its own data store common to services or adopt a data store per service paradigm.

Each bounded context has a life of its own and forms a product. Teams are organized around these bounded contexts and they take the full responsibility of the full stack implementation of the services. The teams are cross-functional and bring skills from development, testing, user experience, database, deployment, and project management. Each product might be split into smaller sets of services that communicate asynchronously with each other. Remember, the focus is not on a set of functionalities but rather on business capability.

We start building our services around business capabilities. The service owns its business data and functionality. The service is the master of such data, and other services cannot own any of this service data.

主站蜘蛛池模板: 榆树市| 衡阳市| 广水市| 荔波县| 始兴县| 泾阳县| 吴旗县| 中西区| 青海省| 旬阳县| 楚雄市| 疏附县| 鄯善县| 思茅市| 东阿县| 樟树市| 搜索| 泸西县| 北海市| 绵竹市| 丰宁| 和龙市| 辽宁省| 遂溪县| 都安| 长丰县| 永泰县| 乐昌市| 宜昌市| 罗定市| 孙吴县| 邵武市| 漠河县| 宜州市| 资中县| 石狮市| 上杭县| 延长县| 方山县| 库尔勒市| 闽清县|