You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by me...@apache.org on 2018/08/23 19:16:26 UTC

[beam-site] branch asf-site updated (d3a72da -> 423f9e8)

This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam-site.git.


    from d3a72da  Prepare repository for deployment.
     add e5d0c8f  Beam Summit blogpost
     add d8070cb  This closes #542
     new 423f9e8  Prepare repository for deployment.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../2018/08/21/beam-summit-europe.html}            |  61 +-
 content/blog/index.html                            |  19 +
 content/feed.xml                                   | 639 ++-------------------
 content/images/blog/Facebook-AD.png                | Bin 0 -> 1275709 bytes
 content/index.html                                 |  10 +-
 src/_data/authors.yml                              |   4 +
 src/_posts/2018-08-21-beam-summit-europe.md        |  40 ++
 src/images/blog/Facebook-AD.png                    | Bin 0 -> 1275709 bytes
 8 files changed, 141 insertions(+), 632 deletions(-)
 copy content/{beam/capability/2016/04/03/presentation-materials.html => blog/2018/08/21/beam-summit-europe.html} (74%)
 create mode 100644 content/images/blog/Facebook-AD.png
 create mode 100644 src/_posts/2018-08-21-beam-summit-europe.md
 create mode 100644 src/images/blog/Facebook-AD.png


[beam-site] 01/01: Prepare repository for deployment.

Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit 423f9e8e70fca762385f58e85743a62b87ffb3d0
Author: Mergebot <me...@apache.org>
AuthorDate: Thu Aug 23 19:16:24 2018 +0000

    Prepare repository for deployment.
---
 .../2018/08/21/beam-summit-europe.html}            | 265 ++-------
 content/blog/index.html                            |  19 +
 content/feed.xml                                   | 639 ++-------------------
 content/images/blog/Facebook-AD.png                | Bin 0 -> 1275709 bytes
 content/index.html                                 |  10 +-
 5 files changed, 124 insertions(+), 809 deletions(-)

diff --git a/content/index.html b/content/blog/2018/08/21/beam-summit-europe.html
similarity index 53%
copy from content/index.html
copy to content/blog/2018/08/21/beam-summit-europe.html
index 33e68cf..db5f28c 100644
--- a/content/index.html
+++ b/content/blog/2018/08/21/beam-summit-europe.html
@@ -28,9 +28,8 @@
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <title>Apache Beam</title>
-  <meta name="description" content="Apache Beam is an open source, unified model and set of language-specific SDKs for defining and executing data processing workflows, and also data ingestion and integration flows, supporting Enterprise Integration Patterns (EIPs) and Domain Specific Languages (DSLs). Dataflow pipelines simplify the mechanics of large-scale batch and streaming data processing and can run on a number of runtimes like Apache Flink, Apache Spark, and Google Cloud Dataflow  [...]
-">
+  <title>Beam Summit Europe 2018</title>
+  <meta name="description" content="With a growing community of contributors and users, the Apache Beam project is organising the first European Beam Summit.We are happy to invite you to this e...">
   <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400" rel="stylesheet">
   <link rel="stylesheet" href="/css/site.css">
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
@@ -39,7 +38,7 @@
   <script src="/js/fix-menu.js"></script>
   <script src="/js/section-nav.js"></script>
   <script src="/js/page-nav.js"></script>
-  <link rel="canonical" href="https://beam.apache.org/" data-proofer-ignore>
+  <link rel="canonical" href="https://beam.apache.org/blog/2018/08/21/beam-summit-europe.html" data-proofer-ignore>
   <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
   <link rel="alternate" type="application/rss+xml" title="Apache Beam" href="https://beam.apache.org/feed.xml">
   <script>
@@ -52,7 +51,7 @@
   </script>
 </head>
 
-  <body class="body body--index">
+  <body class="body ">
     <!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -121,218 +120,66 @@
 
     <div class="body__contained">
       <!--
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+   http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. See accompanying LICENSE file.
 -->
-<div class="hero-bg">
-  <div class="hero section">
-    <div class="hero__cols">
-      <div class="hero__cols__col">
-        <div class="hero__cols__col__content">
-          <div class="hero__title">
-            Apache Beam: An advanced unified programming model
-          </div>
-          <div class="hero__subtitle">
-            Implement batch and streaming data processing jobs that run on any execution engine.
-          </div>
-          <div class="hero__ctas hero__ctas--first">
-            <a class="button button--primary" href="/get-started/beam-overview/">Learn more</a>
-            <a class="button button--primary" href="/get-started/downloads/">Download Beam SDK 2.6.0</a>
-          </div>
-          <div class="hero__ctas">
-            <a class="button" href="/get-started/quickstart-java/">Java Quickstart</a>
-            <a class="button" href="/get-started/quickstart-py/">Python Quickstart</a>
-	    <a class="button" href="/get-started/quickstart-go/">Go Quickstart</a>
-          </div>
-        </div>
-      </div>
-      <div class="hero__cols__col">
-        <div class="hero__blog">
-          <div class="hero__blog__title">
-            The latest from the blog
-          </div>
-          <div class="hero__blog__cards">
-            
-            <a class="hero__blog__cards__card" href="/blog/2018/08/20/review-input-streaming-connectors.html">
-              <div class="hero__blog__cards__card__title">A review of input streaming connectors</div>
-              <div class="hero__blog__cards__card__date">Aug 20, 2018</div>
-            </a>
-            
-            <a class="hero__blog__cards__card" href="/blog/2018/08/10/beam-2.6.0.html">
-              <div class="hero__blog__cards__card__title">Apache Beam 2.6.0</div>
-              <div class="hero__blog__cards__card__date">Aug 10, 2018</div>
-            </a>
-            
-            <a class="hero__blog__cards__card" href="/blog/2018/06/26/beam-2.5.0.html">
-              <div class="hero__blog__cards__card__title">Apache Beam 2.5.0</div>
-              <div class="hero__blog__cards__card__date">Jun 26, 2018</div>
-            </a>
-            
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</div>
 
-<div class="pillars section">
-  <div class="pillars__title">
-    All about Apache Beam
-  </div>
-  <div class="pillars__cols">
-    
-    <div class="pillars__cols__col">
-      <div class="pillars__cols__col__title">
-        Unified
-      </div>
-      <div class="pillars__cols__col__body">
-        Use a single programming model for both batch and streaming use cases.
-      </div>
-    </div>
-    
-    <div class="pillars__cols__col">
-      <div class="pillars__cols__col__title">
-        Portable
-      </div>
-      <div class="pillars__cols__col__body">
-        Execute pipelines on multiple execution environments.
-      </div>
-    </div>
-    
-    <div class="pillars__cols__col">
-      <div class="pillars__cols__col__title">
-        Extensible
-      </div>
-      <div class="pillars__cols__col__body">
-        Write and share new SDKs, IO connectors, and transformation libraries.
-      </div>
-    </div>
-    
-  </div>
-</div>
 
-<div class="graphic section">
-<div class="graphic__image">
-<img src="/images/beam_architecture.png" alt="Beam architecture" />
-</div>
-</div>
 
