Added: helix/site-content/0.9.9-docs/tutorial_cloud_support.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_cloud_support.html?rev=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_cloud_support.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_cloud_support.html Fri Nov 20 
21:14:57 2020
@@ -0,0 +1,473 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Apache Helix -   Tutorial - Cloud Support</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="./css/bootstrap.min.css" rel="stylesheet" />
+               <link href="./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]-->
+               
+<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="page-tutorial_cloud_support project-099-docs" 
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>
+                                       <a class="brand" href="..">Apache 
Helix</a>
+                                       <div class="nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li><a 
href="index.html" title="Helix 0.9.9">Helix 0.9.9 </a></li>
+                                                       <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>
+                                       </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="../images/helix-logo.jpg" alt='"''"' /></a>
+                                       <p class="lead">A cluster management 
framework for partitioned and replicated distributed resources</p>
+                               </div>
+                               <div class="pull-right">
+                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif" 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 - Cloud Support</li>
+                               <li class="publishDate version-date 
pull-right">Last Published: 2020-11-20</li>
+                       </ul>
+               </div>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<!-- -
+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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Cloud_Support"><a href="./Tutorial.html">Helix 
Tutorial</a>: Cloud Support</h2>
+ </div> 
+ <p>There are emerging cases to use Helix in a cloud environment, especially 
in those well-known public cloud, e.g. Azure, AWS, GCP, etc. Compared to 
previous on premise use cases, Helix has faced both challenges and 
opportunities in providing cloud related support. </p> 
+ <p>As a first step, Helix implemented the support for participant auto 
registration in a cloud environment, which leverages the common feature of 
public cloud and facilitates Helix users when they need to create a cluster and 
register the participants to the cluster.</p> 
+ <p>After a Helix cluster is created, there are two ways to add instances (or 
participants, we will use them interchangeably in this tutorial) to the 
cluster. One is manual add, where users call their own scripts to add instance 
config to the cluster for each participant; and the other is auto join, where 
users set the auto join config of the cluster to be true, and each participant 
populates its own hostname, port number, and other information in instance 
config during connection. However, in an on premise environment, the auto join 
only works perfectly when users use Helix in a non rack-aware environment, 
meaning there is no fault domain concept. For a rack-aware environment, users 
still need to manually input the domain information to the instance config as 
it is hard for each participant to get its own fault domain information. 
Considering most users would use Helix in a rack-aware environment, it means 
manual work is still required.</p> 
+ <p>In a cloud environment, there is a good opportunity to achieve full 
automation as public cloud providers give domain information to each individual 
instance through a metadata endpoint. All of the above mentioned public cloud 
providers use a unique non-routable IP address (169.254.169.254) for this 
purpose. It can be accessed only from within the instance to retrieve the 
instance metadata information, which you can use to configure or manage the 
running instance. </p> 
+ <p>More specifically, in AWS, Azure, and GCP, the query to the fixed IP 
address <a class="externalLink" 
href="http://169.254.169.254/";>http://169.254.169.254/</a> inside each instance 
will return its metadata information that contains domain information. In AWS, 
the field is named as “placement”; in Azure, the field is named as 
“PlatformUpdateDomain”; and in GCP, the field is named as “zone”. It is 
usually just an integer denoting which fault domain the instance belongs to. 
This particular feature of public cloud is leveraged by Helix in cluster 
creation and partition registration process. </p> 
+ <div class="section"> 
+  <h3 id="What_Helix_Provides_for_Cloud_Environment">What Helix Provides for 
Cloud Environment</h3> 
+  <ul> 
+   <li>Provide definition of Helix cloud configs at cluster level and 
participant level</li> 
+   <li>Provide enhanced REST and Java APIs for cluster creation and cloud 
config update</li> 
+   <li>Provide generic interface for fetching and parsing cloud instance 
information</li> 
+   <li>Provide the implementation of Azure cloud instance information 
processor</li> 
+   <li>Provide the implementation of participant auto registration logic</li> 
+  </ul> 
+ </div> 
+ <div class="section"> 
+  <h3 id="How_to_Use_Cloud_Support">How to Use Cloud Support</h3> 
+  <p>First of all, you need to make sure that your environment is indeed a 
cloud environment. Otherwise, all the assumptions in this support will not 
hold. Then depending on what kind of cloud environment you are in, you will 
need to perform some or all of the following steps.</p> 
+  <div class="section"> 
+   <h4 id="Define_Cloud_config_at_Cluster_Level">Define Cloud config at 
Cluster Level</h4> 
+   <p>Helix provides cloud configs at two different levels, one is at cluster 
level, and the other is at participant level. We describe them separately.</p> 
+   <p>At cluster level, we have a new Znode called CloudConfig. It has a few 
fields that store the relatively static cloud information for the whole 
cluster. Similar to other existing configs, Helix provides cloud config 
builder, validation, get/set functions. As the following table shows, the first 
two fields are required, and the last three fields are optional. </p> 
+   <p><tt>CLOUD_ENABLED</tt> must be set to true if the user would like to use 
Helix cloud support. <tt>CLOUD_PROVIDER</tt> is the type of the cloud 
environment. Besides the few well-known public cloud providers, the user can 
also define his/her cloud environment as “CUSTOMIZED”. <tt>CLOUD_ID</tt> is 
an optional field. It can be used to record any specific metadata information 
the user would like to record, e.g. the ID for the particular cluster inside a 
cloud environment, etc. If the user chooses to use the provider that already 
has default implementations in Helix, e.g., Azure, he does not need to provide 
the last two fields, as Helix already provides the default value for these two 
fields in system property, which is considered as a bundle with Azure 
implementation that would be discussed later. If the user uses customized 
providers, or chooses some other cloud environment that has not been 
implemented in Helix yet, the user needs to provide the last two fields and/or <
 tt>CLOUD_ID</tt> depending on his/her usage. </p> 
