Modified: helix/site-content/0.9.9-docs/tutorial_controller.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_controller.html?rev=1900184&r1=1900183&r2=1900184&view=diff
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_controller.html (original)
+++ helix/site-content/0.9.9-docs/tutorial_controller.html Sat Apr 23 04:22:15 
2022
@@ -1,200 +1,284 @@
-
 <!DOCTYPE html>
+
+
 <!--
- Generated by Apache Maven Doxia at 2022-04-23
- Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from 
src/site/markdown/tutorial_controller.md at 2022-04-23
+ | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
+    <title>Apache Helix &#x2013; Tutorial - Controller</title>
+    <link rel="stylesheet" 
href="./css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+    <script src="./js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script>
+<script type="text/javascript">
+
+        var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+        })();
+
+      </script>
+  </head>
+  <body class="topBarEnabled">
+    <header id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn 
btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+            <ul class="nav">
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix 
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="download.html" title="Download">Download</a></li>
+            <li><a href="Building.html" title="Building">Building</a></li>
+            <li><a href="releasenotes/release-0.9.9.html" title="Release 
Notes">Release Notes</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="Quickstart.html" title="Quick Start">Quick 
Start</a></li>
+            <li><a href="Tutorial.html" title="Tutorial">Tutorial</a></li>
+            <li><a href="../javadocs/0.9.9" title="Javadocs">Javadocs</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager">Distributed lock manager</a></li>
+            <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit 
MQ consumer group">Rabbit MQ consumer group</a></li>
+            <li><a href="recipes/rsync_replicated_file_store.html" 
title="Rsync replicated file store">Rsync replicated file store</a></li>
+            <li><a href="recipes/service_discovery.html" title="Service 
discovery">Service discovery</a></li>
+            <li><a href="recipes/task_dag_execution.html" title="Distributed 
task DAG execution">Distributed task DAG execution</a></li>
+        </ul>
+      </li>
+            </ul>
+            <ul class="nav pull-right">
+              <li class="dropdown">
+                <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">External Links <b class="caret"></b></a>
+                <ul class="dropdown-menu">
+    <li><a href="index.html" title="Helix 0.9.9">Helix 0.9.9</a></li>
+                </ul>
+              </li>
+            </ul>
+        </div>
+      </div>
+    </header>
+    <div class="container-fluid">
+      <header>
+        <div id="banner">
+          <div class="pull-left"><a href="http://helix.apache.org/"; 
id="bannerLeft"><img src="../images/helix-logo.jpg"  alt=""/></a></div>
+          <div class="pull-right"><a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif"  alt=""/></a></div>
+          <div class="clear"><hr/></div>
+        </div>
+
+        <div id="breadcrumbs">
+          <ul class="breadcrumb">
+      <li class=""><a href="http://helix.apache.org/"; class="externalLink" 
title="Apache Helix">Apache Helix</a><span class="divider">/</span></li>
+      <li class=""><a href="../" title="Apache Helix">Apache Helix</a><span 
class="divider">/</span></li>
+      <li class=""><a href="./" title="Release 0.9.9">Release 0.9.9</a><span 
class="divider">/</span></li>
+    <li class="active ">Tutorial - Controller</li>
+        <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li>
+          </ul>
+        </div>
+      </header>
+      <div class="row-fluid">
+        <header id="leftColumn" class="span2">
+          <nav class="well sidebar-nav">
+  <ul class="nav nav-list">
+   <li class="nav-header">Get Helix</li>
+    <li><a href="download.html" title="Download"><span 
class="none"></span>Download</a></li>
+    <li><a href="Building.html" title="Building"><span 
class="none"></span>Building</a></li>
+    <li><a href="releasenotes/release-0.9.9.html" title="Release Notes"><span 
class="none"></span>Release Notes</a></li>
+   <li class="nav-header">Hands-On</li>
+    <li><a href="Quickstart.html" title="Quick Start"><span 
class="none"></span>Quick Start</a></li>
+    <li><a href="Tutorial.html" title="Tutorial"><span 
class="none"></span>Tutorial</a></li>
+    <li><a href="../javadocs/0.9.9" title="Javadocs"><span 
class="none"></span>Javadocs</a></li>
+   <li class="nav-header">Recipes</li>
+    <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager"><span class="none"></span>Distributed lock manager</a></li>
+    <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ 
consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li>
+    <li><a href="recipes/rsync_replicated_file_store.html" title="Rsync 
replicated file store"><span class="none"></span>Rsync replicated file 
store</a></li>
+    <li><a href="recipes/service_discovery.html" title="Service 
discovery"><span class="none"></span>Service discovery</a></li>
+    <li><a href="recipes/task_dag_execution.html" title="Distributed task DAG 
execution"><span class="none"></span>Distributed task DAG execution</a></li>
+  </ul>
+          </nav>
+          <div class="well sidebar-nav">
+<form id="search-form" action="https://www.google.com/search"; method="get" >
+  <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+            <hr />
+            <div id="poweredBy">
+              <div class="clear"></div>
+    <div id="twitter" style="border:none; margin-top: 10px">
+    <a href="https://twitter.com/ApacheHelix"; class="twitter-follow-button" 
data-show-count="false" data-align="left" data-size="medium" 
data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a>
+    <script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+<a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </header>
+        <main id="bodyColumn"  class="span10" >
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
-<html  xml:lang="en" lang="en">
 
-       <head>
-               <meta charset="UTF-8" />
-               <title>Apache Helix &#x2013; Tutorial - Controller</title>
-               <meta name="viewport" content="width=device-width, 
initial-scale=1.0" />
-               <meta name="description" content="" />
-               <meta http-equiv="content-language" content="en" />
-
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css";
 rel="stylesheet" />
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css";
 rel="stylesheet" />
