Microservices are increasingly used in modern applications, leading to a growing need for effective service composition solutions. However, we argue that traditional API-centric composition mechanisms (e.g., RPC, REST, and Pub/Sub) hamper the modularity of microservices. These mechanisms introduce rigid code-level coupling, scatter composition logic, and hinder visibility into cross-service data exchanges. Ultimately, these limitations complicate the maintenance and evolution of microservice-based applications. In response, we propose a rethinking of service composition and present Knactor, a new data-centric composition framework to restore the modularity that microservices were intended to offer. Knactor decouples service composition from service development, allowing composition to be implemented as explicit data exchanges among multiple services. Our initial case study suggests that Knactor simplifies service composition and creates new opportunities for optimizations.
翻译:微服务在现代应用中日益普及,这导致对高效服务组合解决方案的需求不断增长。然而,我们认为传统的以API为中心的组合机制(例如RPC、REST和Pub/Sub)阻碍了微服务的模块化。这些机制引入了僵化的代码级耦合、分散了组合逻辑、并阻碍了对跨服务数据交换的可见性。最终,这些局限性使得基于微服务的应用程序的维护和演进变得复杂。作为回应,我们提出对服务组合进行重新思考,并提出了Knactor——一种新的以数据为中心的组合框架,旨在恢复微服务本应提供的模块化能力。Knactor将服务组合与服务开发解耦,使得组合能够被实现为多个服务之间的显式数据交换。我们的初步案例研究表明,Knactor简化了服务组合,并为优化创造了新的机会。