+   <table border="0" class="bodyTable table table-striped table-hover"> 
+    <thead> 
+     <tr class="a"> 
+      <th>Field </th> 
+      <th>Meaning </th> 
+     </tr> 
+    </thead> 
+    <tbody> 
+     <tr class="b"> 
+      <td>CLOUD_ENABLED </td> 
+      <td>determine whether the cluster is inside cloud environment and use 
Helix cloud support </td> 
+     </tr> 
+     <tr class="a"> 
+      <td>CLOUD_PROVIDER </td> 
+      <td>denote what kind of cloud environment the cluster is in, e.g. Azure, 
AWS, GCP, or CUSTOMIZED </td> 
+     </tr> 
+     <tr class="b"> 
+      <td>CLOUD_ID </td> 
+      <td>the specific id in cloud environment that belongs to this cluster 
</td> 
+     </tr> 
+     <tr class="a"> 
+      <td>CLOUD_INFO_SOURCE </td> 
+      <td>the source for retrieving the cloud information. </td> 
+     </tr> 
+     <tr class="b"> 
+      <td>CLOUD_INFO_PROCESSOR_NAME </td> 
+      <td>the name of the function that processes the fetching and parsing of 
cloud information </td> 
+     </tr> 
+    </tbody> 
+   </table> 
+   <p>Users could use either REST API or Java API to set these configs.</p> 
+   <div class="section"> 
+    <h5 id="REST_API_Examples">REST API Examples</h5> 
+    <p>Helix enhanced current cluster creation REST API as well as Java API 
with extra fields that represent cloud related input. For example, in the 
following modified <tt>createCluster</tt> API, <tt>addCloudConfig</tt> is a 
Boolean value denotes whether to create with cloud config, and the 
<tt>cloudConfigManifest</tt> is the cloud config string, which will be 
converted to a Znode record.</p> 
+    <div class="source"> 
+     <pre>@PUT
+  @Path(&quot;{clusterId}&quot;)
+  public Response createCluster(@PathParam(&quot;clusterId&quot;) String 
clusterId, @DefaultValue(&quot;false&quot;) @QueryParam(&quot;recreate&quot;) 
String recreate,
+      @DefaultValue(&quot;false&quot;) @QueryParam(&quot;addCloudConfig&quot;) 
String addCloudConfig, String cloudConfigManifest)
+</pre> 
+    </div> 
+    <p>Besides the enhanced cluster creation API, Helix also provides a set of 
cloud specific APIs in Java and REST that handles the get/add/update of cloud 
config. </p> 
+    <ul> 
+     <li>Create cluster and add meanwhile cloud config related information to 
ZK.</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X PUT -H &quot;Content-Type: application/json&quot; 
http://localhost:1234/admin/v2/clusters/myCluster?addCloudConfig=true -d '
+{
+    &quot;simpleFields&quot; : 
+    {
+        &quot;CLOUD_ENABLED&quot; : &quot;true&quot;,
+        &quot;CLOUD_PROVIDER&quot;: &quot;AWS&quot;,
+        &quot;CLOUD_ID&quot; : &quot;12345&quot;
+        &quot;CLOUD_INFO_SOURCE&quot;: {&quot;http://169.254.169.254/&quot;}
+        &quot;CLOUD_INFO_PROCESSOR_NAME&quot;: 
&quot;AWSCloudInformationProcesser&quot;
+    }
+}'
+</pre> 
+    </div> 
+    <ul> 
+     <li>Add cloud config to an existing cluster</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X PUT -H &quot;Content-Type: application/json&quot; 
http://localhost:1234/admin/v2/clusters/myCluster/cloudconfig -d '
+{
+    &quot;simpleFields&quot; : 
+    {
+        &quot;CLOUD_ENABLED&quot; : &quot;true&quot;,
+        &quot;CLOUD_PROVIDER&quot;: &quot;AWS&quot;,
+        &quot;CLOUD_ID&quot; : &quot;12345&quot;
+        &quot;CLOUD_INFO_SOURCE&quot;: {&quot;http://169.254.169.254/&quot;}
+        &quot;CLOUD_INFO_PROCESSOR_NAME&quot;: 
&quot;AWSCloudInformationProcesser&quot;
+    }
+}'
+</pre> 
+    </div> 
+    <ul> 
+     <li>Delete the cloud config of a cluster</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X DELETE 
http://localhost:1234/admin/v2/clusters/myCluster/cloudconfig
+</pre> 
+    </div> 
+    <ul> 
+     <li>Get the cloud config of a cluster</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X GET 
http://localhost:1234/admin/v2/clusters/myCluster/cloudconfig
+</pre> 
+    </div> 
+    <ul> 
+     <li>Update the cloud config of a cluster</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X POST -H &quot;Content-Type: application/json&quot;  
http://localhost:1234/admin/v2/clusters/myCluster/cloudconfig?command=update -d 
'
+{
+    &quot;simpleFields&quot; : {
+        &quot;CLOUD_ID&quot; : &quot;12345&quot;
+    }
+}'
+</pre> 
+    </div> 
+    <ul> 
+     <li>Delete some of the fields in the cloud config</li> 
+    </ul> 
+    <div class="source"> 
+     <pre>$ curl -X POST -H &quot;Content-Type: application/json&quot; 
http://localhost:1234/admin/v2/clusters/myCluster/cloudconfig?command=delete -d 
'
+{
+    &quot;simpleFields&quot; : {
+        &quot;CLOUD_ID&quot; : &quot;12345&quot;
+    }
+}'
+</pre> 
+    </div> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Define_Cloud_Configs_at_Participant_Level">Define Cloud Configs at 
Participant Level</h4> 
+   <p>At participant level, Helix allows users to provide detailed cloud 
properties, which is more related to the participant’s actions. For default 
value, Helix provides <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/resources/azure-cloud.properties";>Azure
 cloud properties</a>, including not only the default cluster level config 
values for Azure, like <tt>CLOUD_INFO_SOURCE</tt> and 
<tt>CLOUD_INFO_PROCESSOR_NAME</tt>, but also some participant specific values, 
such as http timeout when querying AIMS (Azure Instance Metadata Service) in 
Azure, max retry times, etc. </p> 
+   <div class="source"> 
+    
<pre>cloud_info_source=http://169.254.169.254/metadata/instance?api-version=2019-06-04
+cloud_info_processor_name=AzureCloudInstanceInformationProcessor
+cloud_max_retry=5
+connection_timeout_ms=5000
+request_timeout_ms=5000
+</pre> 
+   </div> 
+   <p>If users would like to use their customized config for participants, 
they can input the specific properties through <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/HelixManagerProperty.java";>Helix
 Manager Property</a> when composing <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java";>Zk
 Helix Manager</a>, which is passed into participants. <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/HelixManagerProperty.java";>Helix
 Manager Property</a> includes <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java";>Helix
 Cloud Property</a> which includes commonly used cloud properties and also any 
kind of user defined cloud properties.</p> 
+   <div class="source"> 
+    <pre>public ZKHelixManager(String clusterName, String instanceName, 
InstanceType instanceType,
+    String zkAddress, HelixManagerStateListener stateListener, 
HelixManagerProperty helixManagerProperty)
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Implement_Cloud_Instance_Information_if_necessary">Implement Cloud 
Instance Information (if necessary)</h4> 
+   <p>Helix has predefined a few fields in the interface of <a 
class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/api/cloud/CloudInstanceInformation.java";>CloudInstanceInformation</a>
 that are commonly used in participant. Users are free to define other fields 
in the instance metadata that they think are useful. </p> 
+   <div class="source"> 
+    <pre>public interface CloudInstanceInformation {
+  /**
+   * Get the the value of a specific cloud instance field by name
+   * @return the value of the field
+   */
+  String get(String key);
+
+  /**
+   * The enum contains all the required cloud instance field in Helix
+   */
+  enum CloudInstanceField {
+    INSTANCE_NAME,
+    FAULT_DOMAIN,
+    INSTANCE_SET_NAME
+  }
+}
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 
id="Implement_Cloud_Instance_Information_Processor_if_necessary">Implement 
Cloud Instance Information Processor (if necessary)</h4> 
+   <p>Helix provides an interface to fetch and parse cloud instance 
information as follows. Helix makes the interface generic enough so that users 
may implement their own fetching and parsing logic with maximum freedom. </p> 
+   <div class="source"> 
+    <pre>/**
+ * Generic interface to fetch and parse cloud instance information
+ */
+public interface CloudInstanceInformationProcessor&lt;T extends Object&gt; {
+
+  /**
+   * Get the raw cloud instance information
+   * @return raw cloud instance information
+   */
+  List&lt;T&gt; fetchCloudInstanceInformation();
+
+  /**
+   * Parse the raw cloud instance information in responses and compose 
required cloud instance information
+   * @return required cloud instance information
+   */
+  CloudInstanceInformation parseCloudInstanceInformation(List&lt;T&gt; 
responses);
+}
+</pre> 
+   </div> 
+   <p>Helix also implements an example processor for Azure in <a 
class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/cloud/azure/AzureCloudInstanceInformationProcessor.java";>AzureCloudInstanceInformationProcessor</a>.
 The implementation includes fetching and parsing Azure cloud instance 
information. The fetching function retrieves instance information from Azure 
AIMS, and the parsing function validates the response, and selects the fields 
needed for participant auto registration. If users would like to use Helix in 
an Azure environment, they do not need to implement it by themselves. </p> 
+   <p>If users need to use Helix in another cloud environment, they can 
implement their own information processor. The implementation would be similar 
to Azure implementation, and the main difference would be in how to parse the 
response and retrieve interested fields. </p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Config_Properly_for_Participant_Auto_Registration_to_Work">Config 
Properly for Participant Auto Registration to Work</h4> 
+   <p>To make the participant auto registration work, users would need to make 
sure their cluster config is set properly. The most important one is the 
<tt>allowParticipantAutoJoin</tt> field in cluster config.</p> 
+   <div class="source"> 
+    <pre>{
+    &quot;id&quot;: &quot;clusterName&quot;,
+    &quot;listFields&quot;: {},
+    &quot;mapFields&quot;: {},
+    &quot;simpleFields&quot;: {
+        ......
+        &quot;allowParticipantAutoJoin&quot;: &quot;true&quot;
+        ......
+    }
+}
+</pre> 
+   </div> 
+   <p>This field is used in participant manager logic as a prerequisite for 
participants to do auto registration. The detailed logic is shown in the 
following flow chart. The related code is in <a class="externalLink" 
href="https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java";>Participant
 Manager</a>.</p> 
+   <p><img src="./images/ParticipantAutoRegistrationLogic.png" 
alt="Participant Auto Registration Logic" /></p> 
+   <p>If the participant decides that it should do auto registration based on 
the config, it will first query cloud config and decide what environment it is 
in. Based on this information, the participant will call the corresponding 
cloud instance information processor. Then with all the information, especially 
the domain information, the participant can auto register to the cluster 
without any manual effort.</p> 
+  </div> 
+ </div> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">Get 
Helix</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Hands-On</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Recipes</li>
+                                               <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>
+                               </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;2020 <a 
href="http://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 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="http://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+</div>                 </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="./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>
+</html>
\ No newline at end of file

Added: 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=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_controller.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_controller.html Fri Nov 20 21:14:57 
2020
@@ -0,0 +1,372 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Apache Helix -   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="./css/bootstrap.min.css" rel="stylesheet" />
+               <link href="./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]-->
+               
+<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="page-tutorial_controller project-099-docs" 
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>
+                                       <a class="brand" href="..">Apache 
Helix</a>
+                                       <div class="nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li><a 
href="index.html" title="Helix 0.9.9">Helix 0.9.9 </a></li>
+                                                       <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>
+                                       </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="../images/helix-logo.jpg" alt='"''"' /></a>
+                                       <p class="lead">A cluster management 
framework for partitioned and replicated distributed resources</p>
+                               </div>
+                               <div class="pull-right">
+                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif" 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: 2020-11-20</li>
+                       </ul>
+               </div>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<!-- -
+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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Controller"><a href="./Tutorial.html">Helix 
Tutorial</a>: Controller</h2>
+ </div> 
+ <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> 
+ <div class="section"> 
+  <h3 id="Start_a_Connection">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>manager = HelixManagerFactory.getZKHelixManager(clusterName,
+                                                instanceName,
+                                                instanceType,
+                                                zkConnectString);
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Controller_Code">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>manager = HelixManagerFactory.getZKHelixManager(clusterName,
+                                                instanceName,
+                                                InstanceType.CONTROLLER,
+                                                zkConnectString);
+manager.connect();
+</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>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;
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Controller_Deployment_Modes">Controller Deployment Modes</h3> 
+  <p>Helix provides multiple options to deploy the controller.</p> 
+  <div class="section"> 
+   <h4 id="STANDALONE">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> 
+  </div> 
+  <div class="section"> 
+   <h4 id="EMBEDDED">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> 
+  </div> 
+  <div class="section"> 
+   <h4 id="CONTROLLER_AS_A_SERVICE">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> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Start_the_Helix_agent">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>      manager = HelixManagerFactory.getZKHelixManager(clusterName,
+                                                      instanceName,
+                                                      instanceType,
+                                                      zkConnectString);
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Controller_Code">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>      manager = HelixManagerFactory.getZKHelixManager(clusterName,
+                                                          instanceName,
+                                                          
InstanceType.CONTROLLER,
+                                                          zkConnectString);
+     manager.connect();
+     GenericHelixController controller = new GenericHelixController();
+     manager.addConfigChangeListener(controller);
+     manager.addLiveInstanceChangeListener(controller);
+     manager.addIdealStateChangeListener(controller);
+     manager.addExternalViewChangeListener(controller);
+     manager.addControllerListener(controller);
+</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>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;
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Controller_Deployment_Modes">Controller Deployment Modes</h3> 
+  <p>Helix provides multiple options to deploy the controller.</p> 
+  <div class="section"> 
+   <h4 id="STANDALONE">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> 
+  </div> 
+  <div class="section"> 
+   <h4 id="EMBEDDED">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> 
+  </div> 
+  <div class="section"> 
+   <h4 id="CONTROLLER_AS_A_SERVICE">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> 
+  </div> 
+ </div> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">Get 
Helix</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Hands-On</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Recipes</li>
+                                               <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>
+                               </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;2020 <a 
href="http://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 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="http://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+</div>                 </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="./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>
+</html>
\ No newline at end of file