-<div class="logos section">
-  <div class="logos__title">
-    Works with
-  </div>
-  <div class="logos__logos">
-    
-    <div class="logos__logos__logo">
-      <a href="http://apex.apache.org"><img src="/images/logo_apex.png" alt="APEX" /></a>
-    </div>
-    
-    <div class="logos__logos__logo">
-      <a href="http://flink.apache.org"><img src="/images/logo_flink.png" alt="Flink" /></a>
-    </div>
-    
-    <div class="logos__logos__logo">
-      <a href="http://spark.apache.org/"><img src="/images/logo_spark.png" alt="Spark" /></a>
-    </div>
-    
-    <div class="logos__logos__logo">
-      <a href="https://cloud.google.com/dataflow/"><img src="/images/logo_google_cloud.png" alt="Google Cloud Dataflow" /></a>
-    </div>
-    
-    <div class="logos__logos__logo">
-      <a href="http://gearpump.apache.org/"><img src="/images/logo_gearpump.png" alt="Gearpump" /></a>
-    </div>
-    
-    <div class="logos__logos__logo">
-      <a href="http://samza.apache.org/"><img src="/images/logo_samza.png" alt="Samza" /></a>
-    </div>
-    
-  </div>
-</div>
+<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
 
-<div class="cards section section--wide">
-  <div class="section__contained">
-    <div class="cards__title">
-      Testimonials
-    </div>
-    <div class="cards__cards">
+  <header class="post-header">
+    <h1 class="post-title" itemprop="name headline">Beam Summit Europe 2018</h1>
+    <p class="post-meta"><time datetime="2018-08-21T01:00:01-07:00" itemprop="datePublished">Aug 21, 2018</time> •
+       Matthias Baetens [<a href="https://twitter.com/matthiasbaetens">@matthiasbaetens</a>]
       
-      <div class="cards__cards__card">
-        <div class="cards__cards__card__body">
-          A framework that delivers the flexibility and advanced functionality our customers need.
-        </div>
-        <div class="cards__cards__card__user">
-          <!-- TODO: Implement icons.
-          <div class="cards__cards__card__user__icon">
-          </div>
-          -->
-          <div class="cards__cards__card__user__name">
-            –Talend
-          </div>
-        </div>
-      </div>
-      
-      <div class="cards__cards__card">
-        <div class="cards__cards__card__body">
-          Apache Beam has powerful semantics that solve real-world challenges of stream processing.
-        </div>
-        <div class="cards__cards__card__user">
-          <!-- TODO: Implement icons.
-          <div class="cards__cards__card__user__icon">
-          </div>
-          -->
-          <div class="cards__cards__card__user__name">
-            –PayPal
-          </div>
-        </div>
-      </div>
-      
-      <div class="cards__cards__card">
-        <div class="cards__cards__card__body">
-          Apache Beam represents a principled approach for analyzing data streams.
-        </div>
-        <div class="cards__cards__card__user">
-          <!-- TODO: Implement icons.
-          <div class="cards__cards__card__user__icon">
-          </div>
-          -->
-          <div class="cards__cards__card__user__name">
-            –data Artisans
-          </div>
-        </div>
-      </div>
-      
-    </div>
-    <div class="cards__body">
-      Beam is an open source community and contributions are greatly appreciated!
-      If you’d like to contribute, please see the <a href="/contribute/">Contribute</a> section.
-    </div>
-  </div>
-</div>
+    </p>
+  </header>
+
+  <div class="post-content" itemprop="articleBody">
+    <p>With a growing community of contributors and users, the Apache Beam project is organising the first European Beam Summit.</p>
+
+<p>We are happy to invite you to this event, which will take place in <strong>London</strong> on <strong>October 1st and 2nd of 2018</strong>. <!--more--></p>
+
+<p><img src="/images/blog/Facebook-AD.png" alt="Beam Summit Europe 2018 flyer" height="360" width="640" /></p>
+
+<h3 id="what-is-the-beam-summit-2018">What is the Beam Summit 2018?</h3>
+<p>The summit is a 2 day, multi-track event.</p>
+
+<p>During the first day we’ll host sessions to share use cases from companies using Apache Beam, community driven talks, and a session to discuss the project’s roadmap (from the main partners in the project as well as all users planning to contribute to the project and wanting to share their plans). We’ll also have break-out sessions that will allow cross team collaboration in multiple sub-topics.</p>
+
+<p>The second day will be a “hands-on” day. We will offer an introductory session to Apache Beam. Additionally, we’ll host an advanced track for more advanced users with open-table discussions about more complex and newer Apache Beam features.</p>
+
+<p>The agenda will grow and be communicated in the coming month, keep an eye on the page.</p>
+
+<h3 id="event-details">Event Details</h3>
+<ul>
+  <li><strong>Venue</strong>: <a href="https://goo.gl/maps/LAC4haDzSzR2">Level39, One Canada Square, Canary Wharf, London E14 5AB</a></li>
+  <li><strong>Dates</strong>: 1-2 October 2018</li>
+</ul>
+
+<h3 id="how-do-i-register">How do I register?</h3>
+<p>You can register for free on the <a href="https://www.eventbrite.com/e/beam-summit-london-2018-tickets-49100625292#tickets">Eventbrite registration page</a>.</p>
+
+<h3 id="i-am-interested-in-speaking-how-do-i-propose-my-session">I am interested in speaking, how do I propose my session?</h3>
+<p>With this we are also launching a Call for Papers in case you want to secure a slot for one of the sessions. Please fill out the <a href="https://goo.gl/forms/nrZOCC1JwEfLtKfA2">CfP form</a>.</p>
+
+<h3 id="id-love-to-get-involved-as-a-volunteer-or-sponsor">I’d love to get involved as a volunteer or sponsor</h3>
+<p>Furthermore, in order to keep this event free, we are looking for people to help out at and/or sponsor some parts of the conference. If you (or your company) are interested to help out, please reach out to: <a href="mailto:baetensmatthias@gmail.com">baetensmatthias@gmail.com</a> or <a href="mailto:alex@vanboxel.be">alex@vanboxel.be</a>. You can find more info in the <a href="https://drive.google.com/file/d/1RnZ52rGaB6BR-EKneBcabdMcg9Pl7z9M">sponsor booklet</a></p>
+
+<p>Thanks, and we hope to see you at the event! 
+The Events &amp; Meetups Group</p>
 
-<div class="ctas section">
-  <div class="ctas__title">
-    Get started
-  </div>
-  <div class="ctas__ctas ctas__ctas--top">
-  <a class="button button--primary" href="/get-started/beam-overview/">Learn more</a>
-  <a class="button button--primary" href="/get-started/downloads/">Download Beam SDK 2.6.0</a>
-  </div>
-  <div class="ctas__ctas">
-  <a class="button" href="/get-started/quickstart-java/">Java Quickstart</a>
-  <a class="button" href="/get-started/quickstart-py/">Python Quickstart</a>
-  <a class="button" href="/get-started/quickstart-go/">Go Quickstart</a>
   </div>
