You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Stefan Seifert <ss...@pro-vision.de> on 2016/04/14 12:41:46 UTC

[RT] Use cases for content-specific configurations in Sling & Contribution

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



RE: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Stefan Seifert <ss...@pro-vision.de>.
>Regarding the table at [1], I think OSGI configurations do already support
>notification (but not inheritance) thanks to [0] and also thanks to
>updating the related component upon config change.

you're right, of course - i changed E5 to be supported for OSGi.

stefan

Re: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Timothée Maret <ti...@gmail.com>.
Hi Stefan,

I agree notifications can't reasonably be left to the user to implement.
Good to see that notification support is considered and on the map.

Regarding the table at [1], I think OSGI configurations do already support
notification (but not inheritance) thanks to [0] and also thanks to
updating the related component upon config change.

Regards,

Timothee


[0]
https://osgi.org/javadoc/r4v42/index.html?org/osgi/service/cm/ConfigurationAdmin.html
[1] https://wcm-io.atlassian.net/wiki/x/BQBLAQ


2016-07-22 12:51 GMT+02:00 Stefan Seifert <ss...@pro-vision.de>:

> hello timothée.
>
> yes, this is E5 from the usecase list
> https://wcm-io.atlassian.net/wiki/x/BQBLAQ
>
> it has do be done right if added, because doing observation-based
> notifications in a complex scenario with configuration inheritance, default
> values, overrides etc. can quickly become a performance problem. but the
> goal of the architecture should be to support it.
>
> stefan
>
>
> >-----Original Message-----
> >From: maret.timothee@gmail.com [mailto:maret.timothee@gmail.com] On
> Behalf
> >Of Timothée Maret
> >Sent: Friday, July 22, 2016 11:56 AM
> >To: dev@sling.apache.org
> >Subject: Re: [RT] Use cases for content-specific configurations in Sling &
> >Contribution
> >
> >Hi,
> >
> >This looks great!
> >
> >I think the support for configuration change notifications may be worth
> >considering.
> >For instance content distribution could leverage it in order to manage its
> >endpoints whenever a config change.
> >
> >Without notifications, a consumer can either I. periodically poll the
> >configs to check for change or II. rely on observations in order to be
> >notified.
> >None of them is ideal, indeed:
> >
> >I. imposes a lag in discovering the change and adds periodical background
> >read operations to the repository which should be avoided if possible
> >II. requires the consumer to know about the content structure and know
> >about the resolution mechanism
> >
> >
> >If adding this feature slows the process of getting a config mechanism in
> >Sling, the notification support could surely be added later on.
> >
> >Regards,
> >
> >Timothee
>

RE: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Stefan Seifert <ss...@pro-vision.de>.
hello timothée.

yes, this is E5 from the usecase list https://wcm-io.atlassian.net/wiki/x/BQBLAQ

it has do be done right if added, because doing observation-based notifications in a complex scenario with configuration inheritance, default values, overrides etc. can quickly become a performance problem. but the goal of the architecture should be to support it.

stefan


>-----Original Message-----
>From: maret.timothee@gmail.com [mailto:maret.timothee@gmail.com] On Behalf
>Of Timothée Maret
>Sent: Friday, July 22, 2016 11:56 AM
>To: dev@sling.apache.org
>Subject: Re: [RT] Use cases for content-specific configurations in Sling &
>Contribution
>
>Hi,
>
>This looks great!
>
>I think the support for configuration change notifications may be worth
>considering.
>For instance content distribution could leverage it in order to manage its
>endpoints whenever a config change.
>
>Without notifications, a consumer can either I. periodically poll the
>configs to check for change or II. rely on observations in order to be
>notified.
>None of them is ideal, indeed:
>
>I. imposes a lag in discovering the change and adds periodical background
>read operations to the repository which should be avoided if possible
>II. requires the consumer to know about the content structure and know
>about the resolution mechanism
>
>
>If adding this feature slows the process of getting a config mechanism in
>Sling, the notification support could surely be added later on.
>
>Regards,
>
>Timothee

Re: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Timothée Maret <ti...@gmail.com>.
Hi,

This looks great!

I think the support for configuration change notifications may be worth
considering.
For instance content distribution could leverage it in order to manage its
endpoints whenever a config change.

Without notifications, a consumer can either I. periodically poll the
configs to check for change or II. rely on observations in order to be
notified.
None of them is ideal, indeed:

I. imposes a lag in discovering the change and adds periodical background
read operations to the repository which should be avoided if possible
II. requires the consumer to know about the content structure and know
about the resolution mechanism


If adding this feature slows the process of getting a config mechanism in
Sling, the notification support could surely be added later on.

Regards,

Timothee




2016-07-21 17:46 GMT+02:00 Stefan Seifert <ss...@pro-vision.de>:

> i've created a ticket for the contribution:
> https://issues.apache.org/jira/browse/SLING-5886
>
> the preparation work for the contribution will take place in
> https://github.com/stefanseifert/sling-config until everything is ready
> to include it in the sling contrib build.
>
> stefan
>
> >-----Original Message-----
> >From: Stefan Seifert [mailto:sseifert@pro-vision.de]
> >Sent: Thursday, April 14, 2016 12:42 PM
> >To: dev@sling.apache.org
> >Subject: [RT] Use cases for content-specific configurations in Sling &
> >Contribution
> >
> >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
> >
> >
>
>
>

RE: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Stefan Seifert <ss...@pro-vision.de>.
i've created a ticket for the contribution:
https://issues.apache.org/jira/browse/SLING-5886

the preparation work for the contribution will take place in https://github.com/stefanseifert/sling-config until everything is ready to include it in the sling contrib build.

stefan

>-----Original Message-----
>From: Stefan Seifert [mailto:sseifert@pro-vision.de]
>Sent: Thursday, April 14, 2016 12:42 PM
>To: dev@sling.apache.org
>Subject: [RT] Use cases for content-specific configurations in Sling &
>Contribution
>
>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
>
>



Re: [RT] Use cases for content-specific configurations in Sling & Contribution

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Thursday 14 April 2016 10:41:46 Stefan Seifert wrote:
> 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.

Nice! big +1

O.

> stefan
> 
> 
> [1] https://wcm-io.atlassian.net/wiki/x/BwBLAQ
> [2]
> http://apache-sling.73963.n3.nabble.com/PROPOSAL-Context-specific-configura
> tion-for-Apache-Sling-Multitenancy-tt4041134.html [3]
> https://wcm-io.atlassian.net/wiki/x/BQBLAQ