-               <link href="./css/docs.css" rel="stylesheet" />
-               <link href="./css/reflow-skin.css" rel="stylesheet" />
-               
-               
-               <link href="./css/lightbox.css" rel="stylesheet" />
-               
-               <link href="./css/site.css" rel="stylesheet" />
-               <link href="./css/print.css" rel="stylesheet" media="print" />
-               
-               <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-               <!--[if lt IE 9]>
-                       <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
-               <![endif]-->
-               
-       </head>
-
-       <body class="page-$config.fileId project-$config.projectId" 
data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
-
-               <div class="navbar navbar-fixed-top">
-                       <div class="navbar-inner">
-                               <div class="container">
-                                       <a class="btn btn-navbar" 
data-toggle="collapse" data-target=".nav-collapse">
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                       </a>
-                                       <div class="nav-collapse">
-                                               <ul class="nav pull-right">
-                                                       <li class="active"><a 
href="" title="Helix 0.9.9">Helix 0.9.9 </a></li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Get Helix <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Download">Download </a></li>
-                                                                       <li 
class="active"><a href="" title="Building">Building </a></li>
-                                                                       <li 
class="active"><a href="" title="Release Notes">Release Notes </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Quick Start">Quick Start </a></li>
-                                                                       <li 
class="active"><a href="" title="Tutorial">Tutorial </a></li>
-                                                                       <li 
class="active"><a href="" title="Javadocs">Javadocs </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Distributed lock manager">Distributed lock 
manager </a></li>
-                                                                       <li 
class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer 
group </a></li>
-                                                                       <li 
class="active"><a href="" title="Rsync replicated file store">Rsync replicated 
file store </a></li>
-                                                                       <li 
class="active"><a href="" title="Service discovery">Service discovery </a></li>
-                                                                       <li 
class="active"><a href="" title="Distributed task DAG execution">Distributed 
task DAG execution </a></li>
-                                                               </ul>
-                                                       </li>
-                                               </ul>
-                                       </div><!--/.nav-collapse -->
-                               </div>
-                       </div>
-               </div>
-               
-       <div class="container">
-       
-       <!-- Masthead
-       ================================================== -->
-       <header class="jumbotron subhead">
-               <div class="row" id="banner">
-                       <div class="span12">
-                               <div class="pull-left">
-                                       <a href="" id="bannerLeft"><img src="" 
alt='"''"' /></a>
-                               </div>
-                               <div class="pull-right">
-                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="" alt='"''"' /></a>
-                               </div>
-                       </div>
-               </div>
-               <div>
-                       <ul class="breadcrumb">
-                               <li><a href="" title="Apache Helix">Apache 
Helix </a></li>
-                               <li class="divider">/</li>
-                               <li><a href="" title="Release 0.9.9">Release 
0.9.9 </a></li>
-                               <li class="divider">/</li>
-                               <li>Tutorial - Controller</li>
-                               <li class="publishDate version-date 
pull-right">Last Published: 2022-04-23</li>
-                       </ul>
-               </div>
-       </header>
-
-       <div class="main-body">
-       <div class="row">
-               <div class="span12">
-                       <div class="body-content">
-$bodyWithHeader
-                       </div>
-               </div>
-       </div>
-       </div>
-
-       </div><!-- /container -->
-       
-       <!-- Footer
-       ================================================== -->
-       <footer class="well">
-               <div class="container">
-                       <div class="row">
-                               <div class="span9 bottom-nav">
-                                       <ul class="nav nav-list">
-                                               <li class="nav-header">Get 
Helix</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Download">Download </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Building">Building </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Release Notes">Release Notes </a>
-                                               </li>
-                                               <li 
class="nav-header">Hands-On</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Quick Start">Quick Start </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Tutorial">Tutorial </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Javadocs">Javadocs </a>
-                                               </li>
-                                               <li 
class="nav-header">Recipes</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed lock manager">Distributed lock manager </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rsync replicated file store">Rsync replicated file store </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Service discovery">Service discovery </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed task DAG execution">Distributed task DAG execution </a>
-                                               </li>
-                                       </ul>
-                               </div>
-                       </div>
-               </div>
-       </footer>
-               
-       <div class="container subfooter">
-               <div class="row">
-                       <div class="span12">
-                               <p class="pull-right"><a href="#">Back to 
top</a></p>
-                               <p class="copyright">Copyright &copy;2022 <a 
href="https://www.apache.org/";>The Apache Software Foundation</a>. All Rights 
Reserved.</p>
-                               <p><a 
href="http://github.com/andriusvelykis/reflow-maven-skin"; title="Reflow Maven 
skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt"; 
target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
-                                       </div>
-               </div>
-       </div>
-
-       <!-- Le javascript
-       ================================================== -->
-       <!-- Placed at the end of the document so the pages load faster -->
-
-       <!-- Fallback jQuery loading from Google CDN:
-            
http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go
 -->
