Event-driven microservice architecture (EDMA) has emerged as a crucial architectural pattern for scalable cloud applications. In typical EDMAs, database systems are relegated to isolated storage engines for individual components, blind to cross-component transactions, while messaging systems are unaware of each component's application state. Consequently, EDMAs impose a severe trade-off: developers must either sacrifice strong data consistency and integrity or manually manage complex distributed coordination. To address this challenge, we design vMODB, a distributed framework that offers a better trade-off and enables developers to build highly consistent and scalable cloud applications without compromising the benefits of EDMA. The core contribution of vMODB lies in the co-design of a programming abstraction and the underlying specialized system. We propose Virtual Micro Service (VMS), a novel programming model that provides familiar Object-Relational Mapping (ORM) and meta-programming constructs for specifying the data model, constraints, concurrency, and dependencies, making application semantics visible to the system. vMODB leverages semantic visibility to enforce ACID properties by transparently unifying event logs and state management, relieving developers from the burden of ensuring cross-component data consistency and integrity. Thanks to full-stack system optimizations enabled by our co-design, experiments using two benchmarks show that vMODB outperforms a widely adopted state-of-the-art competing framework that only offers eventual consistency by up to 3x.
翻译:事件驱动微服务架构(EDMA)已成为可扩展云应用的关键架构模式。在典型EDMA中,数据库系统被降级为各独立组件的隔离存储引擎,无法感知跨组件事务,而消息系统则对各组件应用状态一无所知。因此,EDMA强制开发者面临严峻权衡:要么牺牲强数据一致性与完整性,要么手动管理复杂的分布式协同。为解决这一挑战,我们设计了vMODB——一种分布式框架,它提供了更优的权衡方案,使开发者能够构建强一致性与可扩展性兼备的云应用,同时无需牺牲EDMA的优势。vMODB的核心贡献在于编程抽象与底层专用系统的协同设计。我们提出虚拟微服务(VMS)这一新型编程模型,通过提供熟悉的对象关系映射(ORM)及元编程结构来定义数据模型、约束、并发性与依赖关系,使应用语义对系统可见。vMODB利用语义可见性,通过透明统一事件日志与状态管理来实施ACID属性,从而免除开发者确保跨组件数据一致性与完整性的负担。由于协同设计带来的全栈系统优化,基于两个基准测试的实验表明,vMODB的性能比仅提供最终一致性的广泛采用的最先进竞争框架高出3倍。