ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r813697 - in /websites/staging/ace/trunk/content: ./ dev-doc/analysis/index.html dev-doc/analysis/template-mechanism.html
Date Thu, 19 Apr 2012 22:23:37 GMT
Author: buildbot
Date: Thu Apr 19 22:23:37 2012
New Revision: 813697

Log:
Staging update by buildbot for ace

Added:
    websites/staging/ace/trunk/content/dev-doc/analysis/template-mechanism.html
Modified:
    websites/staging/ace/trunk/content/   (props changed)
    websites/staging/ace/trunk/content/dev-doc/analysis/index.html

Propchange: websites/staging/ace/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr 19 22:23:37 2012
@@ -1 +1 @@
-1327889
+1328134

Modified: websites/staging/ace/trunk/content/dev-doc/analysis/index.html
==============================================================================
--- websites/staging/ace/trunk/content/dev-doc/analysis/index.html (original)
+++ websites/staging/ace/trunk/content/dev-doc/analysis/index.html Thu Apr 19 22:23:37 2012
@@ -154,6 +154,7 @@
       <div class="clear"></div>
       <div id="content"><ul>
 <li><a href="security-analysis.html">Security Analysis</a></li>
+<li><a href="template-mechanism.html">Template Mechanism</a></li>
 </ul></div>
       <hr>
       <footer>

