19.4DBApr 21
vMODB: Unifying Event and Data Management for Distributed Asynchronous ApplicationsRodrigo Laigner, Yongluan Zhou
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.
SESep 9, 2021Code
Cataloging Dependency Injection Anti-Patterns in Software SystemsRodrigo Laigner, Diogo Mendonça, Alessandro Garcia et al.
Context: Dependency Injection (DI) is a commonly applied mechanism to decouple classes from their dependencies in order to provide higher modularization. However, bad DI practices often lead to negative consequences, such as increasing coupling. Although white literature conjectures about the existence of DI anti-patterns, there is no evidence on their practical relevance, usefulness, and generality. Objective: The objective of this study is to propose and evaluate a catalog of Java DI anti-patterns and associated refactorings. Methodology: We reviewed existing reported DI anti-patterns in order to analyze their completeness. The limitations found in literature motivated proposing a novel catalog of 12 DI anti-patterns. We developed a tool to statically analyze the occurrence level of the candidate DI anti-patterns in both open-source and industry projects. Next, we survey practitioners to assess their perception on the relevance, usefulness, and their willingness on refactoring anti-pattern instances of the catalog. Results: Our static code analyzer tool showed a relative recall of 92.19% and high average precision. It revealed that at least 9 different DI anti-patterns appeared frequently in the analyzed projects. Besides, our survey confirmed the perceived relevance of the catalog and developers expressed their willingness to refactor instances of anti-patterns from source code. Conclusion: The catalog contains Java DI anti-patterns that occur in practice and that are perceived as useful. Sharing it with practitioners may help them to avoid such anti-patterns, thus improving source-code quality.
DBFeb 27, 2021Code
Data Management in Microservices: State of the Practice, Challenges, and Research DirectionsRodrigo Laigner, Yongluan Zhou, Marcos Antonio Vaz Salles et al.
Microservices have become a popular architectural style for data-driven applications, given their ability to functionally decompose an application into small and autonomous services to achieve scalability, strong isolation, and specialization of database systems to the workloads and data formats of each service. Despite the accelerating industrial adoption of this architectural style, an investigation of the state of the practice and challenges practitioners face regarding data management in microservices is lacking. To bridge this gap, we conducted a systematic literature review of representative articles reporting the adoption of microservices, we analyzed a set of popular open-source microservice applications, and we conducted an online survey to cross-validate the findings of the previous steps with the perceptions and experiences of over 120 experienced practitioners and researchers. Through this process, we were able to categorize the state of practice of data management in microservices and observe several foundational challenges that cannot be solved by software engineering practices alone, but rather require system-level support to alleviate the burden imposed on practitioners. We discuss the shortcomings of state-of-the-art database systems regarding microservices and we conclude by devising a set of features for microservice-oriented database systems.