You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/05/04 13:13:57 UTC

[1/2] incubator-quarks-website git commit: from 2306c25f81bccbcc43b8ff799d2608d1c2b00490

Repository: incubator-quarks-website
Updated Branches:
  refs/heads/asf-site dc7421726 -> cb910d045


http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_parallel_analytics.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_parallel_analytics.html b/content/recipes/recipe_parallel_analytics.html
new file mode 100644
index 0000000..4d5a496
--- /dev/null
+++ b/content/recipes/recipe_parallel_analytics.html
@@ -0,0 +1,815 @@
+<!DOCTYPE html>
+  <head>
+
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="">
+<meta name="keywords" content=" ">
+<title>How can I run analytics on several tuples in parallel?  | Apache Quarks Documentation</title>
+<link rel="stylesheet" type="text/css" href="../css/syntax.css">
+<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css">
+<!--<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">-->
+<link rel="stylesheet" type="text/css" href="../css/modern-business.css">
+<link rel="stylesheet" type="text/css" href="../css/lavish-bootstrap.css">
+<link rel="stylesheet" type="text/css" href="../css/customstyles.css">
+<link rel="stylesheet" type="text/css" href="../css/theme-blue.css">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
+<script src="../js/jquery.navgoco.min.js"></script>
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
+<script src="../js/toc.js"></script>
+<script src="../js/customscripts.js"></script>
+<link rel="shortcut icon" href="../common_images/favicon.ico" type="image/x-icon">
+<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+
+
+
+
+ 
+
+<script>
+  $(function () {
+      $('[data-toggle="tooltip"]').tooltip()
+  })
+</script>
+
+
+
+  </head>
+
+<body>
+
+   <!-- Navigation -->
+<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+    <div class="container topnavlinks">
+        <div class="navbar-header">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+            <a class="fa fa-home fa-lg navbar-brand" href="../docs/home.html">&nbsp;<span class="projectTitle"> Apache Quarks Documentation</span></a>
+
+        </div>
+        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+            <ul class="nav navbar-nav navbar-right">
+                <!-- entries without drop-downs appear here -->
+                <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
+                
+
+
+
+
+
+
+
+
+                <li class="dropdown">
+                    
+                    
+                    
+                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">GitHub Repos<b class="caret"></b></a>
+                    <ul class="dropdown-menu">
+                        
+                        
+                        
+                        <li><a href="https://github.com/apache/incubator-quarks" target="_blank">Source code</a></li>
+                        
+                        
+                        
+                        
+                        
+                        <li><a href="https://github.com/apache/incubator-quarks-website" target="_blank">Website/Documentation</a></li>
+                        
+                        
+                        
+                        
+
+                    </ul>
+                </li>
+                
+                
+
+
+                
+                
+                
+                
+                <li><a href="https://quarks-edge.github.io/quarks/docs/javadoc/index.html" target="_blank">Javadoc</a></li>
+                
+                
+                
+                
+
+
+                <!-- entries with drop-downs appear here -->
+                <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
+
+                <li class="dropdown">
+                    
+                    
+                    
+                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Quarks Resources<b class="caret"></b></a>
+                    <ul class="dropdown-menu">
+                        
+                        
+                        
+                        <li><a href="https://github.com/apache/incubator-quarks/releases" target="_blank">Download</a></li>
+                        
+                        
+                        
+                        
+                        
+                        <li><a href="samples">Samples</a></li>
+                        
+                        
+                        
+                        
+                        
+                        <li><a href="faq">FAQ</a></li>
+                        
+                        
+                        
+                        
+
+                    </ul>
+                </li>
+                
+                
+
+
+                <!-- special insertion -->
+
+               
+                <!-- Send feedback function -->
+<script>
+function SendLinkByMail(href) {
+var subject= "Apache Quarks Documentation feedback";
+var body = "I have some feedback about the How can I run analytics on several tuples in parallel? page: ";
+body += window.location.href;
+body += "";
+var uri = "mailto:?subject=";
+uri += encodeURIComponent(subject);
+uri += "&body=";
+uri += encodeURIComponent(body);
+window.location.href = uri;
+}
+</script>
+
+<li><a href="mailto:dev@quarks.incubator.apache.org" target="_blank"><i class="fa fa-envelope-o"></i> Feedback</a></li>
+
+
+                <!--uncomment this block if you want simple search instead of algolia-->
+                <li>
+                     <!--start search-->
+                    <div id="search-demo-container">
+                        <input type="text" id="search-input" placeholder="search...">
+                        <ul id="results-container"></ul>
+                    </div>
+                    <script src="../js/jekyll-search.js" type="text/javascript"></script>
+                    <script type="text/javascript">
+                        SimpleJekyllSearch.init({
+                            searchInput: document.getElementById('search-input'),
+                            resultsContainer: document.getElementById('results-container'),
+                            dataSource: '../search.json',
+                            searchResultTemplate: '<li><a href="{url}" title="How can I run analytics on several tuples in parallel?">{title}</a></li>',
+                        noResultsText: 'No results found.',
+                                limit: 10,
+                                fuzzy: true,
+                        })
+                    </script>
+                     <!--end search-->
+                </li>
+
+            
+        </div>
+        <!-- /.container -->
+</nav>
+
+
+
+    <!-- Page Content -->
+    <div class="container">
+        <div class="col-lg-12">&nbsp;</div>
+
+
+<!-- Content Row -->
+<div class="row">
+    <!-- Sidebar Column -->
+    <div class="col-md-3">
+
+        <script>
+
+            $(document).ready(function() {
+                // Initialize navgoco with default options
+                $("#mysidebar").navgoco({
+                    caretHtml: '',
+                    accordion: true,
+                    openClass: 'active', // open
+                    save: true,
+                    cookie: {
+                        name: 'navgoco',
+                        expires: false,
+                        path: '/'
+                    },
+                    slide: {
+                        duration: 400,
+                        easing: 'swing'
+                    }
+                });
+
+                $("#collapseAll").click(function(e) {
+                    e.preventDefault();
+                    $("#mysidebar").navgoco('toggle', false);
+                });
+
+                $("#expandAll").click(function(e) {
+                    e.preventDefault();
+                    $("#mysidebar").navgoco('toggle', true);
+                });
+
+            });
+
+        </script>
+
+
+        
+
+
+
+
+
+
+
+
+
+        <ul id="mysidebar" class="nav">
+
+            <span class="siteTagline">Quarks</span>
+            <span class="versionTagline">Version 0.3.0</span>
+
+            
+            
+            
+                
+            
+            <li><a href="#">Overview</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/quarks_index.html">Introduction</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/faq.html">FAQ</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+            
+            <li><a href="#">Get Started</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/quarks-getting-started.html">Getting started guide</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/common-quarks-operations.html">Common operations</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+            
+            <li><a href="#">Quarks Cookbook</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_hello_quarks.html">Hello Quarks!</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_source_function.html">Writing a source function</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_value_out_of_range.html">Detecting a sensor value out of expected range</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_different_processing_against_stream.html">Applying different processing against a single stream</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_combining_streams_processing_results.html">Splitting a stream to apply different processing and combining the results into a single stream</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_external_filter_range.html">Using an external configuration file for filter ranges</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_adaptable_filter_range.html">Changing a filter's range</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_adaptable_polling_source.html">Changing a polled source stream's period</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_adaptable_deadtime_filter.html">Using an adaptable deadtime filter</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_dynamic_analytic_control.html">Dynamically enabling analytic flows</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li class="active"><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+            
+            <li><a href="#">Sample Programs</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/samples.html">Samples</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+            
+            <li><a href="#">Using the Console</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/console.html">Using the console</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+            
+            <li><a href="#">Get Involved</a>
+                <ul>
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/community.html">How to participate</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
+                    <li><a href="../docs/committers.html">Committers</a></li>
+                    
+
+                    
+
+                    
+                    
+                </ul>
+                
+                
+                
+
+
+                <!-- if you aren't using the accordion, uncomment this block:
+
+                     <p class="external">
+                         <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
+                     </p>
+                 -->
+				 <br/>
+			</li>
+		</ul>
+		<div class="row">
+		<div class="col-md-12">
+			
+<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
+<script>
+$( document ).ready(function() {
+  // Handler for .ready() called.
+
+$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
+
+/* this offset helps account for the space taken up by the floating toolbar. */
+$('#toc').on('click', 'a', function() {
+  var target = $(this.getAttribute('href'))
+    , scroll_target = target.offset().top
+
+  $(window).scrollTop(scroll_target - 10);
+  return false
+})
+  
+});
+</script>
+
+
+<div id="toc"></div>
+
+		</div>
+	</div>
+	</div>
+	
+    <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
+    <script>$("li.active").parents('li').toggleClass("active");</script>
+
+
+            <!-- Content Column -->
+            <div class="col-md-9">
+                
+                <div class="post-header">
+   <h1 class="post-title-main">How can I run analytics on several tuples in parallel?</h1>
+</div>
+
+<div class="post-content">
+
+   
+
+<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
+<script>
+$( document ).ready(function() {
+  // Handler for .ready() called.
+
+$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
+
+/* this offset helps account for the space taken up by the floating toolbar. */
+$('#toc').on('click', 'a', function() {
+  var target = $(this.getAttribute('href'))
+    , scroll_target = target.offset().top
+
+  $(window).scrollTop(scroll_target - 10);
+  return false
+})
+  
+});
+</script>
+
+
+<div id="toc"></div>
+
+
+    
+
+    <a target="_blank" href="https://github.com/apache/incubator-quarks-website/blob/master/site/recipes/recipe_parallel_analytics.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
+    
+  <p>If the duration of your per-tuple analytic processing makes your application unable to keep up with the tuple ingest rate or result generation rate, you can often run analytics on several tuples in parallel to improve performance.</p>
+
+<p>The overall proessing time for a single tuple is still the same but the processing for each tuple is overlapped. In the extreme your application may be able to process N tuples in the same time that it would have processed one.</p>
+
+<p>This usage model is in contrast to what&#39;s been called <em>concurrent analytics</em>, where multiple different independent analytics for a single tuple are performed concurrently, as when using <code>PlumbingStreams.concurrent()</code>.</p>
+
+<p>e.g., imagine your analytic pipeline has three stages to it: A1, A2, A3, and that A2 dominates the processing time. You want to change the serial processing flow graph from:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">sensorReadings&lt;T&gt; -&gt; A1 -&gt; A2 -&gt; A3 -&gt; results&lt;R&gt;
+</code></pre></div>
+<p>to a flow where the A2 analytics run on several tuples in parallel in a flow like:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">                           |-&gt; A2-channel0 -&gt;|
+sensorReadings&lt;T&gt; -&gt; A1 -&gt; |-&gt; A2-channel1 -&gt;| -&gt; A3 -&gt; results&lt;R&gt;
+                           |-&gt; A2-channel2 -&gt;|
+                           |-&gt; A2-channel3 -&gt;|
+                           |-&gt; A2-channel4 -&gt;|
+                                  ...
+</code></pre></div>
+<p>The key to the above flow is to use a <em>splitter</em> to distribute the tuples among the parallel channels. Each of the parallel channels also needs a thread to run its analytic pipeline.</p>
+
+<p><code>PlumbingStreams.parallel()</code> builds a parallel flow graph for you. Alternatively, you can use <code>TStream.split()</code>, <code>PlumbingStreams.isolate()</code>, and <code>TStream.union()</code> and build a parallel flow graph yourself.</p>
+
+<p>More specifically <code>parallel()</code> generates a flow like:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">                                   |-&gt; isolate(10) -&gt; pipeline-ch0 -&gt; |
+stream -&gt; split(width,splitter) -&gt; |-&gt; isolate(10) -&gt; pipeline-ch1 -&gt; |-&gt; union -&gt; isolate(width) 
+                                   |-&gt; isolate(10) -&gt; pipeline-ch2 -&gt; |
+                                       ...
+</code></pre></div>
+<p>It&#39;s easy to use <code>parallel()</code>!</p>
+
+<h2 id="define-the-splitter">Define the splitter</h2>
+
+<p>The splitter function partitions the tuples among the parallel channels. <code>PlumbingStreams.roundRobinSplitter()</code> is a commonly used splitter that simply cycles among each channel in succession. The round robin strategy works great when the processing time of tuples is uniform. Other splitter functions may use information in the tuple to decide how to partition them.</p>
+
+<p>This recipe just uses the round robin splitter for a <code>TStream&lt;Double&gt;</code>.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kt">int</span> <span class="n">width</span> <span class="o">=</span> <span class="mi">5</span><span class="o">;</span>  <span class="c1">// number of parallel channels</span>
+
+<span class="n">ToIntFunction</span><span class="o">&lt;</span><span class="n">Double</span><span class="o">&gt;</span> <span class="n">splitter</span> <span class="o">=</span> <span class="n">PlumbingStreams</span><span class="o">.</span><span class="na">roundRobinSplitter</span><span class="o">(</span><span class="n">width</span><span class="o">);</span>
+</code></pre></div>
+<h2 id="define-the-pipeline-to-run-in-parallel">Define the pipeline to run in parallel</h2>
+
+<p>Define a <code>BiFunction&lt;TStream&lt;T&gt;, Integer, TStream&lt;R&gt;&gt;</code> that builds the pipeline. That is, define a function that receives a <code>TStream&lt;T&gt;</code> and an integer <code>channel</code> and creates a pipeline for that channel that returns a <code>TStream&lt;R&gt;</code>.</p>
+
+<p>Many pipelines don&#39;t care what channel they&#39;re being constructed for. While the pipeline function typically yields the same pipeline processing for each channel there is no requirement for it to do so.</p>
+
+<p>In this simple recipe the pipeline receives a <code>TStream&lt;Double&gt;</code> as input and generates a <code>TStream&lt;String&gt;</code> as output.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">static</span> <span class="n">BiFunction</span><span class="o">&lt;</span><span class="n">TStream</span><span class="o">&lt;</span><span class="n">Double</span><span class="o">&gt;,</span> <span class="n">Integer</span><span class="o">,</span> <span class="n">TStream</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">pipeline</span><span class="o">()</span> <span class="o">{</span>
+    <span class="c1">// a simple 4 stage pipeline simulating some amount of work by sleeping</span>
+    <span class="k">return</span> <span class="o">(</span><span class="n">stream</span><span class="o">,</span> <span class="n">channel</span><span class="o">)</span> <span class="o">-&gt;</span> 
+      <span class="o">{</span> 
+        <span class="n">String</span> <span class="n">tagPrefix</span> <span class="o">=</span> <span class="s">"pipeline-ch"</span><span class="o">+</span><span class="n">channel</span><span class="o">;</span>
+        <span class="k">return</span> <span class="n">stream</span><span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">tuple</span> <span class="o">-&gt;</span> <span class="o">{</span>
+            <span class="n">sleep</span><span class="o">(</span><span class="mi">1000</span><span class="o">,</span> <span class="n">TimeUnit</span><span class="o">.</span><span class="na">MILLISECONDS</span><span class="o">);</span>
+            <span class="k">return</span> <span class="s">"This is the "</span><span class="o">+</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">" result for tuple "</span><span class="o">+</span><span class="n">tuple</span><span class="o">;</span>
+          <span class="o">}).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage1"</span><span class="o">)</span>
+          <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">Functions</span><span class="o">.</span><span class="na">identity</span><span class="o">()).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage2"</span><span class="o">)</span>
+          <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">Functions</span><span class="o">.</span><span class="na">identity</span><span class="o">()).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage3"</span><span class="o">);</span>
+          <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">Functions</span><span class="o">.</span><span class="na">identity</span><span class="o">()).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage4"</span><span class="o">);</span>
+      <span class="o">};</span>
+<span class="o">}</span>
+</code></pre></div>
+<h2 id="build-the-parallel-flow">Build the parallel flow</h2>
+
+<p>Given a width, splitter and pipeline function it just takes a single call:</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">TStream</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">results</span> <span class="o">=</span> <span class="n">PlumbingStreams</span><span class="o">.</span><span class="na">parallel</span><span class="o">(</span><span class="n">readings</span><span class="o">,</span> <span class="n">width</span><span class="o">,</span> <span class="n">splitter</span><span class="o">,</span> <span class="n">pipeline</span><span class="o">());</span>
+</code></pre></div>
+<h2 id="the-final-application">The final application</h2>
+
+<p>When the application is run it prints out 5 (width) tuples every second. Without the parallel channels, it would only print one tuple each second.</p>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">package</span> <span class="n">quarks</span><span class="o">.</span><span class="na">samples</span><span class="o">.</span><span class="na">topology</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">java.util.Date</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.concurrent.TimeUnit</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">quarks.console.server.HttpServer</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.function.BiFunction</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.function.Functions</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.providers.development.DevelopmentProvider</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.providers.direct.DirectProvider</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.samples.utils.sensor.SimpleSimulatedSensor</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.topology.TStream</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.topology.Topology</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">quarks.topology.plumbing.PlumbingStreams</span><span class="o">;</span>
+
+<span class="cm">/**
+ * A recipe for parallel analytics.
+ */</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">ParallelRecipe</span> <span class="o">{</span>
+
+    <span class="cm">/**
+     * Process several tuples in parallel in a replicated pipeline.
+     */</span>
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span>
+
+        <span class="n">DirectProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DevelopmentProvider</span><span class="o">();</span>
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"development console url: "</span>
+                <span class="o">+</span> <span class="n">dp</span><span class="o">.</span><span class="na">getServices</span><span class="o">().</span><span class="na">getService</span><span class="o">(</span><span class="n">HttpServer</span><span class="o">.</span><span class="na">class</span><span class="o">).</span><span class="na">getConsoleUrl</span><span class="o">());</span>
+
+        <span class="n">Topology</span> <span class="n">top</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="na">newTopology</span><span class="o">(</span><span class="s">"ParallelRecipe"</span><span class="o">);</span>
+
+        <span class="c1">// The number of parallel processing channels to generate</span>
+        <span class="kt">int</span> <span class="n">width</span> <span class="o">=</span> <span class="mi">5</span><span class="o">;</span>
+
+        <span class="c1">// Define the splitter</span>
+        <span class="n">ToIntFunction</span><span class="o">&lt;</span><span class="n">Double</span><span class="o">&gt;</span> <span class="n">splitter</span> <span class="o">=</span> <span class="n">PlumbingStreams</span><span class="o">.</span><span class="na">roundRobinSplitter</span><span class="o">(</span><span class="n">width</span><span class="o">);</span>
+
+        <span class="c1">// Generate a polled simulated sensor stream</span>
+        <span class="n">SimpleSimulatedSensor</span> <span class="n">sensor</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SimpleSimulatedSensor</span><span class="o">();</span>
+        <span class="n">TStream</span><span class="o">&lt;</span><span class="n">Double</span><span class="o">&gt;</span> <span class="n">readings</span> <span class="o">=</span> <span class="n">top</span><span class="o">.</span><span class="na">poll</span><span class="o">(</span><span class="n">sensor</span><span class="o">,</span> <span class="mi">10</span><span class="o">,</span> <span class="n">TimeUnit</span><span class="o">.</span><span class="na">MILLISECONDS</span><span class="o">)</span>
+                                      <span class="o">.</span><span class="na">tag</span><span class="o">(</span><span class="s">"readings"</span><span class="o">);</span>
+
+        <span class="c1">// Build the parallel analytic pipelines flow</span>
+        <span class="n">TStream</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">results</span> <span class="o">=</span> 
+            <span class="n">PlumbingStreams</span><span class="o">.</span><span class="na">parallel</span><span class="o">(</span><span class="n">readings</span><span class="o">,</span> <span class="n">width</span><span class="o">,</span> <span class="n">splitter</span><span class="o">,</span> <span class="n">pipeline</span><span class="o">())</span>
+                <span class="o">.</span><span class="na">tag</span><span class="o">(</span><span class="s">"results"</span><span class="o">);</span>
+
+        <span class="c1">// Print out the results.</span>
+        <span class="n">results</span><span class="o">.</span><span class="na">sink</span><span class="o">(</span><span class="n">tuple</span> <span class="o">-&gt;</span> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="k">new</span> <span class="n">Date</span><span class="o">().</span><span class="na">toString</span><span class="o">()</span> <span class="o">+</span> <span class="s">"   "</span> <span class="o">+</span> <span class="n">tuple</span><span class="o">));</span>
+
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Notice that "</span><span class="o">+</span><span class="n">width</span><span class="o">+</span><span class="s">" results are generated every second - one from each parallel channel."</span>
+            <span class="o">+</span> <span class="s">"\nOnly one result would be generated each second if performed serially."</span><span class="o">);</span>
+        <span class="n">dp</span><span class="o">.</span><span class="na">submit</span><span class="o">(</span><span class="n">top</span><span class="o">);</span>
+    <span class="o">}</span>
+
+    <span class="cm">/** Function to create analytic pipeline and add it to a stream */</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">BiFunction</span><span class="o">&lt;</span><span class="n">TStream</span><span class="o">&lt;</span><span class="n">Double</span><span class="o">&gt;,</span><span class="n">Integer</span><span class="o">,</span><span class="n">TStream</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">pipeline</span><span class="o">()</span> <span class="o">{</span>
+        <span class="c1">// a simple 3 stage pipeline simulating some amount of work by sleeping</span>
+        <span class="k">return</span> <span class="o">(</span><span class="n">stream</span><span class="o">,</span> <span class="n">channel</span><span class="o">)</span> <span class="o">-&gt;</span> 
+          <span class="o">{</span> 
+            <span class="n">String</span> <span class="n">tagPrefix</span> <span class="o">=</span> <span class="s">"pipeline-ch"</span><span class="o">+</span><span class="n">channel</span><span class="o">;</span>
+            <span class="k">return</span> <span class="n">stream</span><span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">tuple</span> <span class="o">-&gt;</span> <span class="o">{</span>
+                <span class="n">sleep</span><span class="o">(</span><span class="mi">1000</span><span class="o">,</span> <span class="n">TimeUnit</span><span class="o">.</span><span class="na">MILLISECONDS</span><span class="o">);</span>
+                <span class="k">return</span> <span class="s">"This is the "</span><span class="o">+</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">" result for tuple "</span><span class="o">+</span><span class="n">tuple</span><span class="o">;</span>
+              <span class="o">}).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage1"</span><span class="o">)</span>
+              <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">Functions</span><span class="o">.</span><span class="na">identity</span><span class="o">()).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage2"</span><span class="o">)</span>
+              <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">Functions</span><span class="o">.</span><span class="na">identity</span><span class="o">()).</span><span class="na">tag</span><span class="o">(</span><span class="n">tagPrefix</span><span class="o">+</span><span class="s">".stage3"</span><span class="o">);</span>
+          <span class="o">};</span>
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">sleep</span><span class="o">(</span><span class="kt">long</span> <span class="n">period</span><span class="o">,</span> <span class="n">TimeUnit</span> <span class="n">unit</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">RuntimeException</span> <span class="o">{</span>
+        <span class="k">try</span> <span class="o">{</span>
+            <span class="n">Thread</span><span class="o">.</span><span class="na">sleep</span><span class="o">(</span><span class="n">unit</span><span class="o">.</span><span class="na">toMillis</span><span class="o">(</span><span class="n">period</span><span class="o">));</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">InterruptedException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">throw</span> <span class="k">new</span> <span class="n">RuntimeException</span><span class="o">(</span><span class="s">"Interrupted"</span><span class="o">,</span> <span class="n">e</span><span class="o">);</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+<span class="o">}</span>
+</code></pre></div>
+
+<div class="tags">
+    
+</div>
+
+<!-- 
+
+    <div id="disqus_thread"></div>
+    <script type="text/javascript">
+        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+        var disqus_shortname = 'idrbwjekyll'; // required: replace example with your forum shortname
+
+        /* * * DON'T EDIT BELOW THIS LINE * * */
+        (function() {
+            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+        })();
+    </script>
+    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ -->
+
+</div>
+
+
+
+<footer>
+    <div class="row">
+        <div class="col-lg-12 footer">
+
+             Site last
+            generated: May 4, 2016 <br/>
+
+        </div>
+    </div>
+    <br/>
+    <div class="row">
+        <div class="col-md-12">
+            <p class="small">Apache Quarks is an effort undergoing Incubation at The Apache Software
+                Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly accepted projects
+                until a further review indicates that the infrastructure, communications, and decision making process
+                have stabilized in a manner consistent with other successful ASF projects. While incubation status is
+                not necessarily a reflection of the completeness or stability of the code, it does indicate that the
+                project has yet to be fully endorsed by the ASF.</p>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <p class="small">Copyright � 2016 The Apache Software Foundation. Licensed under the Apache
+                License, Version 2.0.
+                Apache, the Apache Feather logo, and the Apache Incubator project logo are trademarks of The Apache
+                Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
+                respective owners.</p>
+        </div>
+    </div>
+</footer>
+
+            </div><!-- /.row -->
+
+    </div>    <!-- /.container -->
+
+</body>
+
+
+</html>
+

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_source_function.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_source_function.html b/content/recipes/recipe_source_function.html
index a4b3db7..79b82ec 100644
--- a/content/recipes/recipe_source_function.html
+++ b/content/recipes/recipe_source_function.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -691,7 +701,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_value_out_of_range.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_value_out_of_range.html b/content/recipes/recipe_value_out_of_range.html
index 45c05a0..77b8caf 100644
--- a/content/recipes/recipe_value_out_of_range.html
+++ b/content/recipes/recipe_value_out_of_range.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -806,7 +816,7 @@ Temperature may not be optimal! It is 77.5�F!
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/search.json
----------------------------------------------------------------------
diff --git a/content/search.json b/content/search.json
index b65c722..5ad7e7b 100644
--- a/content/search.json
+++ b/content/search.json
@@ -231,6 +231,17 @@
 
 
 {
+"title": "How can I run analytics on several tuples in parallel?",
+"tags": "",
+"keywords": "",
+"url": "../recipes/recipe_parallel_analytics",
+"summary": ""
+},
+
+
+
+
+{
 "title": "Writing a source function",
 "tags": "",
 "keywords": "",

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/title-checker.html
----------------------------------------------------------------------
diff --git a/content/title-checker.html b/content/title-checker.html
index 52f07e1..31993b2 100644
--- a/content/title-checker.html
+++ b/content/title-checker.html
@@ -2181,5 +2181,144 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 </body>
 </html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/titlepage.html
----------------------------------------------------------------------
diff --git a/content/titlepage.html b/content/titlepage.html
index 5342632..fd85b30 100644
--- a/content/titlepage.html
+++ b/content/titlepage.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -592,7 +602,7 @@ $('#toc').on('click', 'a', function() {
       <div class="printTitleArea">
         <div class="printTitle"></div>
         <div class="printSubtitle"></div>
-        <div class="lastGeneratedDate">Last generated: May 03, 2016</div>
+        <div class="lastGeneratedDate">Last generated: May 04, 2016</div>
         <hr />
 
         <div class="printTitleImage">
@@ -639,7 +649,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/tocpage.html
----------------------------------------------------------------------
diff --git a/content/tocpage.html b/content/tocpage.html
index 241a367..5bfeb66 100644
--- a/content/tocpage.html
+++ b/content/tocpage.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -712,6 +722,12 @@ $('#toc').on('click', 'a', function() {
         
         
                 
+                <li><a href="/recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a>
+                    
+        </li>
+        
+        
+                
                 <li><a href="/recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a>
                     
         </li>
@@ -809,7 +825,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/urls_mydoc.txt
----------------------------------------------------------------------
diff --git a/content/urls_mydoc.txt b/content/urls_mydoc.txt
index afc85f4..b64bc05 100644
--- a/content/urls_mydoc.txt
+++ b/content/urls_mydoc.txt
@@ -120,6 +120,13 @@
 
 
  
+/recipes/recipe_parallel_analytics:
+  title: "How can I run analytics on several tuples in parallel?"
+  url: "../recipes/recipe_parallel_analytics.html"
+  link: "<a href='../recipes/recipe_parallel_analytics.html'>How can I run analytics on several tuples in parallel?</a>"
+
+
+ 
 /recipes/recipe_concurrent_analytics:
   title: "How can I run several analytics on a tuple concurrently?"
   url: "../recipes/recipe_concurrent_analytics.html"



[2/2] incubator-quarks-website git commit: from 2306c25f81bccbcc43b8ff799d2608d1c2b00490

Posted by dl...@apache.org.
from 2306c25f81bccbcc43b8ff799d2608d1c2b00490


Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/cb910d04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/cb910d04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/cb910d04

Branch: refs/heads/asf-site
Commit: cb910d04558e1acc8d8b76af5c1bca8d003ebc25
Parents: dc74217
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Wed May 4 09:13:46 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Wed May 4 09:13:46 2016 -0400

----------------------------------------------------------------------
 content/404.html                                |  12 +-
 content/algolia_search.json                     |  13 +
 content/docs/committers.html                    |  12 +-
 content/docs/common-quarks-operations.html      |  12 +-
 content/docs/community.html                     |  12 +-
 content/docs/console.html                       |  12 +-
 content/docs/faq.html                           |  12 +-
 content/docs/home.html                          |  12 +-
 content/docs/overview.html                      |  12 +-
 content/docs/quarks-getting-started.html        |  12 +-
 content/docs/quarks_index.html                  |  12 +-
 content/docs/quickstart.html                    |  12 +-
 content/docs/samples.html                       |  12 +-
 content/docs/search.html                        |  12 +-
 content/docs/tag_collaboration.html             |  14 +-
 content/docs/tag_content_types.html             |  14 +-
 content/docs/tag_formatting.html                |  14 +-
 content/docs/tag_getting_started.html           |  14 +-
 content/docs/tag_mobile.html                    |  14 +-
 content/docs/tag_navigation.html                |  14 +-
 content/docs/tag_publishing.html                |  14 +-
 content/docs/tag_single_sourcing.html           |  14 +-
 content/docs/tag_special_layouts.html           |  14 +-
 content/prince-file-list.txt                    |   5 +
 .../recipe_adaptable_deadtime_filter.html       |  12 +-
 .../recipes/recipe_adaptable_filter_range.html  |  12 +-
 .../recipe_adaptable_polling_source.html        |  12 +-
 ...pe_combining_streams_processing_results.html |  12 +-
 .../recipes/recipe_concurrent_analytics.html    |  12 +-
 ...ipe_different_processing_against_stream.html |  12 +-
 .../recipe_dynamic_analytic_control.html        |  12 +-
 .../recipes/recipe_external_filter_range.html   |  12 +-
 content/recipes/recipe_hello_quarks.html        |  12 +-
 content/recipes/recipe_parallel_analytics.html  | 815 +++++++++++++++++++
 content/recipes/recipe_source_function.html     |  12 +-
 content/recipes/recipe_value_out_of_range.html  |  12 +-
 content/search.json                             |  11 +
 content/title-checker.html                      | 139 ++++
 content/titlepage.html                          |  14 +-
 content/tocpage.html                            |  18 +-
 content/urls_mydoc.txt                          |   7 +
 41 files changed, 1400 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/404.html
----------------------------------------------------------------------
diff --git a/content/404.html b/content/404.html
index 375659e..cb236f4 100644
--- a/content/404.html
+++ b/content/404.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -622,7 +632,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/algolia_search.json
----------------------------------------------------------------------
diff --git a/content/algolia_search.json b/content/algolia_search.json
index 0cf57a5..db902b7 100644
--- a/content/algolia_search.json
+++ b/content/algolia_search.json
@@ -271,6 +271,19 @@
 
 
 {
+"title": "How can I run analytics on several tuples in parallel?",
+"tags": "",
+"keywords": "",
+"url": "../recipes/recipe_parallel_analytics",
+"summary": "",
+"body": "If the duration of your per-tuple analytic processing makes your application unable to keep up with the tuple ingest rate or result generation rate, you can often run analytics on several tuples in parallel to improve performance.The overall proessing time for a single tuple is still the same but the processing for each tuple is overlapped. In the extreme your application may be able to process N tuples in the same time that it would have processed one.This usage model is in contrast to what's been called _concurrent analytics_, where multiple different independent analytics for a single tuple are performed concurrently, as when using `PlumbingStreams.concurrent()`.e.g., imagine your analytic pipeline has three stages to it: A1, A2, A3, and that A2 dominates the processing time. You want to change the serial processing flow graph from:```sensorReadings -> A1 -> A2 -> A3 -> results```to a flow where the A2 analytics run on several tuples in parallel in a flow like:```       
                     |-> A2-channel0 ->|sensorReadings -> A1 -> |-> A2-channel1 ->| -> A3 -> results                           |-> A2-channel2 ->|                           |-> A2-channel3 ->|                           |-> A2-channel4 ->|                                  ...```The key to the above flow is to use a _splitter_ to distribute the tuples among the parallel channels. Each of the parallel channels also needs a thread to run its analytic pipeline.`PlumbingStreams.parallel()` builds a parallel flow graph for you. Alternatively, you can use `TStream.split()`, `PlumbingStreams.isolate()`, and `TStream.union()` and build a parallel flow graph yourself.More specifically `parallel()` generates a flow like:```                                   |-> isolate(10) -> pipeline-ch0 -> |stream -> split(width,splitter) -> |-> isolate(10) -> pipeline-ch1 -> |-> union -> isolate(width)                                    |-> isolate(10) -> pipeline-ch2 -> |                                     
   ...```It's easy to use `parallel()`!## Define the splitterThe splitter function partitions the tuples among the parallel channels. `PlumbingStreams.roundRobinSplitter()` is a commonly used splitter that simply cycles among each channel in succession. The round robin strategy works great when the processing time of tuples is uniform. Other splitter functions may use information in the tuple to decide how to partition them.This recipe just uses the round robin splitter for a `TStream`.```javaint width = 5;  // number of parallel channelsToIntFunction splitter = PlumbingStreams.roundRobinSplitter(width);```## Define the pipeline to run in parallelDefine a `BiFunction, Integer, TStream>` that builds the pipeline. That is, define a function that receives a `TStream` and an integer `channel` and creates a pipeline for that channel that returns a `TStream`.Many pipelines don't care what channel they're being constructed for. While the pipeline function typically yields the same pipeline 
 processing for each channel there is no requirement for it to do so.In this simple recipe the pipeline receives a `TStream` as input and generates a `TStream` as output.```javastatic BiFunction, Integer, TStream> pipeline() {    // a simple 4 stage pipeline simulating some amount of work by sleeping    return (stream, channel) ->       {         String tagPrefix = \"pipeline-ch\"+channel;        return stream.map(tuple -> {            sleep(1000, TimeUnit.MILLISECONDS);            return \"This is the \"+tagPrefix+\" result for tuple \"+tuple;          }).tag(tagPrefix+\".stage1\")          .map(Functions.identity()).tag(tagPrefix+\".stage2\")          .map(Functions.identity()).tag(tagPrefix+\".stage3\");          .map(Functions.identity()).tag(tagPrefix+\".stage4\");      };}```## Build the parallel flowGiven a width, splitter and pipeline function it just takes a single call:```javaTStream results = PlumbingStreams.parallel(readings, width, splitter, pipeline());```## The final a
 pplicationWhen the application is run it prints out 5 (width) tuples every second. Without the parallel channels, it would only print one tuple each second.```javapackage quarks.samples.topology;import java.util.Date;import java.util.concurrent.TimeUnit;import quarks.console.server.HttpServer;import quarks.function.BiFunction;import quarks.function.Functions;import quarks.providers.development.DevelopmentProvider;import quarks.providers.direct.DirectProvider;import quarks.samples.utils.sensor.SimpleSimulatedSensor;import quarks.topology.TStream;import quarks.topology.Topology;import quarks.topology.plumbing.PlumbingStreams;/** * A recipe for parallel analytics. */public class ParallelRecipe {    /**     * Process several tuples in parallel in a replicated pipeline.     */    public static void main(String[] args) throws Exception {        DirectProvider dp = new DevelopmentProvider();        System.out.println(\"development console url: \"                + dp.getServices().getServic
 e(HttpServer.class).getConsoleUrl());        Topology top = dp.newTopology(\"ParallelRecipe\");        // The number of parallel processing channels to generate        int width = 5;                // Define the splitter        ToIntFunction splitter = PlumbingStreams.roundRobinSplitter(width);                // Generate a polled simulated sensor stream        SimpleSimulatedSensor sensor = new SimpleSimulatedSensor();        TStream readings = top.poll(sensor, 10, TimeUnit.MILLISECONDS)                                      .tag(\"readings\");                // Build the parallel analytic pipelines flow        TStream results =             PlumbingStreams.parallel(readings, width, splitter, pipeline())                .tag(\"results\");                // Print out the results.        results.sink(tuple -> System.out.println(new Date().toString() + \"   \" + tuple));        System.out.println(\"Notice that \"+width+\" results are generated every second - one from each parallel channel
 .\"            + \"\\nOnly one result would be generated each second if performed serially.\");        dp.submit(top);    }        /** Function to create analytic pipeline and add it to a stream */    private static BiFunction,Integer,TStream> pipeline() {        // a simple 3 stage pipeline simulating some amount of work by sleeping        return (stream, channel) ->           {             String tagPrefix = \"pipeline-ch\"+channel;            return stream.map(tuple -> {                sleep(1000, TimeUnit.MILLISECONDS);                return \"This is the \"+tagPrefix+\" result for tuple \"+tuple;              }).tag(tagPrefix+\".stage1\")              .map(Functions.identity()).tag(tagPrefix+\".stage2\")              .map(Functions.identity()).tag(tagPrefix+\".stage3\");          };    }    private static void sleep(long period, TimeUnit unit) throws RuntimeException {        try {            Thread.sleep(unit.toMillis(period));        } catch (InterruptedException e) {        
     throw new RuntimeException(\"Interrupted\", e);        }    }}```"
+
+},
+
+
+
+
+{
 "title": "Writing a source function",
 "tags": "",
 "keywords": "",

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/committers.html
----------------------------------------------------------------------
diff --git a/content/docs/committers.html b/content/docs/committers.html
index 8022a4b..afad0f5 100644
--- a/content/docs/committers.html
+++ b/content/docs/committers.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -634,7 +644,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/common-quarks-operations.html
----------------------------------------------------------------------
diff --git a/content/docs/common-quarks-operations.html b/content/docs/common-quarks-operations.html
index b1ff1bf..935c99c 100644
--- a/content/docs/common-quarks-operations.html
+++ b/content/docs/common-quarks-operations.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -667,7 +677,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/community.html
----------------------------------------------------------------------
diff --git a/content/docs/community.html b/content/docs/community.html
index 4fffc8f..abc010f 100644
--- a/content/docs/community.html
+++ b/content/docs/community.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -688,7 +698,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/console.html
----------------------------------------------------------------------
diff --git a/content/docs/console.html b/content/docs/console.html
index 3409cd7..c2e7679 100644
--- a/content/docs/console.html
+++ b/content/docs/console.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -1093,7 +1103,7 @@ Metrics.rateMeter(individualAlerts3.get(0));
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/faq.html
----------------------------------------------------------------------
diff --git a/content/docs/faq.html b/content/docs/faq.html
index d12b4af..cae6f51 100644
--- a/content/docs/faq.html
+++ b/content/docs/faq.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -704,7 +714,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/home.html
----------------------------------------------------------------------
diff --git a/content/docs/home.html b/content/docs/home.html
index e756cb5..1149138 100644
--- a/content/docs/home.html
+++ b/content/docs/home.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -709,7 +719,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/overview.html
----------------------------------------------------------------------
diff --git a/content/docs/overview.html b/content/docs/overview.html
index 0a5a439..04c15b8 100644
--- a/content/docs/overview.html
+++ b/content/docs/overview.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -694,7 +704,7 @@ medical device.</li>
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/quarks-getting-started.html
----------------------------------------------------------------------
diff --git a/content/docs/quarks-getting-started.html b/content/docs/quarks-getting-started.html
index a542667..48d6caa 100644
--- a/content/docs/quarks-getting-started.html
+++ b/content/docs/quarks-getting-started.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -793,7 +803,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/quarks_index.html
----------------------------------------------------------------------
diff --git a/content/docs/quarks_index.html b/content/docs/quarks_index.html
index 4f46c64..5c5015d 100644
--- a/content/docs/quarks_index.html
+++ b/content/docs/quarks_index.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -647,7 +657,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/quickstart.html
----------------------------------------------------------------------
diff --git a/content/docs/quickstart.html b/content/docs/quickstart.html
index 8ee6b1c..2d0087f 100644
--- a/content/docs/quickstart.html
+++ b/content/docs/quickstart.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -664,7 +674,7 @@ and Quarks provides a <a href="http://quarks-edge.github.io/quarks/docs/javadoc/
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/samples.html
----------------------------------------------------------------------
diff --git a/content/docs/samples.html b/content/docs/samples.html
index 7d970eb..60ac967 100644
--- a/content/docs/samples.html
+++ b/content/docs/samples.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -685,7 +695,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/search.html
----------------------------------------------------------------------
diff --git a/content/docs/search.html b/content/docs/search.html
index 9e68c1a..50105f0 100644
--- a/content/docs/search.html
+++ b/content/docs/search.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -612,7 +622,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_collaboration.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_collaboration.html b/content/docs/tag_collaboration.html
index 6636281..3dad2a0 100644
--- a/content/docs/tag_collaboration.html
+++ b/content/docs/tag_collaboration.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_content_types.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_content_types.html b/content/docs/tag_content_types.html
index 4cc75fb..e877e4b 100644
--- a/content/docs/tag_content_types.html
+++ b/content/docs/tag_content_types.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_formatting.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_formatting.html b/content/docs/tag_formatting.html
index 6475ab2..4c9a3ec 100644
--- a/content/docs/tag_formatting.html
+++ b/content/docs/tag_formatting.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_getting_started.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_getting_started.html b/content/docs/tag_getting_started.html
index 8a8d892..8ffe7f7 100644
--- a/content/docs/tag_getting_started.html
+++ b/content/docs/tag_getting_started.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -682,6 +692,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -716,7 +728,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_mobile.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_mobile.html b/content/docs/tag_mobile.html
index ffdcf0b..4c95873 100644
--- a/content/docs/tag_mobile.html
+++ b/content/docs/tag_mobile.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_navigation.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_navigation.html b/content/docs/tag_navigation.html
index e5cb204..7725714 100644
--- a/content/docs/tag_navigation.html
+++ b/content/docs/tag_navigation.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_publishing.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_publishing.html b/content/docs/tag_publishing.html
index 8f5265a..4643180 100644
--- a/content/docs/tag_publishing.html
+++ b/content/docs/tag_publishing.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_single_sourcing.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_single_sourcing.html b/content/docs/tag_single_sourcing.html
index 45371d6..6b69893 100644
--- a/content/docs/tag_single_sourcing.html
+++ b/content/docs/tag_single_sourcing.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/docs/tag_special_layouts.html
----------------------------------------------------------------------
diff --git a/content/docs/tag_special_layouts.html b/content/docs/tag_special_layouts.html
index a77c9c4..a5c0070 100644
--- a/content/docs/tag_special_layouts.html
+++ b/content/docs/tag_special_layouts.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -677,6 +687,8 @@ $('#toc').on('click', 'a', function() {
     
    
     
+   
+    
     
 </tbody>
 </table>
@@ -711,7 +723,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/prince-file-list.txt
----------------------------------------------------------------------
diff --git a/content/prince-file-list.txt b/content/prince-file-list.txt
index 541d5f2..166a5f2 100644
--- a/content/prince-file-list.txt
+++ b/content/prince-file-list.txt
@@ -105,6 +105,11 @@
                         
                      
                          
+                            http://quarks.incubator.apache.org/recipes/recipe_parallel_analytics.html
+                                  
+                        
+                     
+                         
                             http://quarks.incubator.apache.org/recipes/recipe_concurrent_analytics.html
                                   
                         

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_adaptable_deadtime_filter.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_adaptable_deadtime_filter.html b/content/recipes/recipe_adaptable_deadtime_filter.html
index 2d20517..5b72fb5 100644
--- a/content/recipes/recipe_adaptable_deadtime_filter.html
+++ b/content/recipes/recipe_adaptable_deadtime_filter.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -756,7 +766,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_adaptable_filter_range.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_adaptable_filter_range.html b/content/recipes/recipe_adaptable_filter_range.html
index 0ac5e30..ba6a9f3 100644
--- a/content/recipes/recipe_adaptable_filter_range.html
+++ b/content/recipes/recipe_adaptable_filter_range.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -730,7 +740,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_adaptable_polling_source.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_adaptable_polling_source.html b/content/recipes/recipe_adaptable_polling_source.html
index bc19c21..0bc9e79 100644
--- a/content/recipes/recipe_adaptable_polling_source.html
+++ b/content/recipes/recipe_adaptable_polling_source.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -742,7 +752,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_combining_streams_processing_results.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_combining_streams_processing_results.html b/content/recipes/recipe_combining_streams_processing_results.html
index 8b0009f..1bce67b 100644
--- a/content/recipes/recipe_combining_streams_processing_results.html
+++ b/content/recipes/recipe_combining_streams_processing_results.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -861,7 +871,7 @@ EMERGENCY! SEE TO PATIENT IMMEDIATELY!
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_concurrent_analytics.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_concurrent_analytics.html b/content/recipes/recipe_concurrent_analytics.html
index e2d905c..758cd14 100644
--- a/content/recipes/recipe_concurrent_analytics.html
+++ b/content/recipes/recipe_concurrent_analytics.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li class="active"><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -788,7 +798,7 @@ stream -&gt; |-&gt; isolate(1) -&gt; pipeline2 -&gt; |-&gt; barrier(10) -&gt; co
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_different_processing_against_stream.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_different_processing_against_stream.html b/content/recipes/recipe_different_processing_against_stream.html
index 921ab28..dcb72df 100644
--- a/content/recipes/recipe_different_processing_against_stream.html
+++ b/content/recipes/recipe_different_processing_against_stream.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -810,7 +820,7 @@ Gallons of gas: 9.1
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_dynamic_analytic_control.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_dynamic_analytic_control.html b/content/recipes/recipe_dynamic_analytic_control.html
index 468b235..6bf3b41 100644
--- a/content/recipes/recipe_dynamic_analytic_control.html
+++ b/content/recipes/recipe_dynamic_analytic_control.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -662,7 +672,7 @@ $('#toc').on('click', 'a', function() {
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_external_filter_range.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_external_filter_range.html b/content/recipes/recipe_external_filter_range.html
index 3936262..26b6f13 100644
--- a/content/recipes/recipe_external_filter_range.html
+++ b/content/recipes/recipe_external_filter_range.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -724,7 +734,7 @@ optimalTempRange=[77.0..91.0]
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/cb910d04/content/recipes/recipe_hello_quarks.html
----------------------------------------------------------------------
diff --git a/content/recipes/recipe_hello_quarks.html b/content/recipes/recipe_hello_quarks.html
index 33fe14d..dd11e2b 100644
--- a/content/recipes/recipe_hello_quarks.html
+++ b/content/recipes/recipe_hello_quarks.html
@@ -425,6 +425,16 @@ window.location.href = uri;
                     
                     
                     
+                    <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li>
+                    
+
+                    
+
+                    
+                    
+                    
+                    
+                    
                     <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li>
                     
 
@@ -678,7 +688,7 @@ Quarks!
         <div class="col-lg-12 footer">
 
              Site last
-            generated: May 3, 2016 <br/>
+            generated: May 4, 2016 <br/>
 
         </div>
     </div>