-       <script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";></script>
-       <script type="text/javascript">
-               if (typeof jQuery == 'undefined')
-               {
-                       document.write(unescape("%3Cscript 
src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
-               }
-       </script>
-       
-       <script 
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js";></script>
-       <script src="./js/lightbox.js"></script>
-       <script src="./js/jquery.smooth-scroll.min.js"></script>
-       <!-- back button support for smooth scroll -->
-       <script src="./js/jquery.ba-bbq.min.js"></script>
-
-       <script src="./js/reflow-skin.js"></script>
-       
-       </body>
+<section>
+<h2><a name="Helix_Tutorial:_Controller"></a><a href="./Tutorial.html">Helix 
Tutorial</a>: Controller</h2>
+<p>Next, let's implement the controller.  This is the brain of the cluster.  
Helix makes sure there is exactly one active controller running the 
cluster.</p><section>
+<h3><a name="Start_a_Connection"></a>Start a Connection</h3>
+<p>The Helix manager requires the following parameters:</p>
+<ul>
+
+<li>clusterName: A logical name to represent the group of nodes</li>
+<li>instanceName: A logical name of the process creating the manager instance. 
Generally this is host:port</li>
+<li>instanceType: Type of the process. This can be one of the following types, 
in this case use CONTROLLER:
+<ul>
+
+<li>CONTROLLER: Process that controls the cluster, any number of controllers 
can be started but only one will be active at any given time</li>
+<li>PARTICIPANT: Process that performs the actual task in the distributed 
system</li>
+<li>SPECTATOR: Process that observes the changes in the cluster</li>
+<li>ADMIN: To carry out system admin actions</li>
+</ul>
+</li>
+<li>zkConnectString: Connection string to ZooKeeper. This is of the form 
host1:port1,host2:port2,host3:port3</li>
+</ul>
+
+<div class="source"><pre class="prettyprint"><code>manager = 
HelixManagerFactory.getZKHelixManager(clusterName,
+                                                instanceName,
+                                                instanceType,
+                                                zkConnectString);
+</code></pre></div></section><section>
+<h3><a name="Controller_Code"></a>Controller Code</h3>
+<p>The Controller needs to know about all changes in the cluster. Helix takes 
care of this with the default implementation.
+If you need additional functionality, see GenericHelixController on how to 
configure the pipeline.</p>
+
+<div class="source"><pre class="prettyprint"><code>manager = 
HelixManagerFactory.getZKHelixManager(clusterName,
+                                                instanceName,
+                                                InstanceType.CONTROLLER,
+                                                zkConnectString);
+manager.connect();
+</code></pre></div>
+<p>The snippet above shows how the controller is started. You can also start 
the controller using command line interface.</p>
+
+<div class="source"><pre class="prettyprint"><code>cd 
helix/helix-core/target/helix-core-pkg/bin
+./run-helix-controller.sh --zkSvr &lt;Zookeeper ServerAddress (Required)&gt;  
--cluster &lt;Cluster name (Required)&gt;
+</code></pre></div></section><section>
+<h3><a name="Controller_Deployment_Modes"></a>Controller Deployment Modes</h3>
+<p>Helix provides multiple options to deploy the controller.</p><section>
+<h4><a name="STANDALONE"></a>STANDALONE</h4>
+<p>The Controller can be started as a separate process to manage a cluster. 
This is the recommended approach. However, since one controller can be a single 
point of failure, multiple controller processes are required for reliability.  
Even if multiple controllers are running, only one will be actively managing 
the cluster at any time and is decided by a leader-election process. If the 
leader fails, another leader will take over managing the cluster.</p>
+<p>Even though we recommend this method of deployment, it has the drawback of 
having to manage an additional service for each cluster. See the Controller as 
a Service option.</p></section><section>
+<h4><a name="EMBEDDED"></a>EMBEDDED</h4>
+<p>If setting up a separate controller process is not viable, then it is 
possible to embed the controller as a library in each of the 
participants.</p></section><section>
+<h4><a name="CONTROLLER_AS_A_SERVICE"></a>CONTROLLER AS A SERVICE</h4>
+<p>One of the cool features we added in Helix was to use a set of controllers 
to manage a large number of clusters.</p>
+<p>For example if you have X clusters to be managed, instead of deploying X*3 
(3 controllers for fault tolerance) controllers for each cluster, one can 
deploy just 3 controllers.  Each controller can manage X/3 clusters.  If any 
controller fails, the remaining two will manage X/2 clusters.</p>
+<p>Next, let's implement the controller.  This is the brain of the cluster.  
Helix makes sure there is exactly one active controller running the 
cluster.</p></section></section><section>
+<h3><a name="Start_the_Helix_agent"></a>Start the Helix agent</h3>
+<p>It requires the following parameters:</p>
+<ul>
+
+<li>clusterName: A logical name to represent the group of nodes</li>
+<li>instanceName: A logical name of the process creating the manager instance. 
Generally this is host:port.</li>
+<li>instanceType: Type of the process. This can be one of the following types, 
in this case use CONTROLLER:
+<ul>
+
+<li>CONTROLLER: Process that controls the cluster, any number of controllers 
can be started but only one will be active at any given time.</li>
+<li>PARTICIPANT: Process that performs the actual task in the distributed 
system.</li>
+<li>SPECTATOR: Process that observes the changes in the cluster.</li>
+<li>ADMIN: To carry out system admin actions.</li>
+</ul>
+</li>
+<li>zkConnectString: Connection string to Zookeeper. This is of the form 
host1:port1,host2:port2,host3:port3.</li>
+</ul>
+
+<div class="source"><pre class="prettyprint"><code>      manager = 
HelixManagerFactory.getZKHelixManager(clusterName,
+                                                      instanceName,
+                                                      instanceType,
+                                                      zkConnectString);
+</code></pre></div></section><section>
+<h3><a name="Controller_Code"></a>Controller Code</h3>
+<p>The Controller needs to know about all changes in the cluster. Helix takes 
care of this with the default implementation.
+If you need additional functionality, see GenericHelixController on how to 
configure the pipeline.</p>
+
+<div class="source"><pre class="prettyprint"><code>      manager = 
HelixManagerFactory.getZKHelixManager(clusterName,
+                                                          instanceName,
+                                                          
InstanceType.CONTROLLER,
+                                                          zkConnectString);
+     manager.connect();
+     GenericHelixController controller = new GenericHelixController();
+     manager.addControllerListener(controller);
+     manager.addInstanceConfigChangeListener(controller);
+     manager.addResourceConfigChangeListener(controller);
+     manager.addClusterfigChangeListener(controller);
+     manager.addLiveInstanceChangeListener(controller);
+     manager.addIdealStateChangeListener(controller);
+</code></pre></div>
+<p>The snippet above shows how the controller is started. You can also start 
the controller using command line interface.</p>
+
+<div class="source"><pre class="prettyprint"><code>cd 
helix/helix-core/target/helix-core-pkg/bin
+./run-helix-controller.sh --zkSvr &lt;Zookeeper ServerAddress (Required)&gt;  
--cluster &lt;Cluster name (Required)&gt;
+</code></pre></div></section><section>
+<h3><a name="Controller_Deployment_Modes"></a>Controller Deployment Modes</h3>
+<p>Helix provides multiple options to deploy the controller.</p><section>
+<h4><a name="STANDALONE"></a>STANDALONE</h4>
+<p>The Controller can be started as a separate process to manage a cluster. 
This is the recommended approach. However, since one controller can be a single 
point of failure, multiple controller processes are required for reliability.  
Even if multiple controllers are running, only one will be actively managing 
the cluster at any time and is decided by a leader-election process. If the 
leader fails, another leader will take over managing the cluster.</p>
+<p>Even though we recommend this method of deployment, it has the drawback of 
having to manage an additional service for each cluster. See Controller As a 
Service option.</p></section><section>
+<h4><a name="EMBEDDED"></a>EMBEDDED</h4>
+<p>If setting up a separate controller process is not viable, then it is 
possible to embed the controller as a library in each of the 
participants.</p></section><section>
+<h4><a name="CONTROLLER_AS_A_SERVICE"></a>CONTROLLER AS A SERVICE</h4>
+<p>One of the cool features we added in Helix is to use a set of controllers 
to manage a large number of clusters.</p>
+<p>For example if you have X clusters to be managed, instead of deploying X*3 
(3 controllers for fault tolerance) controllers for each cluster, one can 
deploy just 3 controllers.  Each controller can manage X/3 clusters.  If any 
controller fails, the remaining two will manage X/2 
clusters.</p></section></section></section>
+        </main>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, 
and the Apache Helix project logos are trademarks of The Apache Software 
Foundation.
+        All other marks mentioned may be trademarks or registered trademarks 
of their respective owners.</div>
+        <a 
href="https://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+      </div>
+        </div>
+      </div>
+    </footer>
+<script>
+       if(anchors) {
+         anchors.add();
+       }
+</script>
+  </body>
 </html>
\ No newline at end of file

Modified: helix/site-content/0.9.9-docs/tutorial_health.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_health.html?rev=1900184&r1=1900183&r2=1900184&view=diff
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_health.html (original)
+++ helix/site-content/0.9.9-docs/tutorial_health.html Sat Apr 23 04:22:15 2022
@@ -1,200 +1,195 @@
-
 <!DOCTYPE html>
+
+
 <!--
- Generated by Apache Maven Doxia at 2022-04-23
- Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from 
src/site/markdown/tutorial_health.md at 2022-04-23
+ | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
+    <title>Apache Helix &#x2013; Tutorial - Customizing Heath Checks</title>
+    <link rel="stylesheet" 
href="./css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+    <script src="./js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script>
+<script type="text/javascript">
+
+        var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+        })();
+
+      </script>
+  </head>
+  <body class="topBarEnabled">
+    <header id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn 
btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+            <ul class="nav">
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix 
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="download.html" title="Download">Download</a></li>
+            <li><a href="Building.html" title="Building">Building</a></li>
+            <li><a href="releasenotes/release-0.9.9.html" title="Release 
Notes">Release Notes</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="Quickstart.html" title="Quick Start">Quick 
Start</a></li>
+            <li><a href="Tutorial.html" title="Tutorial">Tutorial</a></li>
+            <li><a href="../javadocs/0.9.9" title="Javadocs">Javadocs</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager">Distributed lock manager</a></li>
+            <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit 
MQ consumer group">Rabbit MQ consumer group</a></li>
+            <li><a href="recipes/rsync_replicated_file_store.html" 
title="Rsync replicated file store">Rsync replicated file store</a></li>
+            <li><a href="recipes/service_discovery.html" title="Service 
discovery">Service discovery</a></li>
+            <li><a href="recipes/task_dag_execution.html" title="Distributed 
task DAG execution">Distributed task DAG execution</a></li>
+        </ul>
+      </li>
+            </ul>
+            <ul class="nav pull-right">
+              <li class="dropdown">
+                <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">External Links <b class="caret"></b></a>
+                <ul class="dropdown-menu">
+    <li><a href="index.html" title="Helix 0.9.9">Helix 0.9.9</a></li>
+                </ul>
+              </li>
+            </ul>
+        </div>
+      </div>
+    </header>
+    <div class="container-fluid">
+      <header>
+        <div id="banner">
+          <div class="pull-left"><a href="http://helix.apache.org/"; 
id="bannerLeft"><img src="../images/helix-logo.jpg"  alt=""/></a></div>
+          <div class="pull-right"><a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif"  alt=""/></a></div>
+          <div class="clear"><hr/></div>
+        </div>
+
+        <div id="breadcrumbs">
+          <ul class="breadcrumb">
+      <li class=""><a href="http://helix.apache.org/"; class="externalLink" 
title="Apache Helix">Apache Helix</a><span class="divider">/</span></li>
+      <li class=""><a href="../" title="Apache Helix">Apache Helix</a><span 
class="divider">/</span></li>
+      <li class=""><a href="./" title="Release 0.9.9">Release 0.9.9</a><span 
class="divider">/</span></li>
+    <li class="active ">Tutorial - Customizing Heath Checks</li>
+        <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li>
+          </ul>
+        </div>
+      </header>
+      <div class="row-fluid">
+        <header id="leftColumn" class="span2">
+          <nav class="well sidebar-nav">
+  <ul class="nav nav-list">
+   <li class="nav-header">Get Helix</li>
+    <li><a href="download.html" title="Download"><span 
class="none"></span>Download</a></li>
+    <li><a href="Building.html" title="Building"><span 
class="none"></span>Building</a></li>
+    <li><a href="releasenotes/release-0.9.9.html" title="Release Notes"><span 
class="none"></span>Release Notes</a></li>
+   <li class="nav-header">Hands-On</li>
+    <li><a href="Quickstart.html" title="Quick Start"><span 
class="none"></span>Quick Start</a></li>
+    <li><a href="Tutorial.html" title="Tutorial"><span 
class="none"></span>Tutorial</a></li>
+    <li><a href="../javadocs/0.9.9" title="Javadocs"><span 
class="none"></span>Javadocs</a></li>
+   <li class="nav-header">Recipes</li>
+    <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager"><span class="none"></span>Distributed lock manager</a></li>
+    <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ 
consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li>
+    <li><a href="recipes/rsync_replicated_file_store.html" title="Rsync 
replicated file store"><span class="none"></span>Rsync replicated file 
store</a></li>
+    <li><a href="recipes/service_discovery.html" title="Service 
discovery"><span class="none"></span>Service discovery</a></li>
+    <li><a href="recipes/task_dag_execution.html" title="Distributed task DAG 
execution"><span class="none"></span>Distributed task DAG execution</a></li>
+  </ul>
+          </nav>
+          <div class="well sidebar-nav">
+<form id="search-form" action="https://www.google.com/search"; method="get" >
+  <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+            <hr />
+            <div id="poweredBy">
+              <div class="clear"></div>
+    <div id="twitter" style="border:none; margin-top: 10px">
+    <a href="https://twitter.com/ApacheHelix"; class="twitter-follow-button" 
data-show-count="false" data-align="left" data-size="medium" 
data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a>
+    <script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+<a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </header>
+        <main id="bodyColumn"  class="span10" >
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
-<html  xml:lang="en" lang="en">
 
