基于领域驱动设计和C4分层架构模型的微服务软件建模  被引量:19

Microservice Software Modeling Based on Domain Driven Design and C4 Layered Architecture Model

在线阅读下载全文

作  者:张国生[1] ZHANG Guo-sheng(Yunnan University,Kunming 650500,China)

机构地区:[1]云南大学,云南昆明650500

出  处:《中国电子科学研究院学报》2021年第2期119-126,共8页Journal of China Academy of Electronics and Information Technology

基  金:国家自然科学基金项目(61379032)。

摘  要:微服务是去中心、独立、自治、跨语言的小型软件实体,微服务架构将软件系统构建为通信互联、高内聚、松耦合的自主服务集合。领域驱动设计提供了微服务划分的关键理念以及真实世界的表示方法,用子域和限界上下文表示组织结构及其专注的核心领域。C4模型用一系列分层的图清晰建模不同缩放级别的软件架构,是领域专家思维和软件设计的抽象。提出用领域驱动设计方法构建领域模型,根据组织业务和限界上下文,将软件系统划分为微服务,每个微服务专注一个业务功能,遵循单一职责原则,独立开发、测试、部署、运行和维护。每个微服务包含独立的数据库,实现微服务之间的强隔离。用通用语言C4模型建模微服务及其架构,将领域知识传递给所有团队成员,使其对软件系统的理解保持一致,提高团队开发效率,确保软件质量、弹性、可用性和伸缩性。基于微服务、微服务架构、领域驱动设计、C4分层架构模型和服务网格建模应用实例零售电子商务系统。Microservices are decentralized,independent,self-governing and cross language small software entities. The software system is constructed as a set of autonomous services with communication interconnection,high cohesion and loose coupling based on microservice architecture. Domain driven design provides the key concept of microservice partitioning and the representation of real world. It uses subdomain and bounded context to represent the organization structure and its core domain. C4 model uses a series of hierarchical diagrams to clearly model the software architecture of different scaling levels,which is the abstraction of domain experts thinking and software design. The domain driven design method is proposed to construct the domain model. According to the organizational business and bounded context,the software system is partitioned into microservices. Each microservice focuses on a business function,follows the principle of single responsibility,and is developed,tested,deployed,run and maintained independently. Each microservice contains an independent database to achieve strong isolation between microservices. The ubiquitous language C4 model is used to model the microservice and its architecture. The domain knowledge is transferred to all team members so that their understanding of the software system is consistent. The team development efficiency is improved,and the software quality,elasticity,usability and scalability are ensured. A real case retail e-commerce system is modeled based on microservices,microservice architecture,domain driven design,C4 layered architecture model and service mesh.

关 键 词:微服务 微服务架构 领域驱动设计 C4分层架构模型 微服务划分 服务网格 限界上下文 通用语言 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象