Added: 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=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_health.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_health.html Fri Nov 20 21:14:57 2020
@@ -0,0 +1,261 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Apache Helix -   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="./css/bootstrap.min.css" rel="stylesheet" />
+               <link href="./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]-->
+               
+<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="page-tutorial_health project-099-docs" 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>
+                                       <a class="brand" href="..">Apache 
Helix</a>
+                                       <div class="nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li><a 
href="index.html" title="Helix 0.9.9">Helix 0.9.9 </a></li>
+                                                       <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>
+                                       </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="../images/helix-logo.jpg" alt='"''"' /></a>
+                                       <p class="lead">A cluster management 
framework for partitioned and replicated distributed resources</p>
+                               </div>
+                               <div class="pull-right">
+                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif" 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: 2020-11-20</li>
+                       </ul>
+               </div>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<!-- -
+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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Customizing_Health_Checks"><a 
href="./Tutorial.html">Helix Tutorial</a>: Customizing Health Checks</h2>
+ </div> 
+ <p>In this chapter, we'll learn how to customize health checks based on 
metrics of your distributed system.</p> 
+ <div class="section"> 
+  <h3 id="Health_Checks">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> 
+ </div> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">Get 
Helix</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Hands-On</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Recipes</li>
+                                               <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>
+                               </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;2020 <a 
href="http://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 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="http://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+</div>                 </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="./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>
+</html>
\ No newline at end of file