-       <head>
-               <meta charset="UTF-8" />
-               <title>Apache Helix &#x2013; Tutorial - Customizing Heath 
Checks</title>
-               <meta name="viewport" content="width=device-width, 
initial-scale=1.0" />
-               <meta name="description" content="" />
-               <meta http-equiv="content-language" content="en" />
-
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css";
 rel="stylesheet" />
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css";
 rel="stylesheet" />
-               <link href="./css/docs.css" rel="stylesheet" />
-               <link href="./css/reflow-skin.css" rel="stylesheet" />
-               
-               
-               <link href="./css/lightbox.css" rel="stylesheet" />
-               
-               <link href="./css/site.css" rel="stylesheet" />
-               <link href="./css/print.css" rel="stylesheet" media="print" />
-               
-               <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-               <!--[if lt IE 9]>
-                       <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
-               <![endif]-->
-               
-       </head>
-
-       <body class="page-$config.fileId project-$config.projectId" 
data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
-
-               <div class="navbar navbar-fixed-top">
-                       <div class="navbar-inner">
-                               <div class="container">
-                                       <a class="btn btn-navbar" 
data-toggle="collapse" data-target=".nav-collapse">
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                       </a>
-                                       <div class="nav-collapse">
-                                               <ul class="nav pull-right">
-                                                       <li class="active"><a 
href="" title="Helix 0.9.9">Helix 0.9.9 </a></li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Get Helix <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Download">Download </a></li>
-                                                                       <li 
class="active"><a href="" title="Building">Building </a></li>
-                                                                       <li 
class="active"><a href="" title="Release Notes">Release Notes </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Quick Start">Quick Start </a></li>
-                                                                       <li 
class="active"><a href="" title="Tutorial">Tutorial </a></li>
-                                                                       <li 
class="active"><a href="" title="Javadocs">Javadocs </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Distributed lock manager">Distributed lock 
manager </a></li>
-                                                                       <li 
class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer 
group </a></li>
-                                                                       <li 
class="active"><a href="" title="Rsync replicated file store">Rsync replicated 
file store </a></li>
-                                                                       <li 
class="active"><a href="" title="Service discovery">Service discovery </a></li>
-                                                                       <li 
class="active"><a href="" title="Distributed task DAG execution">Distributed 
task DAG execution </a></li>
-                                                               </ul>
-                                                       </li>
-                                               </ul>
-                                       </div><!--/.nav-collapse -->
-                               </div>
-                       </div>
-               </div>
-               
-       <div class="container">
-       
-       <!-- Masthead
-       ================================================== -->
-       <header class="jumbotron subhead">
-               <div class="row" id="banner">
-                       <div class="span12">
-                               <div class="pull-left">
-                                       <a href="" id="bannerLeft"><img src="" 
alt='"''"' /></a>
-                               </div>
-                               <div class="pull-right">
-                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="" alt='"''"' /></a>
-                               </div>
-                       </div>
-               </div>
-               <div>
-                       <ul class="breadcrumb">
-                               <li><a href="" title="Apache Helix">Apache 
Helix </a></li>
-                               <li class="divider">/</li>
-                               <li><a href="" title="Release 0.9.9">Release 
0.9.9 </a></li>
-                               <li class="divider">/</li>
-                               <li>Tutorial - Customizing Heath Checks</li>
-                               <li class="publishDate version-date 
pull-right">Last Published: 2022-04-23</li>
-                       </ul>
-               </div>
-       </header>
-
-       <div class="main-body">
-       <div class="row">
-               <div class="span12">
-                       <div class="body-content">
-$bodyWithHeader
-                       </div>
-               </div>
-       </div>
-       </div>
-
-       </div><!-- /container -->
-       
-       <!-- Footer
-       ================================================== -->
-       <footer class="well">
-               <div class="container">
-                       <div class="row">
-                               <div class="span9 bottom-nav">
-                                       <ul class="nav nav-list">
-                                               <li class="nav-header">Get 
Helix</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Download">Download </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Building">Building </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Release Notes">Release Notes </a>
-                                               </li>
-                                               <li 
class="nav-header">Hands-On</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Quick Start">Quick Start </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Tutorial">Tutorial </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Javadocs">Javadocs </a>
-                                               </li>
-                                               <li 
class="nav-header">Recipes</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed lock manager">Distributed lock manager </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rsync replicated file store">Rsync replicated file store </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Service discovery">Service discovery </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed task DAG execution">Distributed task DAG execution </a>
-                                               </li>
-                                       </ul>
-                               </div>
-                       </div>
-               </div>
-       </footer>
-               
-       <div class="container subfooter">
-               <div class="row">
-                       <div class="span12">
-                               <p class="pull-right"><a href="#">Back to 
top</a></p>
-                               <p class="copyright">Copyright &copy;2022 <a 
href="https://www.apache.org/";>The Apache Software Foundation</a>. All Rights 
Reserved.</p>
-                               <p><a 
href="http://github.com/andriusvelykis/reflow-maven-skin"; title="Reflow Maven 
skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt"; 
target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
-                                       </div>
-               </div>
-       </div>
-
-       <!-- Le javascript
-       ================================================== -->
-       <!-- Placed at the end of the document so the pages load faster -->
-
-       <!-- Fallback jQuery loading from Google CDN:
-            
http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go
 -->
