TL;DR
This paper tackles the problem of "feature convolution" in middleware systems, where essential functionalities become deeply entangled, making them hard to modify or customize. The authors introduce "horizontal decomposition," a mixed-paradigm approach that uses aspect-oriented programming to modularize these crosscutting features, resulting in a simpler, more adaptable, and performant middleware core.
What Problem Does This Paper Address?
Modern middleware systems, like CORBA, DCOM, and J2EE, aim to simplify distributed application development by providing a uniform interface. However, as these systems evolve to support a wider range of application requirements, their architectures become increasingly complex. This complexity arises not from poor design, but from the inherent difficulty of separating and modularizing "orthogonal" concerns (like security, logging, or specific invocation styles) from the core functionalities. These concerns often "crosscut" multiple parts of the codebase, leading to "feature convolution" – a state where functionalities are deeply intertwined, making them difficult to isolate, reuse, or customize. This entanglement results in monolithic, inflexible middleware that is hard to maintain and adapt to specific needs, often leading to unnecessary runtime overhead.
Methods
The core contribution of this paper is the horizontal decomposition (HD) methodology. HD is a mixed-paradigm approach that combines traditional hierarchical (vertical) decomposition with aspect-oriented programming (AOP).
Here's how it works:
- Establish a Coherent Core: The first step is to define a minimal, functionally coherent "core" of the middleware that supports only the most essential functionalities using conventional programming paradigms. This core is designed to be as simple and modular as possible.
- Identify and Modularize Aspects: Orthogonal functionalities that crosscut the core are identified as "aspects." These aspects are then implemented separately using AOP.
- Aspect-Oriented Refactoring: The authors apply AOP techniques (specifically using AspectJ) to refactor the existing middleware codebase. This involves extracting crosscutting concerns into aspect modules.
- Super-impositional Architecture: The goal is to create a "super-impositional" architecture where aspect implementations can be transparently "woven" onto the core at compile-time or runtime. This allows for flexible combinations of features without modifying the core code.
- Incremental Decomposition: The process is iterative. New aspects are discovered and refactored incrementally, leading to a progressively cleaner core and more modular aspects.
Datasets
Not discussed in the paper. The evaluation uses a specific middleware implementation (ORBacus, a CORBA implementation) and a third-party benchmarking suite (Open CORBA Benchmarking Suite - OCBS).
Key Insights and Ideas
- Feature Convolution is Inherent, Not Bad Design: The paper argues that the entanglement of functionalities in middleware isn't necessarily a design flaw but a consequence of trying to implement diverse, crosscutting concerns using traditional programming models.
- Aspects are Relative: The definition of what constitutes an "aspect" is not absolute but depends on the primary functionality of the system. This relativity is crucial for effective decomposition.
- A Stable Core Enables Aspects: A well-defined, stable, and minimal core architecture is essential for successfully identifying and implementing aspects.
- Separation of Functionality and Crosscutting Logic: A key insight is the importance of separating the implementation of an aspect's core functionality from its crosscutting logic (how it interacts with the core). This separation is crucial for modularity and pluggability.
- Incremental Refactoring is Key: Decomposing complex systems is not a one-shot process. Discovering and untangling aspects is an ongoing, incremental effort.
Key Results
The paper demonstrates significant improvements through the refactoring of ORBacus:
- Code Size Reduction: The refactored middleware core is approximately 40% smaller than the original implementation.
- Structural Simplification: Significant reductions were observed in methods, cyclomatic complexity, and efferent coupling.
- Performance Improvement: The refactored core showed an average of 8% performance gain in invocation roundtrip tests.
- Configurability: The approach enables a super-impositional architecture allowing for over 60 possible combinations of features to be configured at post-compilation time without source code modification.
- Reduced Runtime Overhead: While the "all aspects woven" version showed a slight overhead (around 7.6%), the refactored core itself was more efficient, and the overhead was deemed acceptable for the gained flexibility.
Limitations and Future Work
- Language-Specific Phenomena: The authors note that some aspects of their approach might be specific to the AspectJ language.
- Benchmarking Tool Limitations: The benchmarking tool used did not support all desired aspectual functionalities, limiting the scope of performance evaluation for certain aspects.
- Aspect Consistency: Ensuring consistency across multiple aspects when they interact is a challenge that requires further research, potentially through requirements engineering or model checking.
- Configuration Management: Managing the exponentially growing number of aspect combinations requires effective configuration tools.
- Future Work: The authors plan to continue refactoring to extract more aspects, explore aspect decomposition for primitive IDL data types and interface compilers, and apply the methodology to other middleware types like J2EE application servers. They also aim to develop better tools for managing aspect configurations.
Summary updated