Search:       RSS, Atom

Site navigation:

Type-Based Component Compatibility

Any component framework has to ensure that its component-based applications work correctly as components are installed and wirings established; this holds also for their changes during application lifetime. We address the issue of maintaining consistency using type-based component interface comparison.

This approach is used in two ways depending on the context in which it can be applied:

  • Component compatibility checking during component deployment/assembly or update step, ie when inter-component bindings are (re)established.
  • Automated generation of version identifiers for component features and/or the whole component, which then are used by the framework in the above step.

In particular, our OSGi Bundle Compatibility Checking (OBCC) project has the goal to detect mismatches between declared bundle compatibility (according to package and bundle version identifiers) and their real implementation, before the bundle is resolved or updated. This approach prevents errors which (by design) escape the standard OSGi bundle resolution and service binding processes, causing run-time exceptions.

The checking mechanism is based on an analysis of changes between bundle’s public interfaces – first obtaining a representation of the types in packages or services to be bound from bundle’s .jar file, then performing typing checks on them thus verifying whether the update bundle version is compatible with the one currently deployed.

The relatively easy part of the type reconstruction is the provided side of the component surface, i.e. types of the exported features (packages and services in case of OSGi, for example). The hard part is the _required_ side – it is rare that the distribution package contains the types of features on which the component depends.

Research results

  • Bauml, J., Brada, P. Automated Versioning in OSGi: a Mechanism for Component Software Consistency Guarantee. Proceedings of Euromicro SEAA, IEEE CS, 2009.
  • Brada, P. Enhanced OSGi Bundle Updates to Prevent Runtime Exceptions. Proceedings of the 34th Euromicro SEAA conference, IEEE CS, 2008.
  • Brada, P. & Valenta, L. Practical Verification of Component Substitutability Using Subtype Relation. Proceedings of the 32nd Euromicro SEAA conference, IEEE Computer Society, 2006.

Application-oriented results

Both of the above described approaches have been successfully applied in the OSGi platform as bundle comparator, enhanced resolver, and version generator tools.