Added: 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=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_messaging.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_messaging.html Fri Nov 20 21:14:57 
2020
@@ -0,0 +1,286 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Apache Helix -   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="./css/bootstrap.min.css" rel="stylesheet" />
+               <link href="./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]-->
+               
+<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="page-tutorial_messaging project-099-docs" 
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>
+                                       <a class="brand" href="..">Apache 
Helix</a>
+                                       <div class="nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li><a 
href="index.html" title="Helix 0.9.9">Helix 0.9.9 </a></li>
+                                                       <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>
+                                       </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="../images/helix-logo.jpg" alt='"''"' /></a>
+                                       <p class="lead">A cluster management 
framework for partitioned and replicated distributed resources</p>
+                               </div>
+                               <div class="pull-right">
+                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif" 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: 2020-11-20</li>
+                       </ul>
+               </div>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<!-- -
+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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Messaging"><a href="./Tutorial.html">Helix 
Tutorial</a>: Messaging</h2>
+ </div> 
+ <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> 
+ <div class="section"> 
+  <h3 id="Example:_Bootstrapping_a_Replica">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>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);
+</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> 
+ </div> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">Get 
Helix</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Hands-On</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Recipes</li>
+                                               <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>
+                               </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;2020 <a 
href="http://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 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="http://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+</div>                 </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="./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>
+</html>
\ No newline at end of file

