This sounds similar to the proposed condition factory design (that never finalized into a spec) at OSGi: https://github.com/osgi/osgi/blob/design/168/.design/design-168.md
Perhaps we should prototype implementing that design and drive for finalizing a specification there? Tom On Fri, Sep 15, 2023 at 11:32 AM Christian Schneider < ch...@die-schneider.net> wrote: > Since OSGi version 8 there is the Condition service spec: > https://docs.osgi.org/specification/osgi.core/8.0.0/service.condition.html > > I look into implementing feature toggles using this spec. > A simple implementation could have an OSGi config with a list of enabled > feature toggles. > Like > enabledConditions=Condition1,Condition3 > > Each such condition name would result in a Condition service with the > matching id like: > service with interface org.osgi.service.condition.Condition and property > osgi.condition.id=Condition1 > service with interface org.osgi.service.condition.Condition and property > osgi.condition.id=Condition3 > > What do you think? > > If this already exists I would be happy about pointers. If not I am willing > to implement this as a new small felix bundle. > > Christian > > -- > -- > Christian Schneider > http://www.liquid-reality.de > > Computer Scientist > http://www.adobe.com >