-       <script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";></script>
-       <script type="text/javascript">
-               if (typeof jQuery == 'undefined')
-               {
-                       document.write(unescape("%3Cscript 
src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
-               }
-       </script>
-       
-       <script 
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js";></script>
-       <script src="./js/lightbox.js"></script>
-       <script src="./js/jquery.smooth-scroll.min.js"></script>
-       <!-- back button support for smooth scroll -->
-       <script src="./js/jquery.ba-bbq.min.js"></script>
-
-       <script src="./js/reflow-skin.js"></script>
-       
-       </body>
+<section>
+<h2><a name="Helix_Tutorial:_Customizing_Health_Checks"></a><a 
href="./Tutorial.html">Helix Tutorial</a>: Customizing Health Checks</h2>
+<p>In this chapter, we'll learn how to customize health checks based on 
metrics of your distributed system.</p><section>
+<h3><a name="Health_Checks"></a>Health Checks</h3>
+<p>Note: <i>this in currently in development mode, not yet ready for 
production.</i></p>
+<p>Helix provides the ability for each node in the system to report health 
metrics on a periodic basis.</p>
+<p>Helix supports multiple ways to aggregate these metrics:</p>
+<ul>
+
+<li>SUM</li>
+<li>AVG</li>
+<li>EXPONENTIAL DECAY</li>
+<li>WINDOW</li>
+</ul>
+<p>Helix persists the aggregated value only.</p>
+<p>Applications can define a threshold on the aggregate values according to 
the SLAs, and when the SLA is violated Helix will fire an alert.
+Currently Helix only fires an alert, but in a future release we plan to use 
these metrics to either mark the node dead or load balance the partitions.
+This feature will be valuable for distributed systems that support 
multi-tenancy and have a large variation in work load patterns.  In addition, 
this can be used to detect skewed partitions (hotspots) and rebalance the 
cluster.</p></section></section>
+        </main>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, 
and the Apache Helix project logos are trademarks of The Apache Software 
Foundation.
+        All other marks mentioned may be trademarks or registered trademarks 
of their respective owners.</div>
+        <a 
href="https://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+      </div>
+        </div>
+      </div>
+    </footer>
+<script>
+       if(anchors) {
+         anchors.add();
+       }
+</script>
+  </body>
 </html>
\ No newline at end of file

Modified: helix/site-content/0.9.9-docs/tutorial_messaging.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_messaging.html?rev=1900184&r1=1900183&r2=1900184&view=diff
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_messaging.html (original)
+++ helix/site-content/0.9.9-docs/tutorial_messaging.html Sat Apr 23 04:22:15 
2022
@@ -1,200 +1,218 @@
-
 <!DOCTYPE html>
+
+
 <!--
- Generated by Apache Maven Doxia at 2022-04-23
- Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from 
src/site/markdown/tutorial_messaging.md at 2022-04-23
+ | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
+    <title>Apache Helix &#x2013; Tutorial - Messaging</title>
+    <link rel="stylesheet" 
href="./css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+    <script src="./js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script>
+<script type="text/javascript">
+
+        var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+        })();
+
+      </script>
+  </head>
+  <body class="topBarEnabled">
+    <header id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn 
btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+            <ul class="nav">
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix 
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="download.html" title="Download">Download</a></li>
+            <li><a href="Building.html" title="Building">Building</a></li>
+            <li><a href="releasenotes/release-0.9.9.html" title="Release 
Notes">Release Notes</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="Quickstart.html" title="Quick Start">Quick 
Start</a></li>
+            <li><a href="Tutorial.html" title="Tutorial">Tutorial</a></li>
+            <li><a href="../javadocs/0.9.9" title="Javadocs">Javadocs</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager">Distributed lock manager</a></li>
+            <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit 
MQ consumer group">Rabbit MQ consumer group</a></li>
+            <li><a href="recipes/rsync_replicated_file_store.html" 
title="Rsync replicated file store">Rsync replicated file store</a></li>
+            <li><a href="recipes/service_discovery.html" title="Service 
discovery">Service discovery</a></li>
+            <li><a href="recipes/task_dag_execution.html" title="Distributed 
task DAG execution">Distributed task DAG execution</a></li>
+        </ul>
+      </li>
+            </ul>
+            <ul class="nav pull-right">
+              <li class="dropdown">
+                <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">External Links <b class="caret"></b></a>
+                <ul class="dropdown-menu">
+    <li><a href="index.html" title="Helix 0.9.9">Helix 0.9.9</a></li>
+                </ul>
+              </li>
+            </ul>
+        </div>
+      </div>
+    </header>
+    <div class="container-fluid">
+      <header>
+        <div id="banner">
+          <div class="pull-left"><a href="http://helix.apache.org/"; 
id="bannerLeft"><img src="../images/helix-logo.jpg"  alt=""/></a></div>
+          <div class="pull-right"><a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif"  alt=""/></a></div>
+          <div class="clear"><hr/></div>
+        </div>
+
+        <div id="breadcrumbs">
+          <ul class="breadcrumb">
+      <li class=""><a href="http://helix.apache.org/"; class="externalLink" 
title="Apache Helix">Apache Helix</a><span class="divider">/</span></li>
+      <li class=""><a href="../" title="Apache Helix">Apache Helix</a><span 
class="divider">/</span></li>
+      <li class=""><a href="./" title="Release 0.9.9">Release 0.9.9</a><span 
class="divider">/</span></li>
+    <li class="active ">Tutorial - Messaging</li>
+        <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li>
+          </ul>
+        </div>
+      </header>
+      <div class="row-fluid">
+        <header id="leftColumn" class="span2">
+          <nav class="well sidebar-nav">
+  <ul class="nav nav-list">
+   <li class="nav-header">Get Helix</li>
+    <li><a href="download.html" title="Download"><span 
class="none"></span>Download</a></li>
+    <li><a href="Building.html" title="Building"><span 
class="none"></span>Building</a></li>
+    <li><a href="releasenotes/release-0.9.9.html" title="Release Notes"><span 
class="none"></span>Release Notes</a></li>
+   <li class="nav-header">Hands-On</li>
+    <li><a href="Quickstart.html" title="Quick Start"><span 
class="none"></span>Quick Start</a></li>
+    <li><a href="Tutorial.html" title="Tutorial"><span 
class="none"></span>Tutorial</a></li>
+    <li><a href="../javadocs/0.9.9" title="Javadocs"><span 
class="none"></span>Javadocs</a></li>
+   <li class="nav-header">Recipes</li>
+    <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager"><span class="none"></span>Distributed lock manager</a></li>
+    <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ 
consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li>
+    <li><a href="recipes/rsync_replicated_file_store.html" title="Rsync 
replicated file store"><span class="none"></span>Rsync replicated file 
store</a></li>
+    <li><a href="recipes/service_discovery.html" title="Service 
discovery"><span class="none"></span>Service discovery</a></li>
+    <li><a href="recipes/task_dag_execution.html" title="Distributed task DAG 
execution"><span class="none"></span>Distributed task DAG execution</a></li>
+  </ul>
+          </nav>
+          <div class="well sidebar-nav">
+<form id="search-form" action="https://www.google.com/search"; method="get" >
+  <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+            <hr />
+            <div id="poweredBy">
+              <div class="clear"></div>
+    <div id="twitter" style="border:none; margin-top: 10px">
+    <a href="https://twitter.com/ApacheHelix"; class="twitter-follow-button" 
data-show-count="false" data-align="left" data-size="medium" 
data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a>
+    <script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+<a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </header>
+        <main id="bodyColumn"  class="span10" >
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
-<html  xml:lang="en" lang="en">
 
-       <head>
-               <meta charset="UTF-8" />
-               <title>Apache Helix &#x2013; Tutorial - Messaging</title>
-               <meta name="viewport" content="width=device-width, 
initial-scale=1.0" />
-               <meta name="description" content="" />
-               <meta http-equiv="content-language" content="en" />
-
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css";
 rel="stylesheet" />
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css";
 rel="stylesheet" />