-</div>
+
+</article>
 
     </div>
     <!--
diff --git a/content/blog/index.html b/content/blog/index.html
index 08b2478..23508c8 100644
--- a/content/blog/index.html
+++ b/content/blog/index.html
@@ -139,6 +139,25 @@ limitations under the License.
 <p>This is the blog for the Apache Beam project. This blog contains news and updates
 for the project.</p>
 
+<h3 id="beam-summit-europe-2018"><a class="post-link" href="/blog/2018/08/21/beam-summit-europe.html">Beam Summit Europe 2018</a></h3>
+<p><i>Aug 21, 2018 •
+ Matthias Baetens [<a href="https://twitter.com/matthiasbaetens">@matthiasbaetens</a>]
+</i></p>
+
+<p>With a growing community of contributors and users, the Apache Beam project is organising the first European Beam Summit.</p>
+
+<p>We are happy to invite you to this event, which will take place in <strong>London</strong> on <strong>October 1st and 2nd of 2018</strong>.</p>
+
+<!-- Render a "read more" button if the post is longer than the excerpt -->
+
+<p>
+<a class="btn btn-default btn-sm" href="/blog/2018/08/21/beam-summit-europe.html" role="button">
+Read more&nbsp;<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
+</a>
+</p>
+
+<hr />
+
 <h3 id="a-review-of-input-streaming-connectors"><a class="post-link" href="/blog/2018/08/20/review-input-streaming-connectors.html">A review of input streaming connectors</a></h3>
 <p><i>Aug 20, 2018 •
  Leonid Kuligin [<a href="https://twitter.com/lkulighin">@lkulighin</a>] &amp; Julien Phalip [<a href="https://twitter.com/julienphalip">@julienphalip</a>]
diff --git a/content/feed.xml b/content/feed.xml
index 4fa53fd..cb30250 100644
--- a/content/feed.xml
+++ b/content/feed.xml
@@ -20,6 +20,50 @@
     <generator>Jekyll v3.2.0</generator>
     
       <item>
+        <title>Beam Summit Europe 2018</title>
+        <description>&lt;p&gt;With a growing community of contributors and users, the Apache Beam project is organising the first European Beam Summit.&lt;/p&gt;
+
+&lt;p&gt;We are happy to invite you to this event, which will take place in &lt;strong&gt;London&lt;/strong&gt; on &lt;strong&gt;October 1st and 2nd of 2018&lt;/strong&gt;. &lt;!--more--&gt;&lt;/p&gt;
+
+&lt;p&gt;&lt;img src=&quot;/images/blog/Facebook-AD.png&quot; alt=&quot;Beam Summit Europe 2018 flyer&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/p&gt;
+
+&lt;h3 id=&quot;what-is-the-beam-summit-2018&quot;&gt;What is the Beam Summit 2018?&lt;/h3&gt;
+&lt;p&gt;The summit is a 2 day, multi-track event.&lt;/p&gt;
+
+&lt;p&gt;During the first day we’ll host sessions to share use cases from companies using Apache Beam, community driven talks, and a session to discuss the project’s roadmap (from the main partners in the project as well as all users planning to contribute to the project and wanting to share their plans). We’ll also have break-out sessions that will allow cross team collaboration in multiple sub-topics.&lt;/p&gt;
+
+&lt;p&gt;The second day will be a “hands-on” day. We will offer an introductory session to Apache Beam. Additionally, we’ll host an advanced track for more advanced users with open-table discussions about more complex and newer Apache Beam features.&lt;/p&gt;
+
+&lt;p&gt;The agenda will grow and be communicated in the coming month, keep an eye on the page.&lt;/p&gt;
+
+&lt;h3 id=&quot;event-details&quot;&gt;Event Details&lt;/h3&gt;
+&lt;ul&gt;
+  &lt;li&gt;&lt;strong&gt;Venue&lt;/strong&gt;: &lt;a href=&quot;https://goo.gl/maps/LAC4haDzSzR2&quot;&gt;Level39, One Canada Square, Canary Wharf, London E14 5AB&lt;/a&gt;&lt;/li&gt;
+  &lt;li&gt;&lt;strong&gt;Dates&lt;/strong&gt;: 1-2 October 2018&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;h3 id=&quot;how-do-i-register&quot;&gt;How do I register?&lt;/h3&gt;
+&lt;p&gt;You can register for free on the &lt;a href=&quot;https://www.eventbrite.com/e/beam-summit-london-2018-tickets-49100625292#tickets&quot;&gt;Eventbrite registration page&lt;/a&gt;.&lt;/p&gt;
+
+&lt;h3 id=&quot;i-am-interested-in-speaking-how-do-i-propose-my-session&quot;&gt;I am interested in speaking, how do I propose my session?&lt;/h3&gt;
+&lt;p&gt;With this we are also launching a Call for Papers in case you want to secure a slot for one of the sessions. Please fill out the &lt;a href=&quot;https://goo.gl/forms/nrZOCC1JwEfLtKfA2&quot;&gt;CfP form&lt;/a&gt;.&lt;/p&gt;
+
+&lt;h3 id=&quot;id-love-to-get-involved-as-a-volunteer-or-sponsor&quot;&gt;I’d love to get involved as a volunteer or sponsor&lt;/h3&gt;
+&lt;p&gt;Furthermore, in order to keep this event free, we are looking for people to help out at and/or sponsor some parts of the conference. If you (or your company) are interested to help out, please reach out to: &lt;a href=&quot;mailto:baetensmatthias@gmail.com&quot;&gt;baetensmatthias@gmail.com&lt;/a&gt; or &lt;a href=&quot;mailto:alex@vanboxel.be&quot;&gt;alex@vanboxel.be&lt;/a&gt;. You can find more info in the &lt;a href=&quot;https://drive.google.com/file/d/1RnZ52rGaB6BR-EKneBca [...]
+
+&lt;p&gt;Thanks, and we hope to see you at the event! 
+The Events &amp;amp; Meetups Group&lt;/p&gt;
+</description>
+        <pubDate>Tue, 21 Aug 2018 01:00:01 -0700</pubDate>
+        <link>https://beam.apache.org/blog/2018/08/21/beam-summit-europe.html</link>
+        <guid isPermaLink="true">https://beam.apache.org/blog/2018/08/21/beam-summit-europe.html</guid>
+        
+        
+        <category>blog</category>
+        
+      </item>
+    
+      <item>
         <title>A review of input streaming connectors</title>
         <description>&lt;p&gt;In this post, you’ll learn about the current state of support for input streaming connectors in &lt;a href=&quot;/&quot;&gt;Apache Beam&lt;/a&gt;. For more context, you’ll also learn about the corresponding state of support in &lt;a href=&quot;https://spark.apache.org/&quot;&gt;Apache Spark&lt;/a&gt;.&lt;!--more--&gt;&lt;/p&gt;
 
@@ -2013,600 +2057,5 @@ p.run()
         
       </item>
     
