in Sling we currently have only support for configuration via OSGi. this is
good for all system-wide configuration, but is not sufficient if you have
configuration parameters that differ for different content subtrees or tenants
("content-specific configuration").
for those users that use Sling in context of AEM there are currently different
options available for supporting content-specific configurations as described
in [1].
one of them are the "Configuration" bundles from the wcm.io project. (i happen
to be contributor of the wcm.io project as well and am the author of this
configuration bundles.)
i planned for a long time to contribute this configuration support to the
Apache Sling project, because most of it is not AEM-specific. so all Sling
users could benefit from it, not only AEM users; and it would get a broader
audience in Apache. but while thinking about this and revisiting the options
currently available [1] i think this contribution should go along with a bigger
refactoring of both the API and the inner workings to incorporate the learnings
in this area of the last two years. there was also a discussion on this list
[2] about exactly this topic with some very good propositions about refactoring
the API for reading configurations, e.g. using the same approach to describe
and access configurations in a type-safe way like in OSGi V6.
context-specific configuration and multi tenancy is a complex topic, so i
started with a list of use cases [3] of whom it think they are important (and
marked which of them are currently covered by the existing implementations). if
you have feedback on this list, think something is missing or going the wrong
direction please give feedback here.
if no one objects i would start in the next time with contributing the
necessary parts of wcm.io Config to Sling and refactor and enhance it in a way
as described in the priorities of the "Conf V2" column of [3]. this start would
take place in the "contrib" area of Sling until we see where it's getting to.
stefan
[1] https://wcm-io.atlassian.net/wiki/x/BwBLAQ
[2]
http://apache-sling.73963.n3.nabble.com/PROPOSAL-Context-specific-configuration-for-Apache-Sling-Multitenancy-tt4041134.html
[3] https://wcm-io.atlassian.net/wiki/x/BQBLAQ