-               <link href="./css/docs.css" rel="stylesheet" />
-               <link href="./css/reflow-skin.css" rel="stylesheet" />
-               
-               
-               <link href="./css/lightbox.css" rel="stylesheet" />
-               
-               <link href="./css/site.css" rel="stylesheet" />
-               <link href="./css/print.css" rel="stylesheet" media="print" />
-               
-               <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-               <!--[if lt IE 9]>
-                       <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
-               <![endif]-->
-               
-       </head>
-
-       <body class="page-$config.fileId project-$config.projectId" 
data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
-
-               <div class="navbar navbar-fixed-top">
-                       <div class="navbar-inner">
-                               <div class="container">
-                                       <a class="btn btn-navbar" 
data-toggle="collapse" data-target=".nav-collapse">
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                       </a>
-                                       <div class="nav-collapse">
-                                               <ul class="nav pull-right">
-                                                       <li class="active"><a 
href="" title="Helix 0.9.9">Helix 0.9.9 </a></li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Get Helix <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Download">Download </a></li>
-                                                                       <li 
class="active"><a href="" title="Building">Building </a></li>
-                                                                       <li 
class="active"><a href="" title="Release Notes">Release Notes </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Quick Start">Quick Start </a></li>
-                                                                       <li 
class="active"><a href="" title="Tutorial">Tutorial </a></li>
-                                                                       <li 
class="active"><a href="" title="Javadocs">Javadocs </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Distributed lock manager">Distributed lock 
manager </a></li>
-                                                                       <li 
class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer 
group </a></li>
-                                                                       <li 
class="active"><a href="" title="Rsync replicated file store">Rsync replicated 
file store </a></li>
-                                                                       <li 
class="active"><a href="" title="Service discovery">Service discovery </a></li>
-                                                                       <li 
class="active"><a href="" title="Distributed task DAG execution">Distributed 
task DAG execution </a></li>
-                                                               </ul>
-                                                       </li>
-                                               </ul>
-                                       </div><!--/.nav-collapse -->
-                               </div>
-                       </div>
-               </div>
-               
-       <div class="container">
-       
-       <!-- Masthead
-       ================================================== -->
-       <header class="jumbotron subhead">
-               <div class="row" id="banner">
-                       <div class="span12">
-                               <div class="pull-left">
-                                       <a href="" id="bannerLeft"><img src="" 
alt='"''"' /></a>
-                               </div>
-                               <div class="pull-right">
-                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="" alt='"''"' /></a>
-                               </div>
-                       </div>
-               </div>
-               <div>
-                       <ul class="breadcrumb">
-                               <li><a href="" title="Apache Helix">Apache 
Helix </a></li>
-                               <li class="divider">/</li>
-                               <li><a href="" title="Release 0.9.9">Release 
0.9.9 </a></li>
-                               <li class="divider">/</li>
-                               <li>Tutorial - Messaging</li>
-                               <li class="publishDate version-date 
pull-right">Last Published: 2022-04-23</li>
-                       </ul>
-               </div>
-       </header>
-
-       <div class="main-body">
-       <div class="row">
-               <div class="span12">
-                       <div class="body-content">
-$bodyWithHeader
-                       </div>
-               </div>
-       </div>
-       </div>
-
-       </div><!-- /container -->
-       
-       <!-- Footer
-       ================================================== -->
-       <footer class="well">
-               <div class="container">
-                       <div class="row">
-                               <div class="span9 bottom-nav">
-                                       <ul class="nav nav-list">
-                                               <li class="nav-header">Get 
Helix</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Download">Download </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Building">Building </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Release Notes">Release Notes </a>
-                                               </li>
-                                               <li 
class="nav-header">Hands-On</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Quick Start">Quick Start </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Tutorial">Tutorial </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Javadocs">Javadocs </a>
-                                               </li>
-                                               <li 
class="nav-header">Recipes</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed lock manager">Distributed lock manager </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rsync replicated file store">Rsync replicated file store </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Service discovery">Service discovery </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed task DAG execution">Distributed task DAG execution </a>
-                                               </li>
-                                       </ul>
-                               </div>
-                       </div>
-               </div>
-       </footer>
-               
-       <div class="container subfooter">
-               <div class="row">
-                       <div class="span12">
-                               <p class="pull-right"><a href="#">Back to 
top</a></p>
-                               <p class="copyright">Copyright &copy;2022 <a 
href="https://www.apache.org/";>The Apache Software Foundation</a>. All Rights 
Reserved.</p>
-                               <p><a 
href="http://github.com/andriusvelykis/reflow-maven-skin"; title="Reflow Maven 
skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt"; 
target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
-                                       </div>
-               </div>
-       </div>
-
-       <!-- Le javascript
-       ================================================== -->
-       <!-- Placed at the end of the document so the pages load faster -->
-
-       <!-- Fallback jQuery loading from Google CDN:
-            
http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go
 -->