-      <item>
-        <title>Stateful processing with Apache Beam</title>
-        <description>&lt;!--
-Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
---&gt;
-
-&lt;p&gt;Beam lets you process unbounded, out-of-order, global-scale data with portable
-high-level pipelines. Stateful processing is a new feature of the Beam model
-that expands the capabilities of Beam, unlocking new use cases and new
-efficiencies. In this post, I will guide you through stateful processing in
-Beam: how it works, how it fits in with the other features of the Beam model,
-what you might use it for, and what it looks like in code.&lt;/p&gt;
-
-&lt;!--more--&gt;
-
-&lt;blockquote&gt;
-  &lt;p&gt;&lt;strong&gt;Warning: new features ahead!&lt;/strong&gt;: This is a very new aspect of the Beam
-model. Runners are still adding support. You can try it out today on multiple
-runners, but do check the &lt;a href=&quot;/documentation/runners/capability-matrix/&quot;&gt;runner capability
-matrix&lt;/a&gt; for
-the current status in each runner.&lt;/p&gt;
-&lt;/blockquote&gt;
-
-&lt;p&gt;First, a quick recap: In Beam, a big data processing &lt;em&gt;pipeline&lt;/em&gt; is a directed,
-acyclic graph of parallel operations called &lt;em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;PTransforms&lt;/code&gt;&lt;/em&gt; processing data
-from &lt;em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;PCollections&lt;/code&gt;&lt;/em&gt;. I’ll expand on that by walking through this illustration:&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/pipeline.png&quot; alt=&quot;A Beam Pipeline - PTransforms are boxes - PCollections are arrows&quot; width=&quot;300&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;The boxes are &lt;code class=&quot;highlighter-rouge&quot;&gt;PTransforms&lt;/code&gt; and the edges represent the data in &lt;code class=&quot;highlighter-rouge&quot;&gt;PCollections&lt;/code&gt;
-flowing from one &lt;code class=&quot;highlighter-rouge&quot;&gt;PTransform&lt;/code&gt; to the next. A &lt;code class=&quot;highlighter-rouge&quot;&gt;PCollection&lt;/code&gt; may be &lt;em&gt;bounded&lt;/em&gt; (which
-means it is finite and you know it) or &lt;em&gt;unbounded&lt;/em&gt; (which means you don’t know if
-it is finite or not - basically, it is like an incoming stream of data that may
-or may not ever terminate). The cylinders are the data sources and sinks at the
-edges of your pipeline, such as bounded collections of log files or unbounded
-data streaming over a Kafka topic. This blog post isn’t about sources or sinks,
-but about what happens in between - your data processing.&lt;/p&gt;
-
-&lt;p&gt;There are two main building blocks for processing your data in Beam: &lt;em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt;&lt;/em&gt;,
-for performing an operation in parallel across all elements, and &lt;em&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;GroupByKey&lt;/code&gt;&lt;/em&gt;
-(and the closely related &lt;code class=&quot;highlighter-rouge&quot;&gt;CombinePerKey&lt;/code&gt; that I will talk about quite soon)
-for aggregating elements to which you have assigned the same key. In the
-picture below (featured in many of our presentations) the color indicates the
-key of the element. Thus the &lt;code class=&quot;highlighter-rouge&quot;&gt;GroupByKey&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;CombinePerKey&lt;/code&gt; transform gathers all the
-green squares to produce a single output element.&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/pardo-and-gbk.png&quot; alt=&quot;ParDo and GroupByKey/CombinePerKey:          Elementwise versus aggregating computations&quot; width=&quot;400&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;But not all use cases are easily expressed as pipelines of simple &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;Map&lt;/code&gt; and
-&lt;code class=&quot;highlighter-rouge&quot;&gt;GroupByKey&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;CombinePerKey&lt;/code&gt; transforms. The topic of this blog post is a new
-extension to the Beam programming model: &lt;strong&gt;per-element operation augmented with
-mutable state&lt;/strong&gt;.&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/stateful-pardo.png&quot; alt=&quot;Stateful ParDo - sequential per-key processing with persistent state&quot; width=&quot;300&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;In the illustration above, ParDo now has a bit of durable, consistent state on
-the side, which can be read and written during the processing of each element.
-The state is partitioned by key, so it is drawn as having disjoint sections for
-each color. It is also partitioned per window, but I thought plaid 
-&lt;img src=&quot;/images/blog/stateful-processing/plaid.png&quot; alt=&quot;A plaid storage cylinder&quot; width=&quot;20&quot; /&gt; 
-would be a bit much  :-). I’ll talk about
-why state is partitioned this way a bit later, via my first example.&lt;/p&gt;
-
-&lt;p&gt;For the rest of this post, I will describe this new feature of Beam in detail -
-how it works at a high level, how it differs from existing features, how to
-make sure it is still massively scalable. After that introduction at the model
-level, I’ll walk through a simple example of how you use it in the Beam Java
-SDK.&lt;/p&gt;
-
-&lt;h2 id=&quot;how-does-stateful-processing-in-beam-work&quot;&gt;How does stateful processing in Beam work?&lt;/h2&gt;
-
-&lt;p&gt;The processing logic of your &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt; transform is expressed through the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;
-that it applies to each element.  Without stateful augmentations, a &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; is a
-mostly-pure function from inputs to one or more outputs, corresponding to the
-Mapper in a MapReduce.  With state, a &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; has the ability to access
-persistent mutable state while processing each input element. Consider this
-illustration:&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/stateful-dofn.png&quot; alt=&quot;Stateful DoFn -          the runner controls input but the DoFn controls storage and output&quot; width=&quot;300&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;The first thing to note is that all the data - the little squares, circles, and
-triangles - are red. This is to illustrate that stateful processing occurs in
-the context of a single key - all of the elements are key-value pairs with the
-same key. Calls from your chosen Beam runner to the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; are colored in
-yellow, while calls from the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; to the runner are in purple:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;The runner invokes the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;’s &lt;code class=&quot;highlighter-rouge&quot;&gt;@ProcessElement&lt;/code&gt; method on each element for a
-key+window.&lt;/li&gt;
-  &lt;li&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; reads and writes state - the curved arrows to/from the storage on
-the side.&lt;/li&gt;
-  &lt;li&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; emits output (or side output) to the runner as usual via
-&lt;code class=&quot;highlighter-rouge&quot;&gt;ProcessContext.output&lt;/code&gt; (resp. &lt;code class=&quot;highlighter-rouge&quot;&gt;ProcessContext.sideOutput&lt;/code&gt;).&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;At this very high level, it is pretty intuitive: In your programming
-experience, you have probably at some point written a loop over elements that
-updates some mutable variables while performing other actions. The interesting
-question is how does this fit into the Beam model: how does it relate with
-other features? How does it scale, since state implies some synchronization?
-When should it be used versus other features?&lt;/p&gt;
-
-&lt;h2 id=&quot;how-does-stateful-processing-fit-into-the-beam-model&quot;&gt;How does stateful processing fit into the Beam model?&lt;/h2&gt;
-
-&lt;p&gt;To see where stateful processing fits in the Beam model, consider another
-way that you can keep some “state” while processing many elements: CombineFn. In
-Beam, you can write &lt;code class=&quot;highlighter-rouge&quot;&gt;Combine.perKey(CombineFn)&lt;/code&gt; in Java or Python to apply an
-associative, commutative accumulating operation across all the elements with a
-common key (and window).&lt;/p&gt;
-
-&lt;p&gt;Here is a diagram illustrating the basics of a &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt;, the simplest way
-that a runner might invoke it on a per-key basis to build an accumulator and
-extract an output from the final accumulator:&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/combinefn.png&quot; alt=&quot;CombineFn - the runner controls input, storage, and output&quot; width=&quot;300&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;As with the illustration of stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;, all the data is colored red, since
-this is the processing of Combine for a single key. The illustrated method
-calls are colored yellow, since they are all controlled by the runner: The
-runner invokes &lt;code class=&quot;highlighter-rouge&quot;&gt;addInput&lt;/code&gt; on each method to add it to the current accumulator.&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;The runner persists the accumulator when it chooses.&lt;/li&gt;
-  &lt;li&gt;The runner calls &lt;code class=&quot;highlighter-rouge&quot;&gt;extractOutput&lt;/code&gt; when ready to emit an output element.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;At this point, the diagram for &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt; looks a whole lot like the diagram
-for stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;. In practice, the flow of data is, indeed, quite similar.
-But there are important differences, even so:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;The runner controls all invocations and storage here. You do not decide when
-or how state is persisted, when an accumulator is discarded (based on
-triggering) or when output is extracted from an accumulator.&lt;/li&gt;
-  &lt;li&gt;You can only have one piece of state - the accumulator. In a stateful DoFn
-you can read only what you need to know and write only what has changed.&lt;/li&gt;
-  &lt;li&gt;You don’t have the extended features of &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;, such as multiple outputs per
-input or side outputs. (These could be simulated by a sufficient complex
-accumulator, but it would not be natural or efficient. Some other features of
-&lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; such as side inputs and access to the window make perfect sense for
-&lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt;)&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;But the main thing that &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt; allows a runner to do is to
-&lt;code class=&quot;highlighter-rouge&quot;&gt;mergeAccumulators&lt;/code&gt;, the concrete expression of the &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt;’s associativity.
-This unlocks some huge optimizations: the runner can invoke multiple instances
-of a &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt; on a number of inputs and later combine them in a classic
-divide-and-conquer architecture, as in this picture:&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/combiner-lifting.png&quot; alt=&quot;Divide-and-conquer aggregation with a CombineFn&quot; width=&quot;600&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;The contract of a &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt; is that the result should be exactly the same,
-whether or not the runner decides to actually do such a thing, or even more
-complex trees with hot-key fanout, etc.&lt;/p&gt;
-
-&lt;p&gt;This merge operation is not (necessarily) provided by a stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;: the
-runner cannot freely branch its execution and recombine the states. Note that
-the input elements are still received in an arbitrary order, so the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; should
-be insensitive to ordering and bundling but it doesn’t mean the output must be
-exactly equal. (fun and easy fact: if the outputs are actually always equal,
-then the &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; is an associative and commutative operator)&lt;/p&gt;
-
-&lt;p&gt;So now you can see how a stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; differs from &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt;, but I want to
-step back and extrapolate this to a high level picture of how state in Beam
-relates to using other features to achieve the same or similar goals: In a lot
-of cases, what stateful processing represents is a chance to “get under the
-hood” of the highly abstract mostly-deterministic functional paradigm of Beam
-and do potentially-nondeterministic imperative-style programming that is hard
-to express any other way.&lt;/p&gt;
-
-&lt;h2 id=&quot;example-arbitrary-but-consistent-index-assignment&quot;&gt;Example: arbitrary-but-consistent index assignment&lt;/h2&gt;
-
-&lt;p&gt;Suppose that you want to give an index to every incoming element for a
-key-and-window. You don’t care what the indices are, just as long as they are
-unique and consistent. Before diving into the code for how to do this in a Beam
-SDK, I’ll go over this example from the level of the model. In pictures, you
-want to write a transform that maps input to output like this:&lt;/p&gt;
-
-&lt;p&gt;&lt;img class=&quot;center-block&quot; src=&quot;/images/blog/stateful-processing/assign-indices.png&quot; alt=&quot;Assigning arbitrary but unique indices to each element&quot; width=&quot;180&quot; /&gt;&lt;/p&gt;
-
-&lt;p&gt;The order of the elements A, B, C, D, E is arbitrary, hence their assigned
-indices are arbitrary, but downstream transforms just need to be OK with this.
-There is no associativity or commutativity as far as the actual values are
-concerned. The order-insensitivity of this transform only extends to the point
-of ensuring the necessary properties of the output: no duplicated indices, no
-gaps, and every element gets an index.&lt;/p&gt;
-
-&lt;p&gt;Conceptually expressing this as a stateful loop is as trivial as you can
-imagine: The state you should store is the next index.&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;As an element comes in, output it along with the next index.&lt;/li&gt;
-  &lt;li&gt;Increment the index.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;This presents a good opportunity to talk about big data and parallelism,
-because the algorithm in those bullet points is not parallelizable at all! If
-you wanted to apply this logic over an entire &lt;code class=&quot;highlighter-rouge&quot;&gt;PCollection&lt;/code&gt;, you would have to
-process each element of the &lt;code class=&quot;highlighter-rouge&quot;&gt;PCollection&lt;/code&gt; one-at-a-time… this is obvious a
-bad idea.  State in Beam is tightly scoped so that most of the time a stateful
-&lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt; transform should still be possible for a runner to execute in parallel,
-though you still have to be thoughtful about it.&lt;/p&gt;
-
-&lt;p&gt;A state cell in Beam is scoped to a key+window pair. When your DoFn reads or
-writes state by the name of &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;index&quot;&lt;/code&gt;, it is actually accessing a mutable cell
-specified by &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;index&quot;&lt;/code&gt; &lt;em&gt;along with&lt;/em&gt; the key and window currently being
-processed.  So, when thinking about a state cell, it may be helpful to consider
-the full state of your transform as a table, where the rows are named according
-to names you use in your program, like &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;index&quot;&lt;/code&gt;, and the columns are
-key+window pairs, like this:&lt;/p&gt;
-
-&lt;table class=&quot;table&quot;&gt;
-  &lt;thead&gt;
-    &lt;tr&gt;
-      &lt;th&gt; &lt;/th&gt;
-      &lt;th&gt;(key, window)&lt;sub&gt;1&lt;/sub&gt;&lt;/th&gt;
-      &lt;th&gt;(key, window)&lt;sub&gt;2&lt;/sub&gt;&lt;/th&gt;
-      &lt;th&gt;(key, window)&lt;sub&gt;3&lt;/sub&gt;&lt;/th&gt;
-      &lt;th&gt;…&lt;/th&gt;
-    &lt;/tr&gt;
-  &lt;/thead&gt;
-  &lt;tbody&gt;
-    &lt;tr&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;index&quot;&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;3&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;7&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;15&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-    &lt;/tr&gt;
-    &lt;tr&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;fizzOrBuzz?&quot;&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;fizz&quot;&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;7&quot;&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;fizzbuzz&quot;&lt;/code&gt;&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-    &lt;/tr&gt;
-    &lt;tr&gt;
-      &lt;td&gt;…&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-      &lt;td&gt;…&lt;/td&gt;
-    &lt;/tr&gt;
-  &lt;/tbody&gt;
-&lt;/table&gt;
-
-&lt;p&gt;(if you have a superb spatial sense, feel free to imagine this as a cube where
-keys and windows are independent dimensions)&lt;/p&gt;
-
-&lt;p&gt;You can provide the opportunity for parallelism by making sure that table has
-enough columns. You might have many keys and many windows, or you might have
-many of just one or the other:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;Many keys in few windows, for example a globally windowed stateful computation
-keyed by user ID.&lt;/li&gt;
-  &lt;li&gt;Many windows over few keys, for example a fixed windowed stateful computation
-over a global key.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;Caveat: all Beam runners today parallelize only over the key.&lt;/p&gt;
-
-&lt;p&gt;Most often your mental model of state can be focused on only a single column of
-the table, a single key+window pair. Cross-column interactions do not occur
-directly, by design.&lt;/p&gt;
-
-&lt;h2 id=&quot;state-in-beams-java-sdk&quot;&gt;State in Beam’s Java SDK&lt;/h2&gt;
-
-&lt;p&gt;Now that I have talked a bit about stateful processing in the Beam model and
-worked through an abstract example, I’d like to show you what it looks like to
-write stateful processing code using Beam’s Java SDK.  Here is the code for a
-stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; that assigns an arbitrary-but-consistent index to each element
-on a per key-and-window basis:&lt;/p&gt;
-
-&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DoFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MyKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt; [...]
-
-  &lt;span class=&quot;c1&quot;&gt;// A state cell holding a single Integer per key+window&lt;/span&gt;
-  &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;index&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
-  &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StateSpec&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;indexSpec&lt;/span&gt;  [...]
-      &lt;span class=&quot;n&quot;&gt;StateSpecs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;VarIntCoder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
-
-  &lt;span class=&quot;nd&quot;&gt;@ProcessElement&lt;/span&gt;
-  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;processElement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
-      &lt;span class=&quot;n&quot;&gt;ProcessContext&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
-      &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;index&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;index&lt;/span&gt;&lt;span clas [...]
-    &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;current&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;firstNonNull&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/s [...]
-    &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;current&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;sp [...]
-    &lt;span class=&quot;n&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;current&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
-  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;div class=&quot;language-py highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# State and timers are not yet supported in Beam's Python SDK.&lt;/span&gt;
-&lt;span class=&quot;c&quot;&gt;# Watch this space!&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;p&gt;Let’s dissect this:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;The first thing to look at is the presence of a couple of &lt;code class=&quot;highlighter-rouge&quot;&gt;@StateId(&quot;index&quot;)&lt;/code&gt;
-annotations. This calls out that you are using a mutable state cell named
-“index” in this &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt;. The Beam Java SDK, and from there your chosen runner,
-will also note these annotations and use them to wire up your DoFn correctly.&lt;/li&gt;
-  &lt;li&gt;The first &lt;code class=&quot;highlighter-rouge&quot;&gt;@StateId(&quot;index&quot;)&lt;/code&gt; is annotated on a field of type &lt;code class=&quot;highlighter-rouge&quot;&gt;StateSpec&lt;/code&gt; (for
-“state specification”). This declares and configures the state cell. The
-type parameter &lt;code class=&quot;highlighter-rouge&quot;&gt;ValueState&lt;/code&gt; describes the kind of state you can get out of this
-cell - &lt;code class=&quot;highlighter-rouge&quot;&gt;ValueState&lt;/code&gt; stores just a single value. Note that the spec itself is not
-a usable state cell - you need the runner to provide that during pipeline
-execution.&lt;/li&gt;
-  &lt;li&gt;To fully specify a &lt;code class=&quot;highlighter-rouge&quot;&gt;ValueState&lt;/code&gt; cell, you need to provide the coder
-that the runner will use (as necessary) to serialize the value
-you will be storing. This is the invocation &lt;code class=&quot;highlighter-rouge&quot;&gt;StateSpecs.value(VarIntCoder.of())&lt;/code&gt;.&lt;/li&gt;
-  &lt;li&gt;The second &lt;code class=&quot;highlighter-rouge&quot;&gt;@StateId(&quot;index&quot;)&lt;/code&gt; annotation is on a parameter to your
-&lt;code class=&quot;highlighter-rouge&quot;&gt;@ProcessElement&lt;/code&gt; method. This indicates access to the ValueState cell that
-was specified earlier.&lt;/li&gt;
-  &lt;li&gt;The state is accessed in the simplest way: &lt;code class=&quot;highlighter-rouge&quot;&gt;read()&lt;/code&gt; to read it, and
-&lt;code class=&quot;highlighter-rouge&quot;&gt;write(newvalue)&lt;/code&gt; to write it.&lt;/li&gt;
-  &lt;li&gt;The other features of &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; are available in the usual way - such as
-&lt;code class=&quot;highlighter-rouge&quot;&gt;context.output(...)&lt;/code&gt;. You can also use side inputs, side outputs, gain access
-to the window, etc.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;A few notes on how the SDK and runners see this DoFn:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;Your state cells are all explicitly declared so a Beam SDK or runner can
-reason about them, for example to clear them out when a window expires.&lt;/li&gt;
-  &lt;li&gt;If you declare a state cell and then use it with the wrong type, the Beam
-Java SDK will catch that error for you.&lt;/li&gt;
-  &lt;li&gt;If you declare two state cells with the same ID, the SDK will catch that,
-too.&lt;/li&gt;
-  &lt;li&gt;The runner knows that this is a stateful &lt;code class=&quot;highlighter-rouge&quot;&gt;DoFn&lt;/code&gt; and may run it quite
-differently, for example by additional data shuffling and synchronization in
-order to avoid concurrent access to state cells.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;Let’s look at one more example of how to use this API, this time a bit more real-world.&lt;/p&gt;
-
-&lt;h2 id=&quot;example-anomaly-detection&quot;&gt;Example: anomaly detection&lt;/h2&gt;
-
-&lt;p&gt;Suppose you are feeding a stream of actions by your user into some complex
-model to predict some quantitative expression of the sorts of actions they
-take, for example to detect fraudulent activity. You will build up the model
-from events, and also compare incoming events against the latest model to
-determine if something has changed.&lt;/p&gt;
-
-&lt;p&gt;If you try to express the building of your model as a &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt;, you may have
-trouble with &lt;code class=&quot;highlighter-rouge&quot;&gt;mergeAccumulators&lt;/code&gt;. Assuming you could express that, it might
-look something like this:&lt;/p&gt;
-
-&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ModelFromEventsFn&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CombineFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;sp [...]
-    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
-    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;createAccumulator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
-      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;empty&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-
-    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
-    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;addInput&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accumulator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt; &lt;span class=&quot;n&q [...]
-      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accumulator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// this is encouraged to mutate, for efficiency&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-
-    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
-    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;mergeAccumulators&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Iterable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span c [...]
-      &lt;span class=&quot;c1&quot;&gt;// ?? can you write this ??&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-
-    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
-    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;extractOutput&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accumulator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
-      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;accumulator&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;div class=&quot;language-py highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# State and timers are not yet supported in Beam's Python SDK.&lt;/span&gt;
-&lt;span class=&quot;c&quot;&gt;# Watch this space!&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;p&gt;Now you have a way to compute the model of a particular user for a window as
-&lt;code class=&quot;highlighter-rouge&quot;&gt;Combine.perKey(new ModelFromEventsFn())&lt;/code&gt;. How would you apply this model to
-the same stream of events from which it is calculated? A standard way to do
-take the result of a &lt;code class=&quot;highlighter-rouge&quot;&gt;Combine&lt;/code&gt; transform and use it while processing the
-elements of a &lt;code class=&quot;highlighter-rouge&quot;&gt;PCollection&lt;/code&gt; is to read it as a side input to a &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt;
-transform. So you could side input the model and check the stream of events
-against it, outputting the prediction, like so:&lt;/p&gt;
-
-&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;PCollection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o& [...]
-
-&lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PCollectionView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=& [...]
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Combine&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;perKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ModelFromEventsFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()))&l [...]
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;asMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
-
-&lt;span class=&quot;n&quot;&gt;PCollection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;predictions&lt;/span&gt; &lt;span cl [...]
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ParDo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DoFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt; [...]
-
-      &lt;span class=&quot;nd&quot;&gt;@ProcessElement&lt;/span&gt;
-      &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;processElement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ProcessContext&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
-        &lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;userId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-        &lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-
-        &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ctx&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;sideinput&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;userModels&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&l [...]
-
-        &lt;span class=&quot;c1&quot;&gt;// Perhaps some logic around when to output a new prediction&lt;/span&gt;
-        &lt;span class=&quot;err&quot;&gt;…&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;userId&lt;/span&gt;&lt;spa [...]
-      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;}));&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;div class=&quot;language-py highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# State and timers are not yet supported in Beam's Python SDK.&lt;/span&gt;
-&lt;span class=&quot;c&quot;&gt;# Watch this space!&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;p&gt;In this pipeline, there is just one model emitted by the &lt;code class=&quot;highlighter-rouge&quot;&gt;Combine.perKey(...)&lt;/code&gt;
-per user, per window, which is then prepared for side input by the &lt;code class=&quot;highlighter-rouge&quot;&gt;View.asMap()&lt;/code&gt;
-transform. The processing of the &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt; over events will block until that side
-input is ready, buffering events, and will then check each event against the
-model. This is a high latency, high completeness solution: The model takes into
-account all user behavior in the window, but there can be no output until the
-window is complete.&lt;/p&gt;
-
-&lt;p&gt;Suppose you want to get some results earlier, or don’t even have any
-natural windowing, but just want continuous analysis with the “model so far”,
-even though your model may not be as complete. How can you control the updates
-to the model against which you are checking your events? Triggers are the
-generic Beam feature for managing completeness versus latency tradeoffs. So here
-is the same pipeline with an added trigger that outputs a new model one second
-after input arrives:&lt;/p&gt;
-
-&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;PCollection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt;&lt;span class=&quot;o& [...]
-
-&lt;span class=&quot;n&quot;&gt;PCollectionView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;userModels&lt;/span&gt; &lt;span cla [...]
-
-    &lt;span class=&quot;c1&quot;&gt;// A tradeoff between latency and cost&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Window&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;triggering&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
-        &lt;span class=&quot;n&quot;&gt;AfterProcessingTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pastFirstElementInPane&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Duration&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;standardSeconds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;spa [...]
-
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Combine&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;perKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ModelFromEventsFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()))&l [...]
-    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;asMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;div class=&quot;language-py highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# State and timers are not yet supported in Beam's Python SDK.&lt;/span&gt;
-&lt;span class=&quot;c&quot;&gt;# Watch this space!&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;p&gt;This is often a pretty nice tradeoff between latency and cost: If a huge flood
-of events comes in a second, then you will only emit one new model, so you
-won’t be flooded with model outputs that you cannot even use before they are
-obsolete. In practice, the new model may not be present on the side input
-channel until many more seconds have passed, due to caches and processing
-delays preparing the side input. Many events (maybe an entire batch of
-activity) will have passed through the &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt; and had their predictions
-calculated according to the prior model. If the runner gave a tight enough
-bound on cache expirations and you used a more aggressive trigger, you might be
-able to improve latency at additional cost.&lt;/p&gt;
-
-&lt;p&gt;But there is another cost to consider: you are outputting many uninteresting
-outputs from the &lt;code class=&quot;highlighter-rouge&quot;&gt;ParDo&lt;/code&gt; that will be processed downstream. If the
-“interestingness” of the output is only well-defined relative to the prior
-output, then you cannot use a &lt;code class=&quot;highlighter-rouge&quot;&gt;Filter&lt;/code&gt; transform to reduce data volume downstream.&lt;/p&gt;
-
-&lt;p&gt;Stateful processing lets you address both the latency problem of side inputs
-and the cost problem of excessive uninteresting output. Here is the code, using
-only features I have already introduced:&lt;/p&gt;
-
-&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DoFn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt [...]
-
-  &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;model&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
-  &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StateSpec&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;modelSpec&lt;/span&gt; &l [...]
-      &lt;span class=&quot;n&quot;&gt;StateSpecs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;coder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
-
-  &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;previousPrediction&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
-  &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StateSpec&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;previousPredictionSp [...]
-      &lt;span class=&quot;n&quot;&gt;StateSpecs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;coder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
-
-  &lt;span class=&quot;nd&quot;&gt;@ProcessElement&lt;/span&gt;
-  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;processElement&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
-      &lt;span class=&quot;n&quot;&gt;ProcessContext&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
-      &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;previousPrediction&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;previousPredict [...]
-      &lt;span class=&quot;nd&quot;&gt;@StateId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;model&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ValueState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;modelState&lt;/span&gt;&lt;span c [...]
-    &lt;span class=&quot;n&quot;&gt;UserId&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;userId&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-    &lt;span class=&quot;n&quot;&gt;Event&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;event&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
-
-    &lt;span class=&quot;n&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;modelState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-    &lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;previousPrediction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;previousPredictionState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
-    &lt;span class=&quot;n&quot;&gt;Prediction&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;newPrediction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;prediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
-    &lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
-    &lt;span class=&quot;n&quot;&gt;modelState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
-    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;previousPrediction&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt; 
-        &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;shouldOutputNewPrediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;previousPrediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;newPrediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
-      &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;KV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;userId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span cl [...]
-      &lt;span class=&quot;n&quot;&gt;previousPredictionState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;newPrediction&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
-    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
-&lt;span class=&quot;o&quot;&gt;};&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;div class=&quot;language-py highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# State and timers are not yet supported in Beam's Python SDK.&lt;/span&gt;
-&lt;span class=&quot;c&quot;&gt;# Watch this space!&lt;/span&gt;
-&lt;/code&gt;&lt;/pre&gt;
-&lt;/div&gt;
-
-&lt;p&gt;Let’s walk through it,&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;You have two state cells declared, &lt;code class=&quot;highlighter-rouge&quot;&gt;@StateId(&quot;model&quot;)&lt;/code&gt; to hold the current
-state of the model for a user and &lt;code class=&quot;highlighter-rouge&quot;&gt;@StateId(&quot;previousPrediction&quot;)&lt;/code&gt; to hold
-the prediction output previously.&lt;/li&gt;
-  &lt;li&gt;Access to the two state cells by annotation in the &lt;code class=&quot;highlighter-rouge&quot;&gt;@ProcessElement&lt;/code&gt; method
-is as before.&lt;/li&gt;
-  &lt;li&gt;You read the current model via &lt;code class=&quot;highlighter-rouge&quot;&gt;modelState.read()&lt;/code&gt;. Because state is also
-per-key-and-window, this is a model just for the UserId of the Event
-currently being processed.&lt;/li&gt;
-  &lt;li&gt;You derive a new prediction &lt;code class=&quot;highlighter-rouge&quot;&gt;model.prediction(event)&lt;/code&gt; and compare it against
-the last one you output, accessed via &lt;code class=&quot;highlighter-rouge&quot;&gt;previousPredicationState.read()&lt;/code&gt;.&lt;/li&gt;
-  &lt;li&gt;You then update the model &lt;code class=&quot;highlighter-rouge&quot;&gt;model.update()&lt;/code&gt; and write it via
-&lt;code class=&quot;highlighter-rouge&quot;&gt;modelState.write(...)&lt;/code&gt;. It is perfectly fine to mutate the value you pulled
-out of state as long as you also remember to write the mutated value, in the
-same way you are encouraged to mutate &lt;code class=&quot;highlighter-rouge&quot;&gt;CombineFn&lt;/code&gt; accumulators.&lt;/li&gt;
-  &lt;li&gt;If the prediction has changed a significant amount since the last time you
-output, you emit it via &lt;code class=&quot;highlighter-rouge&quot;&gt;context.output(...)&lt;/code&gt; and save the prediction using
-&lt;code class=&quot;highlighter-rouge&quot;&gt;previousPredictionState.write(...)&lt;/code&gt;. Here the decision is relative to the
-prior prediction output, not the last one computed - realistically you might
-have some complex conditions here.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;p&gt;Most of the above is just talking through Java! But before you go out and
-convert all of your pipelines to use stateful processing, I want to go over
-some considerations as to whether it is a good fit for your use case.&lt;/p&gt;
-
-&lt;h2 id=&quot;performance-considerations&quot;&gt;Performance considerations&lt;/h2&gt;
-
-&lt;p&gt;To decide whether to use per-key-and-window state, you need to consider how it
-executes. You can dig into how a particular runner manages state, but there are
-some general things to keep in mind:&lt;/p&gt;
-
-&lt;ul&gt;
-  &lt;li&gt;Partitioning per-key-and-window: perhaps the most important thing to
-consider is that the runner may have to shuffle your data to colocate all
-the data for a particular key+window. If the data is already shuffled
-correctly, the runner may take advantage of this.&lt;/li&gt;
-  &lt;li&gt;Synchronization overhead: the API is designed so the runner takes care of
-concurrency control, but this means that the runner cannot parallelize
-processing of elements for a particular key+window even when it would otherwise
-be advantageous.&lt;/li&gt;
-  &lt;li&gt;Storage and fault tolerance of state: since state is per-key-and-window, the
-more keys and windows you expect to process simultaneously, the more storage
-you will incur. Because state benefits from all the fault tolerance /
-consistency properties of your other data in Beam, it also adds to the cost of
-committing the results of processing.&lt;/li&gt;
-  &lt;li&gt;Expiration of state: also since state is per-window, the runner can reclaim
-the resources when a window expires (when the watermark exceeds its allowed
-lateness) but this could mean that the runner is tracking an additional timer
-per key and window to cause reclamation code to execute.&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;h2 id=&quot;go-use-it&quot;&gt;Go use it!&lt;/h2&gt;
-
-&lt;p&gt;If you are new to Beam, I hope you are now interested in seeing if Beam with
-stateful processing addresses your use case.  If you are already using Beam, I
-hope this new addition to the model unlocks new use cases for you.  Do check
-the &lt;a href=&quot;/documentation/runners/capability-matrix/&quot;&gt;capability
-matrix&lt;/a&gt; to
-see the level of support for this new model feature on your favorite
-backend(s).&lt;/p&gt;
-
-&lt;p&gt;And please do join the community at
-&lt;a href=&quot;/get-started/support&quot;&gt;user@beam.apache.org&lt;/a&gt;. We’d love to
-hear from you.&lt;/p&gt;
-</description>
-        <pubDate>Mon, 13 Feb 2017 00:00:01 -0800</pubDate>
-        <link>https://beam.apache.org/blog/2017/02/13/stateful-processing.html</link>
-        <guid isPermaLink="true">https://beam.apache.org/blog/2017/02/13/stateful-processing.html</guid>
-        
-        
-        <category>blog</category>
-        
-      </item>
-    
   </channel>
 </rss>
