incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand Delacretaz (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Sling > Sling Feature Flags support
Date Tue, 10 Dec 2013 11:04:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/fr/2176/1/1/_/styles/combined.css?spaceKey=SLING&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/SLING/Sling+Feature+Flags+support">Sling
Feature Flags support</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~bdelacretaz">Bertrand
Delacretaz</a>
    </h4>
        <br/>
                         <h4>Changes (3)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >See also https://issues.apache.org/jira/browse/SLING-3148
for the timeline/history of this. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">For
now we have a basic prototype at http://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/feature-flags/
that allows for checking if a named feature flag is active or not. This is the easy part.
<br> <br>h1. What sets a feature flag <br>As described by Roy Fielding on
the Sling dev list (http://markmail.org/message/rueoiuacmft5fdet) <br> <br>{quote}
<br>Likewise, you should expect to have both a global setting for each flag and a per-user
mask, and the person running the flip switch control panel needs to be able to choose from
<br> <br>  a) off for all users <br>  b) off for unassigned users <br>
 c) proportional assignment to on (X out of N users, max M) <br>  d) logical (custom
code) assignment to on <br>  e) on for unassigned users <br>  f) on for all users
<br>{quote} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h1. Feature Flags use cases <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">TBD</span>
<span class="diff-added-words"style="background-color: #dfd;"> </span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{warning:title=Work
in Progress} <br>This is still experimental, work in progress, not final etc...just
rough ideas for now. <br>{warning} <br> <br>h2. Show/Hide Resources <br>Make
some Resources completely invisible in specific requests, based on feature flags. <br>
<br>All descendant Resources of a hidden Resource are hidden as well. <br> <br>Need
to be careful about caching. <br> <br>h2. Alter Resource rendering <br>Can
be achieved transparently by hiding rendering scripts and servlets. <br> <br>Need
to be careful about caching. <br> <br>Might need to happen on the client as well
as on the server, depending on the desired caching behavior. <br> <br>h2. Use
variants of OSGi services <br>A call to sling.getService(&quot;foo&quot;) in
a rendering script, for example, can return different variants of the &quot;foo&quot;
service depending on which feature flags are active. <br> <br>The usage value
needs to be weighed against implementation difficulty... <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>See also <a href="https://issues.apache.org/jira/browse/SLING-3148" class="external-link"
rel="nofollow">https://issues.apache.org/jira/browse/SLING-3148</a> for the timeline/history
of this.</p>

<p>For now we have a basic prototype at <a href="http://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/feature-flags/"
class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/sling/whiteboard/bdelacretaz/feature-flags/</a>
that allows for checking if a named feature flag is active or not. This is the easy part.</p>

<h1><a name="SlingFeatureFlagssupport-Whatsetsafeatureflag"></a>What sets
a feature flag</h1>
<p>As described by Roy Fielding on the Sling dev list (<a href="http://markmail.org/message/rueoiuacmft5fdet"
class="external-link" rel="nofollow">http://markmail.org/message/rueoiuacmft5fdet</a>)</p>

<blockquote>
<p>Likewise, you should expect to have both a global setting for each flag and a per-user
mask, and the person running the flip switch control panel needs to be able to choose from</p>

<p>  a) off for all users<br/>
  b) off for unassigned users<br/>
  c) proportional assignment to on (X out of N users, max M)<br/>
  d) logical (custom code) assignment to on<br/>
  e) on for unassigned users<br/>
  f) on for all users</p></blockquote>

<h1><a name="SlingFeatureFlagssupport-FeatureFlagsusecases"></a>Feature
Flags use cases</h1>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Work in Progress</b><br
/>This is still experimental, work in progress, not final etc...just rough ideas for now.</td></tr></table></div>

<h2><a name="SlingFeatureFlagssupport-Show%2FHideResources"></a>Show/Hide
Resources</h2>
<p>Make some Resources completely invisible in specific requests, based on feature flags.</p>

<p>All descendant Resources of a hidden Resource are hidden as well.</p>

<p>Need to be careful about caching.</p>

<h2><a name="SlingFeatureFlagssupport-AlterResourcerendering"></a>Alter
Resource rendering</h2>
<p>Can be achieved transparently by hiding rendering scripts and servlets.</p>

<p>Need to be careful about caching.</p>

<p>Might need to happen on the client as well as on the server, depending on the desired
caching behavior.</p>

<h2><a name="SlingFeatureFlagssupport-UsevariantsofOSGiservices"></a>Use
variants of OSGi services</h2>
<p>A call to sling.getService("foo") in a rendering script, for example, can return
different variants of the "foo" service depending on which feature flags are active.</p>

<p>The usage value needs to be weighed against implementation difficulty...</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=SLING">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
        <a href="https://cwiki.apache.org/confluence/display/SLING/Sling+Feature+Flags+support">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=36274245&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/SLING/Sling+Feature+Flags+support?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message