arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.01159cs.SEcs.DC
收藏

面向业务逻辑丰富的微服务系统的领域驱动设计模拟器

A Domain-Driven Design Simulator for Business Logic-Rich Microservice Systems

INESC-ID, Instituto Superior Técnico, University of Lisbon(葡萄牙里斯本大学高等理工学院)

Daniel da Palma Pereira, António Rito Silva

AI总结:

本文提出一种领域驱动设计微服务模拟器,通过隔离核心业务逻辑与通信基础设施,支持多种事务模型和部署拓扑,验证了在不同一致性保障和网络约束下微服务系统的性能与容错性。

摘要:

开发业务逻辑丰富的微服务需要在数据一致性和分布式协调之间做出复杂权衡。尽管Sagas和事务因果一致性(TCC)等模式提供了管理分布式状态的机制,但其行为在生产前验证具有挑战性。当前的架构模拟器更关注网络指标而非领域语义,而行业框架要求全规模基础设施部署,阻碍了早期架构实验。为弥合这一差距,我们引入了一种领域驱动设计(DDD)微服务模拟器,通过围绕聚合建模微服务系统,允许开发者在不同一致性保障和网络约束下评估相同应用代码。该模拟器支持多种事务模型(Sagas、TCC)并支持从集中执行到完全分布式环境的无缝过渡。通过实现并严格测试复杂多聚合微服务系统,我们验证了模拟器的性能、协调开销和容错性。结果证实,该模拟器在减少开发人员努力的同时,提供了一个强大且确定性的环境,用于微服务架构中业务逻辑实现的左移验证和优化。

英文摘要:

Developing business-logic-rich microservices requires navigating complex trade-offs between data consistency and distributed coordination. Although patterns like Sagas and Transactional Causal Consistency (TCC) provide mechanisms to manage distributed state, validating their behavior before production is challenging. Current architectural simulators prioritize network metrics over domain semantics, whereas industry frameworks demand full-scale infrastructure deployments, preventing early architectural experimentation. To bridge this gap, we introduce a \textit{Domain-Driven Design} (DDD) microservice simulator that isolates core business logic from communication and transactional infrastructure. By modeling microservice systems around aggregates, the simulator allows developers to evaluate identical application code under varying consistency guarantees and network constraints. It features support for multiple transactional models (Sagas, TCC) and seamless transitions across diverse deployment topologies, ranging from centralized execution to fully distributed environments. We validate the simulator through the implementation and rigorous concurrency testing of a complex, multi-aggregate microservice system. Through empirical benchmarks, we quantify the performance, coordination overhead, and resilience of different transactional models across localized and distributed execution environments. The findings confirm that the simulator minimizes developer effort while providing a powerful, deterministic environment for the shift-left validation and optimization of business logic implementation in microservice architectures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