3

OSGi R5 Enterprise release contains the Subsystem specification.

  • Does OSGi subsystems contain all capabilities of Eclipse feature?
  • Does tooling exist for it?

Purpose of this mapping would be a re-use of existing eclipse features in e.g. felix or bnd/bndtools based infrastructures.

AlBlue
  • 23,254
  • 14
  • 71
  • 91
Peter Kirschner
  • 927
  • 1
  • 9
  • 17

2 Answers2

4

Yes... kind of. A subsystem is powerful but also more complex than an Eclipse Feature.

A feature is just a set of bundles. You can install multiple features into a single OSGi Framework, and the bundles from each feature can interact with each other, e.g. by importing packages or binding services. This makes them hard to test and to reason about, because a feature that works on its own might not work when installed alongside some other feature.

A subsystem is also a set of bundles, but it additionally includes a degree of isolation. You can control whether the packages, services and other capabilities from one subsystem are visible to the members of any other subsystem. Thus they are more predictable.

Unfortunately constructing a subsystem is a much more complex task, and there is no specific tooling for this that I know of. We haven't done anything in bnd/Bndtools to help with this. But hey it's open source... contributions welcome ;-)

Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
  • Thanks for the inputs and I think I will give it a try. I think that the "pure" OSGi community using bnd/Bndtools could benefit if they can consume directly "Eclipse Feature" via OSGi subsystems. – Peter Kirschner Jul 05 '15 at 19:56
0

Subsystems and features are really two orthogonal things. An Eclipse feature is a set of bundles that can be installed into an OSGi runtime. Actually, there's little difference between a bundle that has a lot of Require-Bundle elements and a feature, as far as requiring that they be installed.

An OSGi subsystem on the other hand was a proposed way of allowing OSGi runtimes to be nested. However, they were replaced with a more general wiring construct in the final version of the OSGi spec; but in any case, they do a completely different thing.

AlBlue
  • 23,254
  • 14
  • 71
  • 91
  • Can you provide some sources for these statements? To my understanding SubSystem actually are a standardization of Eclipse features: http://coderthoughts.blogspot.ch/2013/04/osgi-subsystems.html – Puce Jul 03 '15 at 13:36
  • No; features install into the same instance, whereas an osgi subsystem is a partitioned set of bundles that cannot see other bundles in the same OSGi runtime. It's more akin to different webapps in the same tomcat container. In any case, they were revamped in a later spec to be a simple wiring/hiding protocol rather than a nested framework. – AlBlue Jul 03 '15 at 15:10
  • 1
    @AlBlue There's more to it than that. Yes, the *core* was minimally updated to include wiring filters... but there's also the Subsystem Service Specification (OSGi Enterprise spec, chapter 134) that builds on those filters to create the full subsystem concept with scoped regions etc. – Neil Bartlett Jul 03 '15 at 19:36