Technology Radar
Published : Sep 27, 2023
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar.
Understand more
Sep 2023
Assess
尽管我们是微服务(microservices)的早期倡导者,并看到该模式在无数系统上取得了成功,但我们也看到微服务被误用和滥用,这通常是microservice-envy(microservice envy)导致的。与其从头开始构建一个由单独部署的进程组成的新系统,我们通常建议从一个精心设计的单体应用开始,并且仅当应用程序达到一定规模时,才将其分解为可单独部署的单元,此时微服务的好处才能超越分布式系统所固有的额外复杂性。最近,我们看到人们对这种方法重新产生了兴趣,以及对什么构成了精心分解的整体有了更详细的定义。Spring Modulith 是一个框架,它以一种使代码在适当时候更容易拆分成微服务的方式来组织代码。它提供了一种模块化代码的方法,使领域和限界上下文的逻辑概念与文件和包(package)结构的物理概念保持一致。这种对齐方式使得在必要时重构单体架构以及单独测试领域变得更加容易。Spring Modulith 提供了一种进程内事件机制,有助于进一步解耦单个应用程序中的模块。 最重要的是,它与 ArchUnit 和 jmolecules 集成,可以自动验证其领域驱动的设计规则。