Added: 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=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_participant.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_participant.html Fri Nov 20 21:14:57 
2020
@@ -0,0 +1,322 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ Rendered using Maven Reflow Skin 1.0.0 
(http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+       <head>
+               <meta charset="UTF-8" />
+               <title>Apache Helix -   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="./css/bootstrap.min.css" rel="stylesheet" />
+               <link href="./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]-->
+               
+<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="page-tutorial_participant project-099-docs" 
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>
+                                       <a class="brand" href="..">Apache 
Helix</a>
+                                       <div class="nav-collapse">
+                                               <ul class="nav pull-right">
+                                                       <li><a 
href="index.html" title="Helix 0.9.9">Helix 0.9.9 </a></li>
+                                                       <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>
+                                       </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="../images/helix-logo.jpg" alt='"''"' /></a>
+                                       <p class="lead">A cluster management 
framework for partitioned and replicated distributed resources</p>
+                               </div>
+                               <div class="pull-right">
+                                       <a href="http://www.apache.org/"; 
id="bannerRight"><img src="../images/feather_small.gif" 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: 2020-11-20</li>
+                       </ul>
+               </div>
+       </header>
+
+       <div class="main-body">
+       <div class="row">
+               <div class="span12">
+                       <div class="body-content">
+<!-- -
+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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Participant"><a href="./Tutorial.html">Helix 
Tutorial</a>: Participant</h2>
+ </div> 
+ <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> 
+ <div class="section"> 
+  <h3 id="Start_a_Connection">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>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();
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Example_State_Model_Factory">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>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   //
+      
////////////////////////////////////////////////////////////////////////////////////////////////
+    }
+  }
+}
+</pre> 
+  </div> 
+ </div> 
+</div>
+                       </div>
+               </div>
+       </div>
+       </div>
+
+       </div><!-- /container -->
+       
+       <!-- Footer
+       ================================================== -->
+       <footer class="well">
+               <div class="container">
+                       <div class="row">
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">Get 
Helix</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Hands-On</li>
+                                               <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>
+                               </div>
+                               <div class="span3 bottom-nav">
+                                       <ul class="nav nav-list">
+                                               <li 
class="nav-header">Recipes</li>
+                                               <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>
+                               </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;2020 <a 
href="http://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 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="http://helix.apache.org/0.9.9-docs/privacy-policy.html";>Privacy 
Policy</a>
+</div>                 </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="./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>
+</html>
\ No newline at end of file


Reply via email to