-       <script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";></script>
-       <script type="text/javascript">
-               if (typeof jQuery == 'undefined')
-               {
-                       document.write(unescape("%3Cscript 
src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
-               }
-       </script>
-       
-       <script 
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js";></script>
-       <script src="./js/lightbox.js"></script>
-       <script src="./js/jquery.smooth-scroll.min.js"></script>
-       <!-- back button support for smooth scroll -->
-       <script src="./js/jquery.ba-bbq.min.js"></script>
-
-       <script src="./js/reflow-skin.js"></script>
-       
-       </body>
+<section>
+<h2><a name="Helix_Tutorial:_Messaging"></a><a href="./Tutorial.html">Helix 
Tutorial</a>: Messaging</h2>
+<p>In this chapter, we'll learn about messaging, a convenient feature in Helix 
for sending messages between nodes of a cluster.  This is an interesting 
feature that is quite useful in practice. It is common that nodes in a 
distributed system require a mechanism to interact with each other.</p><section>
+<h3><a name="Example:_Bootstrapping_a_Replica"></a>Example: Bootstrapping a 
Replica</h3>
+<p>Consider a search system  where the index replica starts up and it does not 
have an index. A typical solution is to get the index from a common location, 
or to copy the index from another replica.</p>
+<p>Helix provides a messaging API for intra-cluster communication between 
nodes in the system.  This API provides a mechanism to specify the message 
recipient in terms of resource, partition, and state rather than specifying 
hostnames.  Helix ensures that the message is delivered to all of the required 
recipients. In this particular use case, the instance can specify the recipient 
criteria as all replicas of the desired partition to bootstrap.
+Since Helix is aware of the global state of the system, it can send the 
message to the appropriate nodes. Once the nodes respond, Helix provides the 
bootstrapping replica with all the responses.</p>
+<p>This is a very generic API and can also be used to schedule various 
periodic tasks in the cluster, such as data backups, log cleanup, etc.
+System Admins can also perform ad-hoc tasks, such as on-demand backups or a 
system command (such as rm -rf ;) across all nodes of the cluster</p>
+
+<div class="source"><pre class="prettyprint"><code>ClusterMessagingService 
messagingService = manager.getMessagingService();
+
+// Construct the Message
+Message requestBackupUriRequest = new Message(
+    MessageType.USER_DEFINE_MSG, UUID.randomUUID().toString());
+requestBackupUriRequest
+    .setMsgSubType(BootstrapProcess.REQUEST_BOOTSTRAP_URL);
+requestBackupUriRequest.setMsgState(MessageState.NEW);
+
+// Set the Recipient criteria: all nodes that satisfy the criteria will 
receive the message
+Criteria recipientCriteria = new Criteria();
+recipientCriteria.setInstanceName(&quot;%&quot;);
+recipientCriteria.setRecipientInstanceType(InstanceType.PARTICIPANT);
+recipientCriteria.setResource(&quot;MyDB&quot;);
+recipientCriteria.setPartition(&quot;&quot;);
+
+// Should be processed only by process(es) that are active at the time of 
sending the message
+// This means if the recipient is restarted after message is sent, it will not 
be processe.
+recipientCriteria.setSessionSpecific(true);
+
+// wait for 30 seconds
+int timeout = 30000;
+
+// the handler that will be invoked when any recipient responds to the message.
+BootstrapReplyHandler responseHandler = new BootstrapReplyHandler();
+
+// this will return only after all recipients respond or after timeout
+int sentMessageCount = messagingService.sendAndWait(recipientCriteria,
+    requestBackupUriRequest, responseHandler, timeout);
+</code></pre></div>
+<p>See HelixManager.DefaultMessagingService in the <a class="externalLink" 
href="http://helix.apache.org/javadocs/0.9.9/reference/org/apache/helix/messaging/DefaultMessagingService.html";>Javadocs</a>
 for more information.</p></section></section>
+        </main>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, 
and the Apache Helix project logos are trademarks of The Apache Software 
Foundation.
+        All other marks mentioned may be trademarks or registered trademarks 
of their respective owners.</div>
+        <a 
href="https://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+      </div>
+        </div>
+      </div>
+    </footer>
+<script>
+       if(anchors) {
+         anchors.add();
+       }
+</script>
+  </body>
 </html>
\ No newline at end of file

Modified: helix/site-content/0.9.9-docs/tutorial_participant.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_participant.html?rev=1900184&r1=1900183&r2=1900184&view=diff
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_participant.html (original)
+++ helix/site-content/0.9.9-docs/tutorial_participant.html Sat Apr 23 04:22:15 
2022
@@ -1,200 +1,254 @@
-
 <!DOCTYPE html>
+
+
 <!--
- Generated by Apache Maven Doxia at 2022-04-23
- Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from 
src/site/markdown/tutorial_participant.md at 2022-04-23
+ | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
+    <title>Apache Helix &#x2013; Tutorial - Participant</title>
+    <link rel="stylesheet" 
href="./css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+    <script src="./js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script>
+<script type="text/javascript">
+
+        var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+        })();
+
+      </script>
+  </head>
+  <body class="topBarEnabled">
+    <header id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn 
btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+            <ul class="nav">
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix 
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="download.html" title="Download">Download</a></li>
+            <li><a href="Building.html" title="Building">Building</a></li>
+            <li><a href="releasenotes/release-0.9.9.html" title="Release 
Notes">Release Notes</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="Quickstart.html" title="Quick Start">Quick 
Start</a></li>
+            <li><a href="Tutorial.html" title="Tutorial">Tutorial</a></li>
+            <li><a href="../javadocs/0.9.9" title="Javadocs">Javadocs</a></li>
+        </ul>
+      </li>
+      <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b 
class="caret"></b></a>
+        <ul class="dropdown-menu">
+            <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager">Distributed lock manager</a></li>
+            <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit 
MQ consumer group">Rabbit MQ consumer group</a></li>
+            <li><a href="recipes/rsync_replicated_file_store.html" 
title="Rsync replicated file store">Rsync replicated file store</a></li>
+            <li><a href="recipes/service_discovery.html" title="Service 
discovery">Service discovery</a></li>
+            <li><a href="recipes/task_dag_execution.html" title="Distributed 
task DAG execution">Distributed task DAG execution</a></li>
+        </ul>
+      </li>
+            </ul>
+            <ul class="nav pull-right">
+              <li class="dropdown">
+                <a href="#" class="dropdown-toggle" 
data-toggle="dropdown">External Links <b class="caret"></b></a>
+                <ul class="dropdown-menu">
+    <li><a href="index.html" title="Helix 0.9.9">Helix 0.9.9</a></li>
+                </ul>
+              </li>
+            </ul>
+        </div>
+      </div>
+    </header>
+    <div class="container-fluid">
+      <header>
+        <div id="banner">
+          <div class="pull-left"><a href="http://helix.apache.org/"; 
id="bannerLeft"><img src="../images/helix-logo.jpg"  alt=""/></a></div>
+          <div class="pull-right"><a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif"  alt=""/></a></div>
+          <div class="clear"><hr/></div>
+        </div>
+
+        <div id="breadcrumbs">
+          <ul class="breadcrumb">
+      <li class=""><a href="http://helix.apache.org/"; class="externalLink" 
title="Apache Helix">Apache Helix</a><span class="divider">/</span></li>
+      <li class=""><a href="../" title="Apache Helix">Apache Helix</a><span 
class="divider">/</span></li>
+      <li class=""><a href="./" title="Release 0.9.9">Release 0.9.9</a><span 
class="divider">/</span></li>
+    <li class="active ">Tutorial - Participant</li>
+        <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li>
+          </ul>
+        </div>
+      </header>
+      <div class="row-fluid">
+        <header id="leftColumn" class="span2">
+          <nav class="well sidebar-nav">
+  <ul class="nav nav-list">
+   <li class="nav-header">Get Helix</li>
+    <li><a href="download.html" title="Download"><span 
class="none"></span>Download</a></li>
+    <li><a href="Building.html" title="Building"><span 
class="none"></span>Building</a></li>
+    <li><a href="releasenotes/release-0.9.9.html" title="Release Notes"><span 
class="none"></span>Release Notes</a></li>
+   <li class="nav-header">Hands-On</li>
+    <li><a href="Quickstart.html" title="Quick Start"><span 
class="none"></span>Quick Start</a></li>
+    <li><a href="Tutorial.html" title="Tutorial"><span 
class="none"></span>Tutorial</a></li>
+    <li><a href="../javadocs/0.9.9" title="Javadocs"><span 
class="none"></span>Javadocs</a></li>
+   <li class="nav-header">Recipes</li>
+    <li><a href="recipes/lock_manager.html" title="Distributed lock 
manager"><span class="none"></span>Distributed lock manager</a></li>
+    <li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ 
consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li>
+    <li><a href="recipes/rsync_replicated_file_store.html" title="Rsync 
replicated file store"><span class="none"></span>Rsync replicated file 
store</a></li>
+    <li><a href="recipes/service_discovery.html" title="Service 
discovery"><span class="none"></span>Service discovery</a></li>
+    <li><a href="recipes/task_dag_execution.html" title="Distributed task DAG 
execution"><span class="none"></span>Distributed task DAG execution</a></li>
+  </ul>
+          </nav>
+          <div class="well sidebar-nav">
+<form id="search-form" action="https://www.google.com/search"; method="get" >
+  <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+            <hr />
+            <div id="poweredBy">
+              <div class="clear"></div>
+    <div id="twitter" style="border:none; margin-top: 10px">
+    <a href="https://twitter.com/ApacheHelix"; class="twitter-follow-button" 
data-show-count="false" data-align="left" data-size="medium" 
data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a>
+    <script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+<a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="./images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </header>
+        <main id="bodyColumn"  class="span10" >
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
-<html  xml:lang="en" lang="en">
 
-       <head>
-               <meta charset="UTF-8" />
-               <title>Apache Helix &#x2013; Tutorial - Participant</title>
-               <meta name="viewport" content="width=device-width, 
initial-scale=1.0" />
-               <meta name="description" content="" />
-               <meta http-equiv="content-language" content="en" />
-
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css";
 rel="stylesheet" />
-               <link 
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css";
 rel="stylesheet" />
-               <link href="./css/docs.css" rel="stylesheet" />
-               <link href="./css/reflow-skin.css" rel="stylesheet" />
-               
-               
-               <link href="./css/lightbox.css" rel="stylesheet" />
-               
-               <link href="./css/site.css" rel="stylesheet" />
-               <link href="./css/print.css" rel="stylesheet" media="print" />
-               
-               <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-               <!--[if lt IE 9]>
-                       <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js";></script>
-               <![endif]-->
-               
-       </head>
-
-       <body class="page-$config.fileId project-$config.projectId" 
data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
-
-               <div class="navbar navbar-fixed-top">
-                       <div class="navbar-inner">
-                               <div class="container">
-                                       <a class="btn btn-navbar" 
data-toggle="collapse" data-target=".nav-collapse">
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                               <span class="icon-bar"></span>
-                                       </a>
-                                       <div class="nav-collapse">
-                                               <ul class="nav pull-right">
-                                                       <li class="active"><a 
href="" title="Helix 0.9.9">Helix 0.9.9 </a></li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Get Helix <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Download">Download </a></li>
-                                                                       <li 
class="active"><a href="" title="Building">Building </a></li>
-                                                                       <li 
class="active"><a href="" title="Release Notes">Release Notes </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Hands-On <b 
class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Quick Start">Quick Start </a></li>
-                                                                       <li 
class="active"><a href="" title="Tutorial">Tutorial </a></li>
-                                                                       <li 
class="active"><a href="" title="Javadocs">Javadocs </a></li>
-                                                               </ul>
-                                                       </li>
-                                                       <li class="dropdown 
active">
-                                                               <a href="#" 
class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
-                                                               <ul 
class="dropdown-menu">
-                                                                       <li 
class="active"><a href="" title="Distributed lock manager">Distributed lock 
manager </a></li>
-                                                                       <li 
class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer 
group </a></li>
-                                                                       <li 
class="active"><a href="" title="Rsync replicated file store">Rsync replicated 
file store </a></li>
-                                                                       <li 
class="active"><a href="" title="Service discovery">Service discovery </a></li>
-                                                                       <li 
class="active"><a href="" title="Distributed task DAG execution">Distributed 
task DAG execution </a></li>
-                                                               </ul>
-                                                       </li>
-                                               </ul>
-                                       </div><!--/.nav-collapse -->
-                               </div>
-                       </div>
-               </div>
-               
-       <div class="container">
-       
-       <!-- Masthead
-       ================================================== -->
-       <header class="jumbotron subhead">
-               <div class="row" id="banner">
-                       <div class="span12">
-                               <div class="pull-left">
-                                       <a href="" id="bannerLeft"><img src="" 
alt='"''"' /></a>
-                               </div>
-                               <div class="pull-right">
-                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="" alt='"''"' /></a>
-                               </div>
-                       </div>
-               </div>
-               <div>
-                       <ul class="breadcrumb">
-                               <li><a href="" title="Apache Helix">Apache 
Helix </a></li>
-                               <li class="divider">/</li>
-                               <li><a href="" title="Release 0.9.9">Release 
0.9.9 </a></li>
-                               <li class="divider">/</li>
-                               <li>Tutorial - Participant</li>
-                               <li class="publishDate version-date 
pull-right">Last Published: 2022-04-23</li>
-                       </ul>
-               </div>
-       </header>
-
-       <div class="main-body">
-       <div class="row">
-               <div class="span12">
-                       <div class="body-content">
-$bodyWithHeader
-                       </div>
-               </div>
-       </div>
-       </div>
-
-       </div><!-- /container -->
-       
-       <!-- Footer
-       ================================================== -->
-       <footer class="well">
-               <div class="container">
-                       <div class="row">
-                               <div class="span9 bottom-nav">
-                                       <ul class="nav nav-list">
-                                               <li class="nav-header">Get 
Helix</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Download">Download </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Building">Building </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Release Notes">Release Notes </a>
-                                               </li>
-                                               <li 
class="nav-header">Hands-On</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Quick Start">Quick Start </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Tutorial">Tutorial </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Javadocs">Javadocs </a>
-                                               </li>
-                                               <li 
class="nav-header">Recipes</li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed lock manager">Distributed lock manager </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Rsync replicated file store">Rsync replicated file store </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Service discovery">Service discovery </a>
-                                               </li>
-                                               <li class="active">
-                                                       <a href="#" 
title="Distributed task DAG execution">Distributed task DAG execution </a>
-                                               </li>
-                                       </ul>
-                               </div>
-                       </div>
-               </div>
-       </footer>
-               
-       <div class="container subfooter">
-               <div class="row">
-                       <div class="span12">
-                               <p class="pull-right"><a href="#">Back to 
top</a></p>
-                               <p class="copyright">Copyright &copy;2022 <a 
href="https://www.apache.org/";>The Apache Software Foundation</a>. All Rights 
Reserved.</p>
-                               <p><a 
href="http://github.com/andriusvelykis/reflow-maven-skin"; title="Reflow Maven 
skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt"; 
target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
-                                       </div>
-               </div>
-       </div>
-
-       <!-- Le javascript
-       ================================================== -->
-       <!-- Placed at the end of the document so the pages load faster -->
-
-       <!-- Fallback jQuery loading from Google CDN:
-            
http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go
 -->
