Aspect Scoping in OSGi Modularity Runtime

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In the OSGi modularity framework, aspect configuration files are visible to all bundles in a runtime environment, leading to incorrect behavior or failure during load-time weaving due to incorrect aspect scope, and maintaining a large set of aspect configuration files is difficult.

Innovation Solution

Implementing a method for aspect scoping that restricts the set of aspects declared as public to a bundle and filters the imported aspect configuration files based on dependencies between bundles, using a two-level aspect discovery mechanism to distinguish between private and public aspects.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all aspect configuration files are made visible to every bundle in the runtime environment, then complete aspect coverage is achieved, but incorrect aspect scope causes failures during load-time weaving and unexpected side effects on bundles

Engineering Contradiction:
Improveload-time weaving correctnessVSAvoidaspect visibility management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements local quality by making aspect configuration files visible only to bundles that have explicit dependencies on the aspect-defining bundles. This selective visibility ensures that each bundle receives only the aspect configurations relevant to it, preventing incorrect scope issues while avoiding unnecessary complexity in managing universal visibility.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments the aspect configuration file visibility by creating separate visibility paths for each bundle based on their dependency relationships. Instead of a monolithic visibility model where all bundles see all aspect files, the system divides visibility into bundle-specific subsets, ensuring correctness while maintaining manageable complexity through the modular dependency graph.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If a complete set of all aspect configuration files is obtained without prior knowledge of hierarchy topology, then aspect discovery is simplified, but the set includes aspects from bundles with no dependency relationship causing incorrect weaving behavior

Engineering Contradiction:
Improveaspect configuration discoveryVSAvoidaspect scope correctness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent applies preliminary action by pre-computing and caching the transitive closure of bundle dependencies during runtime initialization. This allows the system to quickly determine which aspect configuration files should be visible to each bundle without performing complex hierarchy traversal at aspect discovery time, thus maintaining both ease of operation and scope correctness.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism in the form of a dependency resolution layer that mediates between the flat aspect configuration file set and the bundle-specific visibility requirements. This intermediary filters and routes aspect configurations based on pre-computed dependency relationships, ensuring that bundles receive only appropriately scoped aspects while maintaining simple discovery operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If one aspect configuration file is created for every exported package, then aspect scope is precisely controlled, but the large number of configuration files becomes difficult to maintain

Engineering Contradiction:
Improveaspect scope precisionVSAvoidconfiguration file maintenance
Core Design Contradiction:
Manufacturing precisionVSEase of manufacture

Solution Approach 1:

The patent merges multiple aspect configuration files into a single consolidated aspect definition file per bundle. Instead of requiring separate configuration files for each exported package, the system combines all aspect declarations from a bundle into one file, reducing maintenance overhead while preserving precise scope control through the dependency-based visibility mechanism that determines which consolidated files are visible to which bundles.

Inventive Principle:
Principle #5Merging (Combining)

4Reliability

If all aspects are registered with the runtime environment, then complete aspect availability is ensured, but start-up performance is unacceptable in moderately sized systems due to processing overhead

Engineering Contradiction:
Improveaspect availabilityVSAvoidstart-up performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and processes only the subset of aspect configuration files that are relevant to each bundle based on dependency relationships, rather than registering all aspects with the runtime environment. This extraction approach maintains complete aspect availability for each bundle while dramatically reducing start-up performance overhead by avoiding the processing of unrelated aspect configurations.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS9703576B2Aspect scoping in a modularity runtime
Publication Date: 2017.07.11 AIRBNB INC
  • US9703576B2 patent drawing
  • US9703576B2 patent drawing
  • US9703576B2 patent drawing

AI summary

A method and system are provided for aspect scoping in a modularity runtime. The method includes declaring a set of aspects of a bundle as public aspects in a first aspect configuration file, and filtering the aspect configuration files imported by a bundle to the files from bundles on which the importing bundle has a dependency. The method includes declaring a set of aspects of a bundle as private aspects in a second aspect configuration file. At weaving of aspects at a bundle, the weaving includes: any aspects defined as private aspects; any aspects defined as public aspects; any imported aspects; and any first configuration files from exporting bundles are declared.