You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2013/12/02 17:08:35 UTC

[jira] [Commented] (SLING-3148) Implement support for Feature Flags/Toggles in Sling

    [ https://issues.apache.org/jira/browse/SLING-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13836637#comment-13836637 ] 

Bertrand Delacretaz commented on SLING-3148:
--------------------------------------------

At revision 1547023 I have updated my https://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/feature-flags prototype as follows:

* RandomProvider uses a configuration factory to create 0.N random flag providers, each with their own name and activation percentage.
* HideResourceDecorator can be configured to hide resources behind a SyntheticResource with a configurable resource type, if a given feature flag is false.
* NullRenderingServlet provides a null rendering (empty response) for resources which have the hidden-by-flag resource type.

With this, the following OSGi configs have the effect of randomly hiding all or part of /index.html for example: the page itself, CSS style, images come and go randomly.

{code}
  Factory PID = org.apache.sling.extensions.featureflags.api.HideResourceDecorator
  flag.name = random.50
  hidden.resource.type = hidden-by-flag

  Factory PID = org.apache.sling.extensions.featureflags.impl.providers.RandomProvider
  name = random.50
  active.percentage = 50
{code}

I don't mean for any of this to necessarily find its way into Sling, but this allows for experimenting without touching the Sling core, for now.

> Implement support for Feature Flags/Toggles in Sling
> ----------------------------------------------------
>
>                 Key: SLING-3148
>                 URL: https://issues.apache.org/jira/browse/SLING-3148
>             Project: Sling
>          Issue Type: New Feature
>          Components: General
>            Reporter: Henry Saginor
>            Priority: Minor
>
> It would be nice if sling provide support for feature flags (also called toggles) pattern [1].
> I am thinking the implementation could provide the following.
> 1) Integrate an existing framework such as togglz [2] or implement something similar with UI/Configuration to toggle features.
> 2) Create a jcr property (sling:Feature) which can be added to resource type nodes. Then some conditional logic in <sling:include>, and get and post servlets determines if the resource should be rendered if its resource type contains such property.
> [1] http://en.wikipedia.org/wiki/Feature_toggle
> [2] http://www.togglz.org/



--
This message was sent by Atlassian JIRA
(v6.1#6144)