-       <script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";></script>
-       <script type="text/javascript">
-               if (typeof jQuery == 'undefined')
-               {
-                       document.write(unescape("%3Cscript 
src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
-               }
-       </script>
-       
-       <script 
src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js";></script>
-       <script src="./js/lightbox.js"></script>
-       <script src="./js/jquery.smooth-scroll.min.js"></script>
-       <!-- back button support for smooth scroll -->
-       <script src="./js/jquery.ba-bbq.min.js"></script>
-
-       <script src="./js/reflow-skin.js"></script>
-       
-       </body>
+<section>
+<h2><a name="Helix_Tutorial:_Participant"></a><a href="./Tutorial.html">Helix 
Tutorial</a>: Participant</h2>
+<p>In this chapter, we'll learn how to implement a <b>Participant</b>, which 
is a primary functional component of a distributed system.</p><section>
+<h3><a name="Start_a_Connection"></a>Start a Connection</h3>
+<p>The Helix manager is a common component that connects each system component 
with the controller.</p>
+<p>It requires the following parameters:</p>
+<ul>
+
+<li>clusterName: A logical name to represent the group of nodes</li>
+<li>instanceName: A logical name of the process creating the manager instance. 
Generally this is host:port</li>
+<li>instanceType: Type of the process. This can be one of the following types, 
in this case, use PARTICIPANT
+<ul>
+
+<li>CONTROLLER: Process that controls the cluster, any number of controllers 
can be started but only one will be active at any given time</li>
+<li>PARTICIPANT: Process that performs the actual task in the distributed 
system</li>
+<li>SPECTATOR: Process that observes the changes in the cluster</li>
+<li>ADMIN: To carry out system admin actions</li>
+</ul>
+</li>
+<li>zkConnectString: Connection string to ZooKeeper. This is of the form 
host1:port1,host2:port2,host3:port3</li>
+</ul>
+<p>After the Helix manager instance is created, the only thing that needs to 
be registered is the state model factory.
+The methods of the state model will be called when controller sends 
transitions to the participant.  In this example, we'll use the OnlineOffline 
factory.  Other options include:</p>
+<ul>
+
+<li>MasterSlaveStateModelFactory</li>
+<li>LeaderStandbyStateModelFactory</li>
+<li>BootstrapHandler</li>
+</ul>
+
+<div class="source"><pre class="prettyprint"><code>manager = 
HelixManagerFactory.getZKHelixManager(clusterName,
+                                                instanceName,
+                                                InstanceType.PARTICIPANT,
+                                                zkConnectString);
+StateMachineEngine stateMach = manager.getStateMachineEngine();
+
+//create a stateModelFactory that returns a statemodel object for each 
partition.
+stateModelFactory = new OnlineOfflineStateModelFactory();
+stateMach.registerStateModelFactory(stateModelType, stateModelFactory);
+manager.connect();
+</code></pre></div></section><section>
+<h3><a name="Example_State_Model_Factory"></a>Example State Model Factory</h3>
+<p>Helix doesn't know what it means to change from OFFLINE--&gt;ONLINE or 
ONLINE--&gt;OFFLINE.  The following code snippet shows where you insert your 
system logic for these two state transitions.</p>
+
+<div class="source"><pre class="prettyprint"><code>public class 
OnlineOfflineStateModelFactory extends
+    StateModelFactory&lt;StateModel&gt; {
+  @Override
+  public StateModel createNewStateModel(String stateUnitKey) {
+    OnlineOfflineStateModel stateModel = new OnlineOfflineStateModel();
+    return stateModel;
+  }
+  @StateModelInfo(states = &quot;{'OFFLINE','ONLINE'}&quot;, initialState = 
&quot;OFFINE&quot;)
+  public static class OnlineOfflineStateModel extends StateModel {
+    @Transition(from = &quot;OFFLINE&quot;, to = &quot;ONLINE&quot;)
+    public void onBecomeOnlineFromOffline(Message message,
+        NotificationContext context) {
+      
System.out.println(&quot;OnlineOfflineStateModel.onBecomeOnlineFromOffline()&quot;);
+
+      
////////////////////////////////////////////////////////////////////////////////////////////////
+      // Application logic to handle transition                                
                     //
+      // For example, you might start a service, run initialization, etc       
                     //
+      
////////////////////////////////////////////////////////////////////////////////////////////////
+    }
+
+    @Transition(from = &quot;ONLINE&quot;, to = &quot;OFFLINE&quot;)
+    public void onBecomeOfflineFromOnline(Message message,
+        NotificationContext context) {
+      
System.out.println(&quot;OnlineOfflineStateModel.onBecomeOfflineFromOnline()&quot;);
+
+      
////////////////////////////////////////////////////////////////////////////////////////////////
+      // Application logic to handle transition                                
                     //
+      // For example, you might shutdown a service, log this event, or change 
monitoring settings   //
+      
////////////////////////////////////////////////////////////////////////////////////////////////
+    }
+  }
+}
+</code></pre></div></section></section>
+        </main>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, 
and the Apache Helix project logos are trademarks of The Apache Software 
Foundation.
+        All other marks mentioned may be trademarks or registered trademarks 
of their respective owners.</div>
+        <a 
href="https://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+      </div>
+        </div>
+      </div>
+    </footer>
+<script>
+       if(anchors) {
+         anchors.add();
+       }
+</script>
+  </body>
 </html>
\ No newline at end of file


Reply via email to