diff --git a/content/images/blog/Facebook-AD.png b/content/images/blog/Facebook-AD.png
new file mode 100644
index 0000000..5493545
Binary files /dev/null and b/content/images/blog/Facebook-AD.png differ
diff --git a/content/index.html b/content/index.html
index 33e68cf..dbdaf3d 100644
--- a/content/index.html
+++ b/content/index.html
@@ -162,6 +162,11 @@ limitations under the License.
           </div>
           <div class="hero__blog__cards">
             
+            <a class="hero__blog__cards__card" href="/blog/2018/08/21/beam-summit-europe.html">
+              <div class="hero__blog__cards__card__title">Beam Summit Europe 2018</div>
+              <div class="hero__blog__cards__card__date">Aug 21, 2018</div>
+            </a>
+            
             <a class="hero__blog__cards__card" href="/blog/2018/08/20/review-input-streaming-connectors.html">
               <div class="hero__blog__cards__card__title">A review of input streaming connectors</div>
               <div class="hero__blog__cards__card__date">Aug 20, 2018</div>
@@ -172,11 +177,6 @@ limitations under the License.
               <div class="hero__blog__cards__card__date">Aug 10, 2018</div>
             </a>
             
-            <a class="hero__blog__cards__card" href="/blog/2018/06/26/beam-2.5.0.html">
-              <div class="hero__blog__cards__card__title">Apache Beam 2.5.0</div>
-              <div class="hero__blog__cards__card__date">Jun 26, 2018</div>
-            </a>
-            
           </div>
         </div>
       </div>