Describes which requirements the Karaf boot faces, how we solve it at the moment and ideas how to improve the boot.

Requirements

1. The OSGi Framework should be switchable (We currently support Equinox and Felix)
2. Some projects like Camel and CXF need to change some javax interfaces and implementations. At the same time we do not want these alternative implementations all the time
3. The Karaf "core" should be as small as possible. Extensions should be defined using features
4. Support optional bundle resolution in features using an OBR
5. Support pax url handlers to load bundles
6. Make Karaf startup fast

Current boot (Karaf 3)

The current boot process runs in several stages. Each stage is finished before the next starts.

The first steps of the Karaf boot are done in the main module.

The startup.properties have to contain at least all bundles necessary to do the following:

Installing the boot features

When the feature-core bundle is started it will load all features listed in boot features

Possible improvements

Allow OBR and most urlhandlers to be installed as features to make karaf more modular (Will improve support for Req 3)

The issue https://issues.apache.org/jira/browse/KARAF-608 describes staged boot features to allow to move obr and url handlers out of startup.properties and into features. This will make the Karaf "core" smaller and allow to use additional custom urlhandlers for boot features.

Load bundles in parallel (especially from external resources like maven repos) (Will improve support for Req 6)

Currently we load features and bundles sequentially in the feature core. If we manage to load them in parallel using a set of worker threads we can speed up the clean karaf startup a lot.