Added: websites/staging/ace/trunk/content/dev-doc/analysis/template-mechanism.html
==============================================================================
--- websites/staging/ace/trunk/content/dev-doc/analysis/template-mechanism.html (added)
+++ websites/staging/ace/trunk/content/dev-doc/analysis/template-mechanism.html Thu Apr 19
22:23:37 2012
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Template Mechanism</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet/less" type="text/css" href="/lib/bootstrap.less">
+    <link href="/css/prettify.css" rel="stylesheet">
+	<link href="/css/code.css" rel="stylesheet" media="screen">
+    <script src="/js/less-1.2.1.min.js" type="text/javascript"></script>
+    <script src="http://code.jquery.com/jquery-1.7.min.js"></script>
+    <script src="/js/prettify.js"></script>
+    
+    <script src="/js/bootstrap-alert.js"></script>
+    <script src="/js/bootstrap-dropdown.js"></script>
+    <script src="/js/bootstrap-tooltip.js"></script>
+    <script src="/js/bootstrap-alerts.js"></script>
+    <script src="/js/bootstrap-modal.js"></script>
+    <script src="/js/bootstrap-transition.js"></script>
+    <script src="/js/bootstrap-button.js"></script>
+    <script src="/js/bootstrap-popover.js"></script>
+    <script src="/js/bootstrap-twipsy.js"></script>
+    <script src="/js/bootstrap-buttons.js"></script>
+    <script src="/js/bootstrap-scrollspy.js"></script>
+    <script src="/js/bootstrap-typeahead.js"></script>
+    <script src="/js/bootstrap-carousel.js"></script>
+    <script src="/js/bootstrap-tab.js"></script>
+    <script src="/js/bootstrap-collapse.js"></script>
+    <script src="/js/bootstrap-tabs.js"></script>
+    
+    
+    
+    <script>
+    $(function () { prettyPrint() })
+    $().dropdown()
+    </script>
+  </head>
+
+  <body style="padding-top: 50px;">
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="brand" href="/index.html">Apache ACE</a>
+          <ul class="nav">
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">News <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/news.html">News</a>
+      </li>
+      <li>
+        <a href="/on-the-web.html">On the web</a>
+      </li>
+    </ul>
+  </li>
+  <li>
+    <a href="/downloads.html">Downloads</a>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">User Documentation <b
class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/user-doc/introduction.html">Introduction</a>
+      </li>
+      <li>
+        <a href="/user-doc/getting-started.html">Getting Started</a>
+      </li>
+      <li>
+        <a href="/user-doc/features.html">Features</a>
+      </li>
+      <li>
+        <a href="/user-doc/faq.html">FAQ</a>
+      </li>
+      <li>
+        <a href="/user-doc/support.html">Support</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Developer Documentation
<b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/dev-doc/requirements/">Requirements</a>
+      </li>
+      <li>
+        <a href="/dev-doc/architecture.html">Architecture</a>
+      </li>
+      <li>
+        <a href="/dev-doc/analysis/">Analysis</a>
+      </li>
+      <li>
+        <a href="/dev-doc/design/">Design</a>
+      </li>
+      <li>
+        <a href="/dev-doc/coding-standards.html">Coding Standards</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/get-involved/mailing-lists.html">Mailing Lists</a>
+      </li>
+      <li>
+        <a href="/get-involved/issue-tracking.html">Issue Tracking</a>
+      </li>
+      <li>
+        <a href="/get-involved/source-code.html">Source Code</a>
+      </li>
+      <li>
+        <a href="/get-involved/project-team.html">Project Team</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Wiki <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Board+Reports">Board
Reports <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Index">Homepage <i
class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="http://www.apache.org/licenses/">Licenses <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/security/">Security <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship <i
class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+        </div>
+      </div>
+    </div>
+    <div class="container">
+      <p><a href="/"><i class='icon-home'></i> Home</a>&nbsp;&raquo&nbsp;<a
href="/dev-doc/">Dev-doc</a>&nbsp;&raquo&nbsp;<a href="/dev-doc/analysis/">Analysis</a></p>
+      <h1>Template Mechanism</h1>
+      <div class="clear"></div>
+      <div id="content"><p>Some artifacts (see Object Graph in Client) can need
some customization before being provisioned, e.g. configuration files might need some information
that is managed by one of the distributions.</p>
+<p>The customization will be done when a new version is created, i.e., on call of <code>approve()</code>
on a StatefulTargetObject. A customized version of the artifact (which is located somewhere
in an OBR, reachable using a URL) is uploaded to the same OBR, and the URL to the customized
one is stored in the DeploymentVersionObject.</p>
+<h1 id="proposed-design">Proposed design</h1>
+<p>In addition to the interfaces ArtifactHelper and ArtifactRecognizer, we introduce
a ArtifactPreprocessor, which has a single method <code>preprocess(ArtifactObject object,
Properties props)</code>, in which Properties contains customization information (see
below), and the method returns the URL of the altered artifact (or, if nothing has changed,
the original artifact, or, if this changed artifact is identical to one that has already been
created before, that old URL). This ArtifactPreprocessor can be published as a service (see
the section on remoting below), but for local purposes, the ArtifactHelper interface gets
an extra method <code>getPreprocessor()</code>, which returns an instance of the
preprocessor to be used for the type of artifact this helper helps.</p>
+<p>As an added service, we could create a basic preprocessor, VelocityBasedPreprocessor
which uses the Velocity template engine to process an artifact and store it in a configured
OBR; this preprocessor can be instantiated and returned by each ArtifactHelper that needs
a basic processor (if no processing can be done for some type of artifact, <code>getPreprocessor</code>
should return null).</p>
+<h3 id="customization-information">Customization information</h3>
+<p>For each template that has 'holes' to fill in, it can 'reach' all RepositoryObjects
that are reachable from the TargetObject this template will be provisioned to, leading to
a tree of data. Inspired by Velocity's way of finding contextual data, we propose to store
the for each RepositoryObject in its own Properties object, adding its attributes and tags
to it as two Properties objects using the keys "attributes" and "tags", and a List<Properties>
summing up all children (so, for a target, all its distributions) using the key "children";
in the end, this becomes a tree of Properties objects.</p>
+<p>This way, the Velocity template can use syntax like</p>
+<div class="codehilite"><pre><span class="c1">#foreach( $license in $gateway.children)</span>
+    <span class="c1">#if ($license.attributes.vendor==&quot;luminis&quot;)</span>
+        <span class="n">Default</span> <span class="n">license</span>
<span class="n">by</span> <span class="n">luminis</span>
+    <span class="c1">#else</span>
+        <span class="n">Custom</span> <span class="n">license</span>
<span class="n">by</span> <span class="nv">$license</span><span
class="o">.</span><span class="n">attributes</span><span class="o">.</span><span
class="n">vendor</span>
+    <span class="c1">#end</span>
+<span class="c1">#end</span>
+</pre></div>
+
+
+<h3 id="support-for-remoting">Support for remoting</h3>
+<p>Some customers might want to keep all information hidden from us, only allowing
us the metadata on the server. In this case, we can deploy a ArtifactPreprocessor on the customer's
site, which is then responsible for doing everything a local ArtifactPreprocessor can do,
and returning a URL to the altered artifact. Then, in stead of returning an instance of the
ArtifactPreprocessor, the ArtifactHelper will return some RemoteArtifactPreprocessor which
implements the ArtifactPreprocessor interface, but talks to a servlet on the customer's server.</p>
+<h3 id="on-the-needsapprove-state-in-the-statefultargetobject">On the 'needsApprove'
state in the StatefulTargetObject</h3>
+<p>With the mechanism above, <code>determineStoreState</code> in StatefulTargetObject
would need to create a full deployment version every time we need to know whether approval
is necessary. This is undesirable, because, in a remoting scenario, it means we have to pass
lots of data to a servlet, oftentimes only to find out that we created a version identical
to the one we already had.
+So, in stead of this rigid semantics, the 'needsApprove' state will become more of a 'tainted'
state, which becomes true when something happens that could have an impact on this StatefulTargetObject.
We can quite easily determine what targets are affected by a given change in the model by
following the associations from that object to the targets.</p></div>
+      <hr>
+      <footer>
+        <p>Copyright &#169; 2012 <a href="http://www.apache.org/">The Apache
Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</a>.<br/>Apache ACE, the Apache ACE logo, Apache and the
Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned
may be trademarks or registered trademarks of their respective owners.</p>
+      </footer>
+    </div>
+  </body>
+</html>



Mime
View raw message