[FLINK-21955] Remove outdated examples

The new examples are now at apache/flink-statefun-playground
diff --git a/pom.xml b/pom.xml
index fc84524..5fa40ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,6 @@
         <module>statefun-sdk-java</module>
         <module>statefun-kafka-io</module>
         <module>statefun-kinesis-io</module>
-        <module>statefun-examples</module>
         <module>statefun-flink</module>
         <module>statefun-quickstart</module>
         <module>statefun-shaded</module>
diff --git a/statefun-examples/pom.xml b/statefun-examples/pom.xml
deleted file mode 100644
index e0df9d8..0000000
--- a/statefun-examples/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>statefun-parent</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>statefun-examples</artifactId>
-    <name>statefun-examples</name>
-    <packaging>pom</packaging>
-
-    <modules>
-        <module>statefun-greeter-example</module>
-        <module>statefun-ridesharing-example</module>
-        <module>statefun-flink-harness-example</module>
-        <module>statefun-shopping-cart-example</module>
-        <module>statefun-async-example</module>
-        <module>statefun-state-processor-example</module>
-        <module>statefun-flink-datastream-example</module>
-    </modules>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
-
diff --git a/statefun-examples/statefun-async-example/pom.xml b/statefun-examples/statefun-async-example/pom.xml
deleted file mode 100644
index 2d19c5e..0000000
--- a/statefun-examples/statefun-async-example/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-async-example</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-flink-harness</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Constants.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Constants.java
deleted file mode 100644
index 4a7e316..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Constants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async;
-
-import org.apache.flink.statefun.examples.async.events.TaskCompletionEvent;
-import org.apache.flink.statefun.examples.async.events.TaskStartedEvent;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.io.IngressIdentifier;
-
-final class Constants {
-
-  static final IngressIdentifier<TaskStartedEvent> REQUEST_INGRESS =
-      new IngressIdentifier<>(
-          TaskStartedEvent.class, "org.apache.flink.statefun.examples.async", "tasks");
-
-  static final EgressIdentifier<TaskCompletionEvent> RESULT_EGRESS =
-      new EgressIdentifier<>(
-          "org.apache.flink.statefun.examples.async", "out", TaskCompletionEvent.class);
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Module.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Module.java
deleted file mode 100644
index ed9bf96..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/Module.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import org.apache.flink.statefun.examples.async.service.DummyTaskQueryService;
-import org.apache.flink.statefun.examples.async.service.TaskQueryService;
-import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
-
-@AutoService(StatefulFunctionModule.class)
-public class Module implements StatefulFunctionModule {
-
-  @Override
-  public void configure(Map<String, String> globalConfiguration, Binder binder) {
-    TaskQueryService service = new DummyTaskQueryService();
-
-    binder.bindFunctionProvider(
-        TaskDurationTrackerFunction.TYPE, unused -> new TaskDurationTrackerFunction(service));
-
-    binder.bindIngressRouter(
-        Constants.REQUEST_INGRESS,
-        (message, downstream) ->
-            downstream.forward(TaskDurationTrackerFunction.TYPE, message.getTaskId(), message));
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/TaskDurationTrackerFunction.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/TaskDurationTrackerFunction.java
deleted file mode 100644
index 6624269..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/TaskDurationTrackerFunction.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async;
-
-import java.time.Duration;
-import java.util.Objects;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.flink.statefun.examples.async.events.TaskCompletionEvent;
-import org.apache.flink.statefun.examples.async.events.TaskStartedEvent;
-import org.apache.flink.statefun.examples.async.service.TaskQueryService;
-import org.apache.flink.statefun.examples.async.service.TaskStatus;
-import org.apache.flink.statefun.sdk.AsyncOperationResult;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-
-/**
- * TaskDurationTrackerFunction - demonstrates the use of asynchronous operations.
- *
- * <p>In this example scenario there are tasks executing in an an external system, the external
- * system exposes a {@link TaskQueryService} that can report back the status of each individual
- * task, in addition the external system generates a {@link TaskStartedEvent} with the task id and
- * creation time.
- *
- * <p>This function reacts to {@link TaskStartedEvent} and pulls the external {@link
- * TaskQueryService} for the task completion, when finally the task completes, this function
- * produces an {@link TaskCompletionEvent} with the task execution duration.
- */
-final class TaskDurationTrackerFunction implements StatefulFunction {
-
-  static final FunctionType TYPE =
-      new FunctionType("org.apache.flink.statefun.examples.async", "duration-tracker");
-
-  private final TaskQueryService service;
-
-  TaskDurationTrackerFunction(TaskQueryService service) {
-    this.service = Objects.requireNonNull(service);
-  }
-
-  @Override
-  public void invoke(Context context, Object message) {
-    if (message instanceof TaskStartedEvent) {
-      // We received a TaskStartedEvent, in response, we need to check with an external service what
-      // is the status of that task. Since the external service (represented by the client) is
-      // asynchronous (returns a CompletableFuture) we register that future as a pending
-      // asynchronous operation, and we will
-      // get notified once the async operation completes via the special AsyncOperationResult
-      // message.
-      // we also attach the original input message as metadata to the async operation.
-      TaskStartedEvent e = (TaskStartedEvent) message;
-      CompletableFuture<TaskStatus> result = service.getTaskStatusAsync(e.getTaskId());
-      context.registerAsyncOperation(message, result);
-      return;
-    }
-    if (message instanceof AsyncOperationResult) {
-      // This is a result of an async operation we have previously registered.
-      // The message's metadata would be the original input event that triggered the async operation
-      // (TaskStartedEvent)
-      // and possibly the asynchronously computed TaskStatus.
-      @SuppressWarnings("unchecked")
-      AsyncOperationResult<TaskStartedEvent, TaskStatus> asyncOp =
-          (AsyncOperationResult<TaskStartedEvent, TaskStatus>) message;
-
-      onAsyncOperationResultEvent(context, asyncOp);
-      return;
-    }
-    throw new IllegalArgumentException("Unknown event " + message);
-  }
-
-  /**
-   * Handle the result of an asynchronous operation. The logic of this example is as follows: 1. If
-   * the async operation itself failed (i.e. IOException, TimeoutException etc') just blindly retry
-   * within a second 2. If the
-   */
-  private static void onAsyncOperationResultEvent(
-      Context context, AsyncOperationResult<TaskStartedEvent, TaskStatus> asyncOp) {
-
-    // We have attached the original TaskStartedEvent as a metadata, when registering the async
-    // operation, so we can just grab it.
-    final TaskStartedEvent e = asyncOp.metadata();
-
-    if (!asyncOp.successful()) {
-      // Something went wrong while trying to obtain the TaskStatus asynchronously, we can inspect
-      // the cause by
-      // calling asyncOp.throwable() or asking if the status is unknown (asyncOp.unknown())
-      // in any case we retry in 1 second, by just sending a delayed message to ourselves.
-      Duration delay = oneSecondPlusJitter();
-      context.sendAfter(delay, context.self(), e);
-      return;
-    }
-    // The async op has completed successfully now we can obtain the asynchronously computed value.
-    final TaskStatus status = asyncOp.value();
-    if (!status.isCompleted()) {
-      // The task status is not yet complete, therefore we need to pull the status again at some
-      // later point in time, lets retry in 10 seconds
-      context.sendAfter(Duration.ofSeconds(10), context.self(), e);
-      return;
-    }
-    handleCompletedTask(context, e, status);
-  }
-
-  /**
-   * compute a duration that represents slightly more than one second (with a random jitter) to
-   * avoid thundering herds.
-   */
-  private static Duration oneSecondPlusJitter() {
-    final long randomJitter = ThreadLocalRandom.current().nextLong(1_000, 1_250);
-    return Duration.ofMillis(randomJitter);
-  }
-
-  /** The task was completed, we can compute the task execution duration and emit it downstream. */
-  private static void handleCompletedTask(
-      Context context, TaskStartedEvent taskStartedEvent, TaskStatus finishedTaskStatus) {
-
-    TaskCompletionEvent taskCompletionEvent =
-        new TaskCompletionEvent(
-            taskStartedEvent.getTaskId(),
-            taskStartedEvent.getStartTime(),
-            finishedTaskStatus.getCompletionTime());
-
-    context.send(Constants.RESULT_EGRESS, taskCompletionEvent);
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskCompletionEvent.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskCompletionEvent.java
deleted file mode 100644
index 6773732..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskCompletionEvent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async.events;
-
-/** A message represents an event of a task completion. */
-public final class TaskCompletionEvent {
-  private final String taskId;
-  private final Long startTime;
-  private final Long endTime;
-
-  public TaskCompletionEvent(String taskId, Long startTime, Long endTime) {
-    this.taskId = taskId;
-    this.startTime = startTime;
-    this.endTime = endTime;
-  }
-
-  public String getTaskId() {
-    return taskId;
-  }
-
-  public Long getStartTime() {
-    return startTime;
-  }
-
-  public Long getEndTime() {
-    return endTime;
-  }
-
-  @Override
-  public String toString() {
-    return String.format("TaskCompletionEvent(id: %s, duration: %d)", taskId, endTime - startTime);
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskStartedEvent.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskStartedEvent.java
deleted file mode 100644
index 90a8ef5..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/events/TaskStartedEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async.events;
-
-/** A message represents an event of a new task was created. A task has an id and a startingTime. */
-public final class TaskStartedEvent {
-  private final String taskId;
-  private final Long startTime;
-
-  public TaskStartedEvent(String taskId, Long startTime) {
-    this.taskId = taskId;
-    this.startTime = startTime;
-  }
-
-  public String getTaskId() {
-    return taskId;
-  }
-
-  public Long getStartTime() {
-    return startTime;
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/DummyTaskQueryService.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/DummyTaskQueryService.java
deleted file mode 100644
index e9e4b93..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/DummyTaskQueryService.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async.service;
-
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-
-/**
- * A dummy implementation that simulates a service that might take a while to compute it's result.
- */
-public final class DummyTaskQueryService implements TaskQueryService {
-
-  /**
-   * used to complete the futures after an artificial random delay, that simulates network latency,
-   * service busyness etc'
-   */
-  private final ScheduledExecutorService executor = newScheduledExecutorService();
-
-  public CompletableFuture<TaskStatus> getTaskStatusAsync(String taskId) {
-    CompletableFuture<TaskStatus> result = new CompletableFuture<>();
-
-    final long randomCompletionDelay = ThreadLocalRandom.current().nextLong(5_000);
-    executor.schedule(
-        completeRandomly(taskId, result), randomCompletionDelay, TimeUnit.MILLISECONDS);
-
-    return result;
-  }
-
-  /**
-   * returns a {@link Runnable}, that when runs, it completes the supplied future {@code result}
-   * with a {@link TaskStatus} that might be either done or still running. If done, then the task
-   * status would have a completion time.
-   */
-  private static Runnable completeRandomly(String taskId, CompletableFuture<TaskStatus> result) {
-    return () -> {
-      boolean taskStatus = ThreadLocalRandom.current().nextBoolean();
-
-      if (taskStatus) {
-        final long now = System.currentTimeMillis();
-        result.complete(new TaskStatus(taskId, true, now));
-      } else {
-        result.complete(new TaskStatus(taskId, false, null));
-      }
-    };
-  }
-
-  /** A scheduled executor service with daemon threads. */
-  private static ScheduledExecutorService newScheduledExecutorService() {
-    return Executors.newSingleThreadScheduledExecutor(
-        r -> {
-          Thread t = new Thread(r);
-          t.setDaemon(true);
-          return t;
-        });
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskQueryService.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskQueryService.java
deleted file mode 100644
index 42b08fd..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskQueryService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async.service;
-
-import java.util.concurrent.CompletableFuture;
-
-/** A remote service that keeps task status by id. */
-public interface TaskQueryService {
-
-  /**
-   * Retrieves a {@link TaskStatus} of a task with an @taskId.
-   *
-   * @param taskId the task to retrieves it's status
-   * @return the status of the task.
-   */
-  CompletableFuture<TaskStatus> getTaskStatusAsync(String taskId);
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskStatus.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskStatus.java
deleted file mode 100644
index 04e5df2..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/TaskStatus.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async.service;
-
-/**
- * Represents A task status, as returned from the Dummy task service.
- *
- * <p>A Task might be either completed or uncompleted. If a task is completed then it would also
- * have a completion time.
- */
-public class TaskStatus {
-  private final String taskId;
-  private final boolean completed;
-  private final Long completionTime;
-
-  TaskStatus(String taskId, boolean completed, Long completionTime) {
-    this.taskId = taskId;
-    this.completed = completed;
-    this.completionTime = completionTime;
-  }
-
-  public String getTaskId() {
-    return taskId;
-  }
-
-  public boolean isCompleted() {
-    return completed;
-  }
-
-  public Long getCompletionTime() {
-    return completionTime;
-  }
-}
diff --git a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/package-info.java b/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/package-info.java
deleted file mode 100644
index a4aec7c..0000000
--- a/statefun-examples/statefun-async-example/src/main/java/org/apache/flink/statefun/examples/async/service/package-info.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * This package represents a fictions service that needs to compute something asynchronously. In
- * this example, a query service keeps tack of tasks that are executed elsewhere (perhaps some
- * worker pool outside of the application) see: {@link
- * org.apache.flink.statefun.examples.async.service.TaskQueryService}. In reality, functions might
- * want to compute something asynchronously like sending an http request, querying a remote
- * database, or anything really that needs some time to complete.
- */
-package org.apache.flink.statefun.examples.async.service;
diff --git a/statefun-examples/statefun-async-example/src/test/java/org/apache/flink/statefun/examples/async/RunnerTest.java b/statefun-examples/statefun-async-example/src/test/java/org/apache/flink/statefun/examples/async/RunnerTest.java
deleted file mode 100644
index c246f44..0000000
--- a/statefun-examples/statefun-async-example/src/test/java/org/apache/flink/statefun/examples/async/RunnerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.async;
-
-import java.util.concurrent.ThreadLocalRandom;
-import javax.annotation.Nonnull;
-import org.apache.flink.statefun.examples.async.events.TaskStartedEvent;
-import org.apache.flink.statefun.flink.harness.Harness;
-import org.apache.flink.statefun.flink.harness.io.SerializableSupplier;
-import org.apache.flink.util.StringUtils;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class RunnerTest {
-
-  @Ignore(
-      "This has an infinite egress and it would never complete, un-ignore to execute in the IDE")
-  @Test
-  public void run() throws Exception {
-    Harness harness =
-        new Harness()
-            .withKryoMessageSerializer()
-            .withSupplyingIngress(Constants.REQUEST_INGRESS, new MessageGenerator())
-            .withPrintingEgress(Constants.RESULT_EGRESS);
-
-    harness.start();
-  }
-
-  /** generate a random message, once a second a second. */
-  private static final class MessageGenerator implements SerializableSupplier<TaskStartedEvent> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public TaskStartedEvent get() {
-      try {
-        Thread.sleep(1_000);
-      } catch (InterruptedException e) {
-        throw new RuntimeException("Interrupted", e);
-      }
-      return randomMessage();
-    }
-
-    @Nonnull
-    private TaskStartedEvent randomMessage() {
-      final ThreadLocalRandom random = ThreadLocalRandom.current();
-      final String taskId = StringUtils.generateRandomAlphanumericString(random, 2);
-      return new TaskStartedEvent(taskId, System.currentTimeMillis());
-    }
-  }
-}
diff --git a/statefun-examples/statefun-async-python-example/README.md b/statefun-examples/statefun-async-python-example/README.md
deleted file mode 100644
index 417bfdb..0000000
--- a/statefun-examples/statefun-async-python-example/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# The Greeter Example
-
-This is a simple example that runs a asynchrouns stateful function that accepts requests from a Kafka ingress,
-and then responds by sending greeting responses to a Kafka egress. It demonstrates the primitive building blocks
-of a Stateful Functions applications, such as ingresses, handling state in functions,
-and sending messages to egresses.
-
-
-## Building the example
-
-1) Make sure that you have built the Python distribution
-   To build the distribution
-    -  `cd statefun-python-sdk/`
-    -  `./build-distribution.sh`
-    
-2) Run `./build-example.sh` 
-
-## Running the example
-
-To run the example:
-
-```
-./build-example.sh
-docker-compose up -d
-```
-
-Then, to see the example in actions, see what comes out of the topic `greetings`:
-
-```
-docker-compose logs -f event-generator
-```
-
diff --git a/statefun-examples/statefun-async-python-example/build-example.sh b/statefun-examples/statefun-async-python-example/build-example.sh
deleted file mode 100755
index 9440c5d..0000000
--- a/statefun-examples/statefun-async-python-example/build-example.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# clean
-rm -f apache_flink_statefun-*-py3-none-any.whl
-rm -rf __pycache__
-
-# copy the whl distribution
-cp ../../statefun-python-sdk/dist/apache_flink_statefun-*-py3-none-any.whl greeter/apache_flink_statefun-snapshot-py3-none-any.whl 2>/dev/null
-rc=$?
-if [[ ${rc} -ne 0 ]]; then
-    echo "Failed copying the whl distribution, please build the Python distribution first."
-    echo "To build the distribution:"
-    echo "  goto to statefun-python-sdk/"
-    echo "  call ./build-distribution.sh"
-    exit 1;
-fi
-
-# build
-
-docker-compose build
-
-rm -f greeter/apache_flink_statefun-*-py3-none-any.whl
-
-echo "Done. To start the example run: docker-compose up"
-
diff --git a/statefun-examples/statefun-async-python-example/docker-compose.yml b/statefun-examples/statefun-async-python-example/docker-compose.yml
deleted file mode 100644
index 66027f4..0000000
--- a/statefun-examples/statefun-async-python-example/docker-compose.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-version: "2.1"
-services:
-  zookeeper:
-    image: wurstmeister/zookeeper
-    ports:
-      - "2181:2181"
-  kafka-broker:
-    image: wurstmeister/kafka:2.12-2.0.1
-    ports:
-      - "9092:9092"
-    environment:
-      HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
-      KAFKA_CREATE_TOPICS: "names:1:1,greetings:1:1"
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
-    depends_on:
-      - zookeeper
-    volumes:
-      - /var/run/docker.sock:/var/run/docker.sock
-  master:
-    build:
-      context: statefun
-    expose:
-      - "6123"
-    ports:
-      - "8081:8081"
-    environment:
-      - ROLE=master
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-  worker:
-    build:
-      context: statefun
-    expose:
-      - "6121"
-      - "6122"
-    depends_on:
-      - master
-      - kafka-broker
-    links:
-      - "master:master"
-      - "kafka-broker:kafka-broker"
-    environment:
-      - ROLE=worker
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-  python-worker:
-    build:
-      context: ./greeter
-    expose:
-      - "8000"
-  event-generator:
-    build:
-      context: generator
-      dockerfile: Dockerfile
-    depends_on:
-      - kafka-broker
diff --git a/statefun-examples/statefun-async-python-example/generator/Dockerfile b/statefun-examples/statefun-async-python-example/generator/Dockerfile
deleted file mode 100644
index 5bcca13..0000000
--- a/statefun-examples/statefun-async-python-example/generator/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM python:3.7-alpine
-
-RUN mkdir -p /app
-WORKDIR /app
-
-RUN pip install kafka-python
-
-COPY event-generator.py /app
-
-CMD ["python", "/app/event-generator.py"]
-
-
diff --git a/statefun-examples/statefun-async-python-example/generator/event-generator.py b/statefun-examples/statefun-async-python-example/generator/event-generator.py
deleted file mode 100644
index ff0a45b..0000000
--- a/statefun-examples/statefun-async-python-example/generator/event-generator.py
+++ /dev/null
@@ -1,97 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-import signal
-import sys
-import time
-import threading
-import random
-from kafka.errors import NoBrokersAvailable
-from kafka import KafkaProducer
-from kafka import KafkaConsumer
-
-KAFKA_BROKER = "kafka-broker:9092"
-NAMES = ["Jerry", "George", "Elaine", "Kramer", "Newman", "Frank"]
-
-
-def random_requests():
-    """Generate infinite sequence of random GreetRequests."""
-    while True:
-        yield random.choice(NAMES)
-
-
-def produce():
-    if len(sys.argv) == 2:
-        delay_seconds = int(sys.argv[1])
-    else:
-        delay_seconds = 1
-    producer = KafkaProducer(bootstrap_servers=[KAFKA_BROKER])
-    for name in random_requests():
-        key = name.encode('utf-8')
-        val = key
-        producer.send(topic='names', key=key, value=val)
-        producer.flush()
-        time.sleep(delay_seconds)
-
-
-def consume():
-    consumer = KafkaConsumer(
-        'greetings',
-        bootstrap_servers=[KAFKA_BROKER],
-        auto_offset_reset='earliest',
-        group_id='event-gen')
-    for message in consumer:
-        who = message.key.decode('utf-8')
-        greeting = message.value.decode('utf-8')
-        print(f"{who}\t{greeting}", flush=True)
-
-
-def handler(number, frame):
-    sys.exit(0)
-
-
-def safe_loop(fn):
-    while True:
-        try:
-            fn()
-        except SystemExit:
-            print("Good bye!")
-            return
-        except NoBrokersAvailable:
-            time.sleep(2)
-            continue
-        except Exception as e:
-            print(e)
-            return
-
-
-def main():
-    signal.signal(signal.SIGTERM, handler)
-
-    producer = threading.Thread(target=safe_loop, args=[produce])
-    producer.start()
-
-    consumer = threading.Thread(target=safe_loop, args=[consume])
-    consumer.start()
-
-    producer.join()
-    consumer.join()
-
-
-if __name__ == "__main__":
-    main()
diff --git a/statefun-examples/statefun-async-python-example/greeter/.dockerignore b/statefun-examples/statefun-async-python-example/greeter/.dockerignore
deleted file mode 100644
index f7275bb..0000000
--- a/statefun-examples/statefun-async-python-example/greeter/.dockerignore
+++ /dev/null
@@ -1 +0,0 @@
-venv/
diff --git a/statefun-examples/statefun-async-python-example/greeter/Dockerfile b/statefun-examples/statefun-async-python-example/greeter/Dockerfile
deleted file mode 100644
index 6e0b22c..0000000
--- a/statefun-examples/statefun-async-python-example/greeter/Dockerfile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM python:3.9-slim-buster
-
-RUN mkdir -p /app
-WORKDIR /app
-
-COPY apache_flink_statefun-snapshot-py3-none-any.whl /app
-RUN pip install apache_flink_statefun-snapshot-py3-none-any.whl
-
-COPY requirements.txt /app
-RUN pip install -r requirements.txt
-
-COPY greeter.py /app
-
-EXPOSE 8000
-
-CMD ["python3", "/app/greeter.py"]
-
diff --git a/statefun-examples/statefun-async-python-example/greeter/greeter.py b/statefun-examples/statefun-async-python-example/greeter/greeter.py
deleted file mode 100644
index be0f97d..0000000
--- a/statefun-examples/statefun-async-python-example/greeter/greeter.py
+++ /dev/null
@@ -1,76 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-from statefun import *
-import asyncio
-
-functions = StatefulFunctions()
-
-@functions.bind(
-    typename="example/greeter",
-    specs=[ValueSpec(name='seen_count', type=IntType)])
-async def greet(context, greet_request):
-    storage = context.storage
-
-    seen = storage.seen_count
-    if not seen:
-        seen = 1
-    else:
-        seen += 1
-    storage.seen_count = seen
-
-    who = context.address.id # the person name whom we want to great, is the id part of our address.
-    response = await compute_greeting(who, seen)
-    egress_message = kafka_egress_message(typename="example/greets", topic="greetings", key=who, value=response)
-    context.send_egress(egress_message)
-
-
-async def compute_greeting(name, seen):
-    """
-    Compute a personalized greeting, based on the number of times this @name had been seen before.
-    """
-    templates = ["", "Welcome %s", "Nice to see you again %s", "Third time is a charm %s"]
-    if seen < len(templates):
-        greeting = templates[seen] % name
-    else:
-        greeting = f"Nice to see you at the {seen}-nth time {name}!"
-
-    await asyncio.sleep(1)
-    return greeting
-
-
-handler = RequestReplyHandler(functions)
-
-#
-# Serve the endpoint
-#
-
-from aiohttp import web
-
-handler = RequestReplyHandler(functions)
-
-async def handle(request):
-    req = await request.read()
-    res = await handler.handle_async(req)
-    return web.Response(body=res, content_type="application/octet-stream")
-
-app = web.Application()
-app.add_routes([web.post('/statefun', handle)])
-
-if __name__ == '__main__':
-    web.run_app(app, port=8000)
diff --git a/statefun-examples/statefun-async-python-example/greeter/requirements.txt b/statefun-examples/statefun-async-python-example/greeter/requirements.txt
deleted file mode 100644
index 0796d9b..0000000
--- a/statefun-examples/statefun-async-python-example/greeter/requirements.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-aiohttp
-apache-flink-statefun
diff --git a/statefun-examples/statefun-async-python-example/statefun/Dockerfile b/statefun-examples/statefun-async-python-example/statefun/Dockerfile
deleted file mode 100644
index 3ef0fe8..0000000
--- a/statefun-examples/statefun-async-python-example/statefun/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM flink-statefun:3.0-SNAPSHOT
-
-RUN mkdir -p /opt/statefun/modules/greeter
-ADD module.yaml /opt/statefun/modules/greeter
-
-
diff --git a/statefun-examples/statefun-async-python-example/statefun/module.yaml b/statefun-examples/statefun-async-python-example/statefun/module.yaml
deleted file mode 100644
index f4b197d..0000000
--- a/statefun-examples/statefun-async-python-example/statefun/module.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: "3.0"
-module:
-  meta:
-    type: remote
-  spec:
-    endpoints:
-      - endpoint:
-          meta:
-            kind: http
-          spec:
-            typename:
-              namespace: example
-              type: greeter
-            urlPathTemplate: http://python-worker:8000/statefun
-            maxNumBatchRequests: 500
-            timeouts:
-              call: 2min
-    ingresses:
-      - ingress:
-          meta:
-            type: statefun.kafka.io/routable-protobuf-ingress
-            id: example/names
-          spec:
-            address: kafka-broker:9092
-            consumerGroupId: my-group-id
-            topics:
-              - topic: names
-                typeUrl: com.googleapis/example.GreetRequest
-                targets:
-                  - example/greeter
-    egresses:
-      - egress:
-          meta:
-            type: statefun.kafka.io/generic-egress
-            id: example/greets
-          spec:
-            address: kafka-broker:9092
-            deliverySemantic:
-              type: exactly-once
-              transactionTimeoutMillis: 100000
-
diff --git a/statefun-examples/statefun-flink-datastream-example/pom.xml b/statefun-examples/statefun-flink-datastream-example/pom.xml
deleted file mode 100644
index e64a5f0..0000000
--- a/statefun-examples/statefun-flink-datastream-example/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-flink-datastream-example</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-flink-datastream</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
-            <version>${flink.version}</version>
-            <exclusions>
-                <!-- The following exclusion is needed since this artifacts pulls two different versions
-                     of slf4j, and thus failing the maven convergence plugging.
-                 -->
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-clients_${scala.binary.version}</artifactId>
-            <version>${flink.version}</version>
-            <exclusions>
-                <!-- The following exclusion is needed since this artifacts pulls two different versions
-                     of slf4j, and thus failing the maven convergence plugging.
-                 -->
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.25</version>
-        </dependency>
-
-
-        <!-- test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-flink-datastream-example/src/main/java/org/apache/flink/statefun/examples/datastream/Example.java b/statefun-examples/statefun-flink-datastream-example/src/main/java/org/apache/flink/statefun/examples/datastream/Example.java
deleted file mode 100644
index aa825b3..0000000
--- a/statefun-examples/statefun-flink-datastream-example/src/main/java/org/apache/flink/statefun/examples/datastream/Example.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.statefun.examples.datastream;
-
-import static org.apache.flink.statefun.flink.datastream.RequestReplyFunctionBuilder.requestReplyFunctionBuilder;
-
-import java.net.URI;
-import java.time.Duration;
-import java.util.concurrent.ThreadLocalRandom;
-import javax.annotation.Nullable;
-import org.apache.flink.api.common.functions.RichMapFunction;
-import org.apache.flink.statefun.flink.core.StatefulFunctionsConfig;
-import org.apache.flink.statefun.flink.core.message.MessageFactoryType;
-import org.apache.flink.statefun.flink.core.message.RoutableMessage;
-import org.apache.flink.statefun.flink.core.message.RoutableMessageBuilder;
-import org.apache.flink.statefun.flink.datastream.StatefulFunctionDataStreamBuilder;
-import org.apache.flink.statefun.flink.datastream.StatefulFunctionEgressStreams;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-import org.apache.flink.streaming.api.datastream.DataStream;
-import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
-import org.apache.flink.streaming.api.functions.sink.PrintSinkFunction;
-import org.apache.flink.streaming.api.functions.source.SourceFunction;
-
-public class Example {
-
-  private static final FunctionType GREET = new FunctionType("example", "greet");
-  private static final FunctionType REMOTE_GREET = new FunctionType("example", "remote-greet");
-  private static final EgressIdentifier<String> GREETINGS =
-      new EgressIdentifier<>("example", "out", String.class);
-
-  public static void main(String... args) throws Exception {
-
-    // -----------------------------------------------------------------------------------------
-    // obtain the stream execution env and create some data streams
-    // -----------------------------------------------------------------------------------------
-
-    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
-    StatefulFunctionsConfig statefunConfig = StatefulFunctionsConfig.fromEnvironment(env);
-    statefunConfig.setFactoryType(MessageFactoryType.WITH_KRYO_PAYLOADS);
-
-    DataStream<RoutableMessage> names =
-        env.addSource(new NameSource())
-            .map(
-                name ->
-                    RoutableMessageBuilder.builder()
-                        .withTargetAddress(GREET, name)
-                        .withMessageBody(name)
-                        .build());
-
-    // -----------------------------------------------------------------------------------------
-    // wire up stateful functions
-    // -----------------------------------------------------------------------------------------
-
-    StatefulFunctionEgressStreams out =
-        StatefulFunctionDataStreamBuilder.builder("example")
-            .withDataStreamAsIngress(names)
-            .withFunctionProvider(GREET, unused -> new MyFunction())
-            .withRequestReplyRemoteFunction(
-                requestReplyFunctionBuilder(
-                        REMOTE_GREET, URI.create("http://localhost:5000/statefun"))
-                    .withMaxRequestDuration(Duration.ofSeconds(15))
-                    .withMaxNumBatchRequests(500))
-            .withEgressId(GREETINGS)
-            .withConfiguration(statefunConfig)
-            .build(env);
-
-    // -----------------------------------------------------------------------------------------
-    // obtain the outputs
-    // -----------------------------------------------------------------------------------------
-
-    DataStream<String> output = out.getDataStreamForEgressId(GREETINGS);
-
-    // -----------------------------------------------------------------------------------------
-    // the rest of the pipeline
-    // -----------------------------------------------------------------------------------------
-
-    output
-        .map(
-            new RichMapFunction<String, String>() {
-              @Override
-              public String map(String value) {
-                return "'" + value + "'";
-              }
-            })
-        .addSink(new PrintSinkFunction<>());
-
-    env.execute();
-  }
-
-  private static final class MyFunction implements StatefulFunction {
-
-    @Persisted
-    private final PersistedValue<Integer> seenCount = PersistedValue.of("seen", Integer.class);
-
-    @Override
-    public void invoke(Context context, Object input) {
-      int seen = seenCount.updateAndGet(MyFunction::increment);
-      context.send(GREETINGS, String.format("Hello %s at the %d-th time", input, seen));
-    }
-
-    private static int increment(@Nullable Integer n) {
-      return n == null ? 1 : n + 1;
-    }
-  }
-
-  private static final class NameSource implements SourceFunction<String> {
-
-    private static final long serialVersionUID = 1;
-
-    private volatile boolean canceled;
-
-    @Override
-    public void run(SourceContext<String> ctx) throws InterruptedException {
-      String[] names = {"Stephan", "Igal", "Gordon", "Seth", "Marta"};
-      ThreadLocalRandom random = ThreadLocalRandom.current();
-      while (true) {
-        int index = random.nextInt(names.length);
-        final String name = names[index];
-        synchronized (ctx.getCheckpointLock()) {
-          if (canceled) {
-            return;
-          }
-          ctx.collect(name);
-        }
-        Thread.sleep(1000);
-      }
-    }
-
-    @Override
-    public void cancel() {
-      canceled = true;
-    }
-  }
-}
diff --git a/statefun-examples/statefun-flink-harness-example/README.md b/statefun-examples/statefun-flink-harness-example/README.md
deleted file mode 100644
index 6052b34..0000000
--- a/statefun-examples/statefun-flink-harness-example/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Using the Flink Harness to run Stateful Functions applications in the IDE
-
-This is a simple example to demonstrate how one would run Stateful Functions application in the IDE using the
-provided Flink Harness.
-
-Take a look at the `org.apache.flink.statefun.examples.harness.RunnerTest` class to see example usages of `Harness`.
-
-## Running the example
-
-Simply run the `org.apache.flink.statefun.examples.harness.RunnerTest` class.
-
diff --git a/statefun-examples/statefun-flink-harness-example/pom.xml b/statefun-examples/statefun-flink-harness-example/pom.xml
deleted file mode 100644
index 872e68d..0000000
--- a/statefun-examples/statefun-flink-harness-example/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-flink-harness-example</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-flink-harness</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyConstants.java b/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyConstants.java
deleted file mode 100644
index a6c418c..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-import org.apache.flink.statefun.examples.harness.MyMessages.MyInputMessage;
-import org.apache.flink.statefun.examples.harness.MyMessages.MyOutputMessage;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.io.IngressIdentifier;
-
-final class MyConstants {
-  static final IngressIdentifier<MyInputMessage> REQUEST_INGRESS =
-      new IngressIdentifier<>(
-          MyInputMessage.class, "org.apache.flink.statefun.examples.harness", "in");
-
-  static final EgressIdentifier<MyOutputMessage> RESULT_EGRESS =
-      new EgressIdentifier<>(
-          "org.apache.flink.statefun.examples.harness", "out", MyOutputMessage.class);
-
-  static final FunctionType MY_FUNCTION_TYPE =
-      new FunctionType("org.apache.flink.statefun.examples.harness", "my-function");
-}
diff --git a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyFunction.java b/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyFunction.java
deleted file mode 100644
index b638341..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyFunction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-import org.apache.flink.statefun.examples.harness.MyMessages.MyInputMessage;
-import org.apache.flink.statefun.examples.harness.MyMessages.MyOutputMessage;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-
-final class MyFunction implements StatefulFunction {
-
-  @Override
-  public void invoke(Context context, Object input) {
-    if (!(input instanceof MyInputMessage)) {
-      throw new IllegalArgumentException("Unknown message received " + input);
-    }
-    MyInputMessage in = (MyInputMessage) input;
-    MyOutputMessage out = new MyOutputMessage(in.getUserId(), in.getMessage());
-
-    context.send(MyConstants.RESULT_EGRESS, out);
-  }
-}
diff --git a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyMessages.java b/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyMessages.java
deleted file mode 100644
index d18b891..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyMessages.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-final class MyMessages {
-
-  static final class MyInputMessage {
-    private final String userId;
-    private final String message;
-
-    MyInputMessage(String userId, String message) {
-      this.userId = userId;
-      this.message = message;
-    }
-
-    String getUserId() {
-      return userId;
-    }
-
-    String getMessage() {
-      return message;
-    }
-  }
-
-  static final class MyOutputMessage {
-    private final String userId;
-    private final String content;
-
-    MyOutputMessage(String userId, String content) {
-      this.userId = userId;
-      this.content = content;
-    }
-
-    String getUserId() {
-      return userId;
-    }
-
-    String getContent() {
-      return content;
-    }
-
-    @Override
-    public String toString() {
-      return String.format("MyOutputMessage(%s, %s)", getUserId(), getContent());
-    }
-  }
-}
diff --git a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyModule.java b/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyModule.java
deleted file mode 100644
index 6fb6879..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyModule.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
-
-@AutoService(StatefulFunctionModule.class)
-public class MyModule implements StatefulFunctionModule {
-
-  @Override
-  public void configure(Map<String, String> globalConfiguration, Binder binder) {
-    binder.bindIngressRouter(MyConstants.REQUEST_INGRESS, new MyRouter());
-    binder.bindFunctionProvider(MyConstants.MY_FUNCTION_TYPE, unused -> new MyFunction());
-  }
-}
diff --git a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyRouter.java b/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyRouter.java
deleted file mode 100644
index 2e2d401..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/main/java/org/apache/flink/statefun/examples/harness/MyRouter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-import org.apache.flink.statefun.examples.harness.MyMessages.MyInputMessage;
-import org.apache.flink.statefun.sdk.io.Router;
-
-final class MyRouter implements Router<MyInputMessage> {
-
-  @Override
-  public void route(MyInputMessage message, Downstream<MyInputMessage> downstream) {
-    downstream.forward(MyConstants.MY_FUNCTION_TYPE, message.getUserId(), message);
-  }
-}
diff --git a/statefun-examples/statefun-flink-harness-example/src/test/java/org/apache/flink/statefun/examples/harness/RunnerTest.java b/statefun-examples/statefun-flink-harness-example/src/test/java/org/apache/flink/statefun/examples/harness/RunnerTest.java
deleted file mode 100644
index 35569f0..0000000
--- a/statefun-examples/statefun-flink-harness-example/src/test/java/org/apache/flink/statefun/examples/harness/RunnerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.harness;
-
-import java.util.concurrent.ThreadLocalRandom;
-import javax.annotation.Nonnull;
-import org.apache.flink.statefun.flink.harness.Harness;
-import org.apache.flink.statefun.flink.harness.io.SerializableSupplier;
-import org.apache.flink.util.StringUtils;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class RunnerTest {
-
-  @Ignore(
-      "This has an infinite egress and it would never complete, un-ignore to execute in the IDE")
-  @Test
-  public void run() throws Exception {
-    Harness harness =
-        new Harness()
-            .withKryoMessageSerializer()
-            .withSupplyingIngress(MyConstants.REQUEST_INGRESS, new MessageGenerator())
-            .withPrintingEgress(MyConstants.RESULT_EGRESS);
-
-    harness.start();
-  }
-
-  /** generate a random message, once a second a second. */
-  private static final class MessageGenerator
-      implements SerializableSupplier<MyMessages.MyInputMessage> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public MyMessages.MyInputMessage get() {
-      try {
-        Thread.sleep(1_000);
-      } catch (InterruptedException e) {
-        throw new RuntimeException("Interrupted", e);
-      }
-      return randomMessage();
-    }
-
-    @Nonnull
-    private MyMessages.MyInputMessage randomMessage() {
-      final ThreadLocalRandom random = ThreadLocalRandom.current();
-      final String userId = StringUtils.generateRandomAlphanumericString(random, 2);
-      return new MyMessages.MyInputMessage(userId, "hello " + userId);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-greeter-example/Dockerfile b/statefun-examples/statefun-greeter-example/Dockerfile
deleted file mode 100644
index d255e55..0000000
--- a/statefun-examples/statefun-greeter-example/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM flink-statefun:3.0-SNAPSHOT
-
-RUN mkdir -p /opt/statefun/modules/statefun-greeter-example
-COPY target/statefun-greeter-example*jar /opt/statefun/modules/statefun-greeter-example/
diff --git a/statefun-examples/statefun-greeter-example/README.md b/statefun-examples/statefun-greeter-example/README.md
deleted file mode 100644
index dc1edb0..0000000
--- a/statefun-examples/statefun-greeter-example/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# The Greeter Example
-
-This is a simple example that runs a simple stateful function that accepts requests from a Kafka ingress,
-and then responds by sending greeting responses to a Kafka egress. It demonstrates the primitive building blocks
-of a Stateful Functions applications, such as ingresses, routing messages to functions, handling state in functions,
-and sending messages to egresses.
-
-## Running the example
-
-To run the example:
-
-```
-docker-compose build
-docker-compose up
-```
-
-Then, to see the example in actions, send some messages to the topic `names`, and see what comes out
-out of the topic `greetings`:
-
-```
-docker-compose exec kafka-broker kafka-console-producer.sh \
-     --broker-list localhost:9092 \
-     --topic names
-```
-
-```
-docker-compose exec kafka-broker kafka-console-consumer.sh \
-     --bootstrap-server localhost:9092 \
-     --isolation-level read_committed \
-     --from-beginning \
-     --topic greetings
-```
diff --git a/statefun-examples/statefun-greeter-example/docker-compose.yml b/statefun-examples/statefun-greeter-example/docker-compose.yml
deleted file mode 100644
index 2b84125..0000000
--- a/statefun-examples/statefun-greeter-example/docker-compose.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-version: "2.1"
-services:
-  zookeeper:
-    image: wurstmeister/zookeeper
-    ports:
-      - "2181:2181"
-  kafka-broker:
-    image: wurstmeister/kafka:2.12-2.0.1
-    ports:
-      - "9092:9092"
-    environment:
-      HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
-      KAFKA_CREATE_TOPICS: "names:1:1,greetings:1:1"
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
-    depends_on:
-      - zookeeper
-    volumes:
-      - /var/run/docker.sock:/var/run/docker.sock
-  master:
-    build:
-      context: .
-    # uncomment to start from a savepoint
-    #command: -s /checkpoint-dir/savepoint/savepoint-bf101a-4e99820085fe
-    expose:
-      - "6123"
-    ports:
-      - "8081:8081"
-    environment:
-      - ROLE=master
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-  worker:
-    build:
-      context: .
-    expose:
-      - "6121"
-      - "6122"
-    depends_on:
-      - master
-      - kafka-broker
-    links:
-      - "master:master"
-      - "kafka-broker:kafka-broker"
-    environment:
-      - ROLE=worker
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-
diff --git a/statefun-examples/statefun-greeter-example/k8s/create-resources.sh b/statefun-examples/statefun-greeter-example/k8s/create-resources.sh
deleted file mode 100755
index 6fde8a3..0000000
--- a/statefun-examples/statefun-greeter-example/k8s/create-resources.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-helm template ../../../tools/k8s \
-  --set worker.replicas=1 \
-  --set worker.image=greeter-example \
-  --set master.image=greeter-example 
-
-
diff --git a/statefun-examples/statefun-greeter-example/pom.xml b/statefun-examples/statefun-greeter-example/pom.xml
deleted file mode 100644
index 41df062..0000000
--- a/statefun-examples/statefun-greeter-example/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-greeter-example</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-sdk</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-kafka-io</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>3.8.0</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>com.github.os72</groupId>
-                <artifactId>protoc-jar-maven-plugin</artifactId>
-                <version>${protoc-jar-maven-plugin.version}</version>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <excludePackageNames>org.apache.flink.statefun.examples.greeter.generated</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-    
-</project>
diff --git a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetRouter.java b/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetRouter.java
deleted file mode 100644
index 8e331f1..0000000
--- a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetRouter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.greeter;
-
-import org.apache.flink.statefun.examples.greeter.generated.GreetRequest;
-import org.apache.flink.statefun.sdk.io.Router;
-
-/**
- * The greet router takes each message from an ingress and routes it to a greeter function based on
- * the users id.
- */
-final class GreetRouter implements Router<GreetRequest> {
-
-  @Override
-  public void route(GreetRequest message, Downstream<GreetRequest> downstream) {
-    downstream.forward(GreetStatefulFunction.TYPE, message.getWho(), message);
-  }
-}
diff --git a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetStatefulFunction.java b/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetStatefulFunction.java
deleted file mode 100644
index 391b969..0000000
--- a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetStatefulFunction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.greeter;
-
-import org.apache.flink.statefun.examples.greeter.generated.GreetRequest;
-import org.apache.flink.statefun.examples.greeter.generated.GreetResponse;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-/**
- * A stateful function that generates a unique greeting for each user based on how many times that
- * user has been seen by the system.
- */
-final class GreetStatefulFunction implements StatefulFunction {
-
-  /**
-   * The function type is the unique identifier that identifies this type of function. The type, in
-   * conjunction with an identifier, is how routers and other functions can use to reference a
-   * particular instance of a greeter function.
-   *
-   * <p>If this was a multi-module application, the function type could be in different package so
-   * functions in other modules could message the greeter without a direct dependency on this class.
-   */
-  static final FunctionType TYPE = new FunctionType("apache", "greeter");
-
-  /**
-   * The persisted value for maintaining state about a particular user. The value returned by this
-   * field is always scoped to the current user. seenCount is the number of times the user has been
-   * greeted.
-   */
-  @Persisted
-  private final PersistedValue<Integer> seenCount = PersistedValue.of("seen-count", Integer.class);
-
-  @Override
-  public void invoke(Context context, Object input) {
-    GreetRequest greetMessage = (GreetRequest) input;
-    GreetResponse response = computePersonalizedGreeting(greetMessage);
-    context.send(GreetingIO.GREETING_EGRESS_ID, response);
-  }
-
-  private GreetResponse computePersonalizedGreeting(GreetRequest greetMessage) {
-    final String name = greetMessage.getWho();
-    final int seen = seenCount.getOrDefault(0);
-    seenCount.set(seen + 1);
-
-    String greeting = greetText(name, seen);
-
-    return GreetResponse.newBuilder().setWho(name).setGreeting(greeting).build();
-  }
-
-  private static String greetText(String name, int seen) {
-    switch (seen) {
-      case 0:
-        return String.format("Hello %s ! \uD83D\uDE0E", name);
-      case 1:
-        return String.format("Hello again %s ! \uD83E\uDD17", name);
-      case 2:
-        return String.format("Third time is a charm! %s! \uD83E\uDD73", name);
-      case 3:
-        return String.format("Happy to see you once again %s ! \uD83D\uDE32", name);
-      default:
-        return String.format("Hello at the %d-th time %s \uD83D\uDE4C", seen + 1, name);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingIO.java b/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingIO.java
deleted file mode 100644
index c7b08a4..0000000
--- a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingIO.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.greeter;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-import org.apache.flink.statefun.examples.greeter.generated.GreetRequest;
-import org.apache.flink.statefun.examples.greeter.generated.GreetResponse;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.io.EgressSpec;
-import org.apache.flink.statefun.sdk.io.IngressIdentifier;
-import org.apache.flink.statefun.sdk.io.IngressSpec;
-import org.apache.flink.statefun.sdk.kafka.KafkaEgressBuilder;
-import org.apache.flink.statefun.sdk.kafka.KafkaEgressSerializer;
-import org.apache.flink.statefun.sdk.kafka.KafkaIngressBuilder;
-import org.apache.flink.statefun.sdk.kafka.KafkaIngressDeserializer;
-import org.apache.kafka.clients.consumer.ConsumerConfig;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-import org.apache.kafka.clients.producer.ProducerRecord;
-
-/**
- * A collection of all the components necessary to consume from and write to an external system, in
- * this case Apache Kafka.
- *
- * <p>The ingress and egress identifiers provide named references without exposing the underlying
- * system. This way, in a multi-module deployment, functions can interact with IO modules through
- * identifiers without depending on specific implementations.
- */
-final class GreetingIO {
-
-  static final IngressIdentifier<GreetRequest> GREETING_INGRESS_ID =
-      new IngressIdentifier<>(GreetRequest.class, "apache", "greet-ingress");
-
-  static final EgressIdentifier<GreetResponse> GREETING_EGRESS_ID =
-      new EgressIdentifier<>("apache", "kafka-greeting-output", GreetResponse.class);
-
-  private final String kafkaAddress;
-
-  GreetingIO(String kafkaAddress) {
-    this.kafkaAddress = Objects.requireNonNull(kafkaAddress);
-  }
-
-  IngressSpec<GreetRequest> getIngressSpec() {
-    return KafkaIngressBuilder.forIdentifier(GREETING_INGRESS_ID)
-        .withKafkaAddress(kafkaAddress)
-        .withTopic("names")
-        .withDeserializer(GreetKafkaDeserializer.class)
-        .withProperty(ConsumerConfig.GROUP_ID_CONFIG, "greetings")
-        .build();
-  }
-
-  EgressSpec<GreetResponse> getEgressSpec() {
-    return KafkaEgressBuilder.forIdentifier(GREETING_EGRESS_ID)
-        .withKafkaAddress(kafkaAddress)
-        .withSerializer(GreetKafkaSerializer.class)
-        .build();
-  }
-
-  private static final class GreetKafkaDeserializer
-      implements KafkaIngressDeserializer<GreetRequest> {
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public GreetRequest deserialize(ConsumerRecord<byte[], byte[]> input) {
-      String who = new String(input.value(), StandardCharsets.UTF_8);
-
-      return GreetRequest.newBuilder().setWho(who).build();
-    }
-  }
-
-  private static final class GreetKafkaSerializer implements KafkaEgressSerializer<GreetResponse> {
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public ProducerRecord<byte[], byte[]> serialize(GreetResponse response) {
-      byte[] key = response.getWho().getBytes(StandardCharsets.UTF_8);
-      byte[] value = response.getGreeting().getBytes(StandardCharsets.UTF_8);
-
-      return new ProducerRecord<>("greetings", key, value);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingModule.java b/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingModule.java
deleted file mode 100644
index 79c008c..0000000
--- a/statefun-examples/statefun-greeter-example/src/main/java/org/apache/flink/statefun/examples/greeter/GreetingModule.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.greeter;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
-
-/**
- * The top level entry point for this application.
- *
- * <p>On deployment, the address of the Kafka brokers can be configured by passing the flag
- * `--kafka-address &lt;address&gt;`. If no flag is passed, then the default address will be used.
- */
-@AutoService(StatefulFunctionModule.class)
-public final class GreetingModule implements StatefulFunctionModule {
-
-  private static final String KAFKA_KEY = "kafka-address";
-
-  private static final String DEFAULT_KAFKA_ADDRESS = "kafka-broker:9092";
-
-  @Override
-  public void configure(Map<String, String> globalConfiguration, Binder binder) {
-
-    // pull the configured kafka broker address, or default if none was passed.
-    String kafkaAddress = globalConfiguration.getOrDefault(KAFKA_KEY, DEFAULT_KAFKA_ADDRESS);
-    GreetingIO ioModule = new GreetingIO(kafkaAddress);
-
-    // bind an ingress to the system along with the router
-    binder.bindIngress(ioModule.getIngressSpec());
-    binder.bindIngressRouter(GreetingIO.GREETING_INGRESS_ID, new GreetRouter());
-
-    // bind an egress to the system
-    binder.bindEgress(ioModule.getEgressSpec());
-
-    // bind a function provider to a function type
-    binder.bindFunctionProvider(GreetStatefulFunction.TYPE, unused -> new GreetStatefulFunction());
-  }
-}
diff --git a/statefun-examples/statefun-greeter-example/src/main/protobuf/greeter.proto b/statefun-examples/statefun-greeter-example/src/main/protobuf/greeter.proto
deleted file mode 100644
index 3076c42..0000000
--- a/statefun-examples/statefun-greeter-example/src/main/protobuf/greeter.proto
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-
-package org.apache.flink.statefun.examples.kafka;
-option java_package = "org.apache.flink.statefun.examples.greeter.generated";
-option java_multiple_files = true;
-
-message GreetRequest {
-    string who = 1;
-}
-
-message GreetResponse {
-    string who = 1;
-    string greeting = 2;
-}
-
-
diff --git a/statefun-examples/statefun-python-k8s-example/Dockerfile.python-worker b/statefun-examples/statefun-python-k8s-example/Dockerfile.python-worker
deleted file mode 100644
index 06a7b65..0000000
--- a/statefun-examples/statefun-python-k8s-example/Dockerfile.python-worker
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM python:3.7-alpine
-
-RUN mkdir -p /app
-WORKDIR /app
-
-COPY apache_flink_statefun-snapshot-py3-none-any.whl /app
-RUN pip install apache_flink_statefun-snapshot-py3-none-any.whl
-
-COPY requirements.txt /app
-RUN pip install -r requirements.txt
-
-COPY main.py /app
-COPY messages_pb2.py /app
-
-EXPOSE 8000
-
-CMD ["gunicorn", "-b", "0.0.0.0:8000", "-w 4", "main:app"]
-
diff --git a/statefun-examples/statefun-python-k8s-example/Dockerfile.statefun b/statefun-examples/statefun-python-k8s-example/Dockerfile.statefun
deleted file mode 100644
index 3ef0fe8..0000000
--- a/statefun-examples/statefun-python-k8s-example/Dockerfile.statefun
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM flink-statefun:3.0-SNAPSHOT
-
-RUN mkdir -p /opt/statefun/modules/greeter
-ADD module.yaml /opt/statefun/modules/greeter
-
-
diff --git a/statefun-examples/statefun-python-k8s-example/README.md b/statefun-examples/statefun-python-k8s-example/README.md
deleted file mode 100644
index e0536a8..0000000
--- a/statefun-examples/statefun-python-k8s-example/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Kubernetes example
-
-This example demonstrates how to deploy a stateful function application
-written in Python to Kubernetes.
-
-## Prerequisites 
-
-* Helm
-* Kubernetes cluster
-* Kafka   
-* [StateFun distribution](https://github.com/apache/flink-statefun#build)
-* [StateFun Python SDK](https://github.com/apache/flink-statefun/blob/master/statefun-python-sdk/build-distribution.sh)
-
-
-## Overview
-
-This examples create a stateful function application,
-that consumes `LoginEvent`s from a `logins` Kafka topic,
-and produces `seen` count per user, into the `seen` Kafka topic.
-
-The main example components contains:
-- [main.py](main.py) - A StateFun python function that implements the main logic
-- [module.yaml](module.yaml) - defines the ingress, egress and the remote function specification.
-- [resources](resources) - a Helm chart, templates to deploy StateFun cluster and the remote python worker to k8s. 
-- [build-example.sh](build-example.sh) - Builds StateFun Docker images and k8s resources to deploy it. 
-
-## Setup
-
-### Create Kafka Topics: 
-
-This example consumes `LoginEvent`s from the `logins` topic, and produces `SeenCount` to
-the `seen` topic
-```
- ./kafka-topics.sh --create --topic logins --zookeeper <zookeeper address>:2181 --partitions 1 --replication-factor 1
- ./kafka-topics.sh --create --topic seen --zookeeper <zookeeper address>:2181 --partitions 1 --replication-factor 1
-```
-
-### update [module.yaml](module.yaml)
-
-Make sure that your `module.yaml` ingress/and egress sections point to your
-Kafka cluster. 
-
-```
-ingresses:
-      - ingress:
-            ...
-          spec:
-            address: kafka-service:9092
-            ...
-    egresses:
-      - egress:
-            ...
-          spec:
-            address: kafka-service:9092
-```
-
-### Build the Docker images and the k8s resource yamls.
-
-This examples creates two different Docker images, one for the `Python` remote 
-worker (`k8s-demo-python-worker`) and one for the statefun cluster (`k8s-demo-statefun`).
-
-- If you have a remote docker registry (i.e. `gcr.io/<project-name>`) make sure
-to update [resources/values.yaml](resources/values.yaml) relevant `image: ` sections.
-
-- Modify [resources/values.yaml](resources/values.yaml) and set the value of `checkpoint.directory`
-to a filesystem / object store. For example
-```
-checkpoint:
-  dir: gcs://my-project/my-bucket
-```  
-
-
-Assuming the all prerequisites where completed run:
-
-```build-example.sh```
-
-This should create the Docker images and generate a `k8s-demo.yaml` file.
-
-## Deploy
-
-* `kubectl create -f k8s-demo.yaml`
-* `kubectl create -f python-worker-deployment.yaml`
-* `kubectl create -f python-worker-service.yaml`
- 
-## Generate events
-
-Run:
-
-```
-pip3 install kafka-python 
-python3 event_generator.py --address <kafka address> --events 1000
-```
-
-This would generate 1,000 login events into the `logins` topic
\ No newline at end of file
diff --git a/statefun-examples/statefun-python-k8s-example/build-example.sh b/statefun-examples/statefun-python-k8s-example/build-example.sh
deleted file mode 100755
index d7095f6..0000000
--- a/statefun-examples/statefun-python-k8s-example/build-example.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-set -e
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-PYTHON_IMAGE_NAME="k8s-demo-python-worker"
-PYTHON_SERVICE_NAME="python-worker"
-STATEFUN_IMAGE_NAME="k8s-demo-statefun"
-PARALLELISM=3
-K8S_RESOURCES_YAML="k8s-demo.yaml"
-SDK_DISTRIBUTION_WHL_PATH="../../statefun-python-sdk/dist/apache_flink_statefun-*-py3-none-any.whl"
-
-# clean
-rm -f apache_flink_statefun-*-py3-none-any.whl
-rm -rf __pycache__
-
-if [ ! -f ${SDK_DISTRIBUTION_WHL_PATH} ]; then
-    echo "SDK distribution has to be built first. Building it"
-    pushd ../../statefun-python-sdk
-    ./build-distribution.sh
-    popd
-fi
-
-cp ${SDK_DISTRIBUTION_WHL_PATH} apache_flink_statefun-snapshot-py3-none-any.whl 2>/dev/null
-
-# build the flask container
-docker build -f Dockerfile.python-worker . -t ${PYTHON_IMAGE_NAME}
-
-rm -f apache_flink_statefun-*-py3-none-any.whl
-
-# build the statefun Flink image
-docker build -f Dockerfile.statefun . -t ${STATEFUN_IMAGE_NAME}
-
-helm template ../../tools/k8s \
-  --set worker.replicas=${PARALLELISM} \
-  --set worker.image=${STATEFUN_IMAGE_NAME} \
-  --set master.image=${STATEFUN_IMAGE_NAME} > ${K8S_RESOURCES_YAML}
-
-
-echo "Successfully created ${STATEFUN_IMAGE_NAME}, ${PYTHON_IMAGE_NAME} Docker images."
-echo "Upload these Docker images to your docker registry that is accessible from K8S, and"
-echo "" 
-echo "Use: kubectl create -f ${K8S_RESOURCES_YAML}"
-echo "Use: kubectl create -f python-worker-deployment.yaml"
-echo "Use: kubectl create -f python-worker-service.yaml"
-
-
diff --git a/statefun-examples/statefun-python-k8s-example/event-generator.py b/statefun-examples/statefun-python-k8s-example/event-generator.py
deleted file mode 100644
index 7d947b4..0000000
--- a/statefun-examples/statefun-python-k8s-example/event-generator.py
+++ /dev/null
@@ -1,75 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-import sys
-import getopt
-import random
-import string
-
-from messages_pb2 import LoginEvent
-from messages_pb2 import SeenCount
-
-from kafka import KafkaProducer
-
-
-def random_user(n):
-    """generate a random user id of size n"""
-    chars = []
-    for i in range(n):
-        chars.append(random.choice(string.ascii_lowercase))
-    return ''.join(chars)
-
-
-def produce(events, address):
-    producer = KafkaProducer(bootstrap_servers=address)
-
-    for _ in range(events):
-        event = LoginEvent()
-        event.user_name = random_user(4)
-        key = event.user_name.encode('utf-8')
-        producer.send('logins', key=key, value=event.SerializeToString())
-    producer.flush()
-    producer.close()
-
-
-def usage():
-    print('usage: python3 event-generator.py --address=localhost:9092 --events=1')
-    sys.exit(1)
-
-
-def parse_args():
-    address = None
-    events = None
-    opts, args = getopt.getopt(sys.argv[1:], "a:e", ["address=", "events="])
-    for opt, arg in opts:
-        if opt in ("-a", "--address"):
-            address = arg
-        elif opt in ("-e", "--events"):
-            events = arg
-    if address is None or events is None:
-        usage()
-    return address, int(events)
-
-
-def main():
-    address, events = parse_args()
-    produce(address=address, events=events)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/statefun-examples/statefun-python-k8s-example/main.py b/statefun-examples/statefun-python-k8s-example/main.py
deleted file mode 100644
index f9df7c2..0000000
--- a/statefun-examples/statefun-python-k8s-example/main.py
+++ /dev/null
@@ -1,67 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-from messages_pb2 import LoginEvent
-from messages_pb2 import SeenCount
-
-from statefun import StatefulFunctions
-from statefun import StateSpec
-from statefun import RequestReplyHandler
-from statefun import kafka_egress_record
-
-functions = StatefulFunctions()
-
-
-@functions.bind(
-    typename="k8s-demo/greeter",
-    states=[StateSpec('seen_count')])
-def greet(context, message: LoginEvent):
-    state = context.state('seen_count').unpack(SeenCount)
-    if not state:
-        state = SeenCount()
-        state.seen = 1
-    else:
-        state.seen += 1
-    context.state('seen_count').pack(state)
-
-    egress_message = kafka_egress_record(topic="seen", key=message.user_name, value=state)
-    context.pack_and_send_egress("k8s-demo/greets-egress", egress_message)
-
-
-handler = RequestReplyHandler(functions)
-
-#
-# Serve the endpoint
-#
-
-from flask import request
-from flask import make_response
-from flask import Flask
-
-app = Flask(__name__)
-
-
-@app.route('/statefun', methods=['POST'])
-def handle():
-    response_data = handler(request.data)
-    response = make_response(response_data)
-    response.headers.set('Content-Type', 'application/octet-stream')
-    return response
-
-
-if __name__ == "__main__":
-    app.run()
diff --git a/statefun-examples/statefun-python-k8s-example/messages.proto b/statefun-examples/statefun-python-k8s-example/messages.proto
deleted file mode 100644
index 92ac22f..0000000
--- a/statefun-examples/statefun-python-k8s-example/messages.proto
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-
-// protoc flask.proto --python_out=.
-
-package k8s.demo;
-
-message LoginEvent {
-    string user_name = 1;
-}
-
-message SeenCount {
-    int64 seen = 1;
-}
-
-
diff --git a/statefun-examples/statefun-python-k8s-example/messages_pb2.py b/statefun-examples/statefun-python-k8s-example/messages_pb2.py
deleted file mode 100644
index 3d2d33e..0000000
--- a/statefun-examples/statefun-python-k8s-example/messages_pb2.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# -*- coding: utf-8 -*-
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: messages.proto
-
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='messages.proto',
-  package='k8s.demo',
-  syntax='proto3',
-  serialized_options=None,
-  serialized_pb=b'\n\x0emessages.proto\x12\x08k8s.demo\"\x1f\n\nLoginEvent\x12\x11\n\tuser_name\x18\x01 \x01(\t\"\x19\n\tSeenCount\x12\x0c\n\x04seen\x18\x01 \x01(\x03\x62\x06proto3'
-)
-
-
-
-
-_LOGINEVENT = _descriptor.Descriptor(
-  name='LoginEvent',
-  full_name='k8s.demo.LoginEvent',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='user_name', full_name='k8s.demo.LoginEvent.user_name', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=b"".decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=28,
-  serialized_end=59,
-)
-
-
-_SEENCOUNT = _descriptor.Descriptor(
-  name='SeenCount',
-  full_name='k8s.demo.SeenCount',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='seen', full_name='k8s.demo.SeenCount.seen', index=0,
-      number=1, type=3, cpp_type=2, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=61,
-  serialized_end=86,
-)
-
-DESCRIPTOR.message_types_by_name['LoginEvent'] = _LOGINEVENT
-DESCRIPTOR.message_types_by_name['SeenCount'] = _SEENCOUNT
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-LoginEvent = _reflection.GeneratedProtocolMessageType('LoginEvent', (_message.Message,), {
-  'DESCRIPTOR' : _LOGINEVENT,
-  '__module__' : 'messages_pb2'
-  # @@protoc_insertion_point(class_scope:k8s.demo.LoginEvent)
-  })
-_sym_db.RegisterMessage(LoginEvent)
-
-SeenCount = _reflection.GeneratedProtocolMessageType('SeenCount', (_message.Message,), {
-  'DESCRIPTOR' : _SEENCOUNT,
-  '__module__' : 'messages_pb2'
-  # @@protoc_insertion_point(class_scope:k8s.demo.SeenCount)
-  })
-_sym_db.RegisterMessage(SeenCount)
-
-
-# @@protoc_insertion_point(module_scope)
diff --git a/statefun-examples/statefun-python-k8s-example/module.yaml b/statefun-examples/statefun-python-k8s-example/module.yaml
deleted file mode 100644
index 813ee1f..0000000
--- a/statefun-examples/statefun-python-k8s-example/module.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: "3.0"
-module:
-  meta:
-    type: remote
-  spec:
-    endpoints:
-      - endpoint:
-          meta:
-            kind: http
-          spec:
-            typename:
-              namespace: k8s-demo
-              type: greeter
-            endpoint: http://statefun-python:8000/statefun
-            maxNumBatchRequests: 500
-            timeouts:
-              call: 2min
-    ingresses:
-      - ingress:
-          meta:
-            type: statefun.kafka.io/routable-protobuf-ingress
-            id: k8s-demo/names-ingress
-          spec:
-            address: kafka-service:9092
-            consumerGroupId: my-group-id
-            topics:
-              - topic: logins
-                typeUrl: com.googleapis/k8s.demo.LoginEvent
-                targets:
-                  - k8s-demo/greeter
-    egresses:
-      - egress:
-          meta:
-            type: statefun.kafka.io/generic-egress
-            id: k8s-demo/greets-egress
-          spec:
-            address: kafka-service:9092
-            deliverySemantic:
-              type: exactly-once
-              transactionTimeoutMillis: 100000
-
diff --git a/statefun-examples/statefun-python-k8s-example/python-worker-deployment.yaml b/statefun-examples/statefun-python-k8s-example/python-worker-deployment.yaml
deleted file mode 100644
index 05b9301..0000000
--- a/statefun-examples/statefun-python-k8s-example/python-worker-deployment.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: statefun-python 
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: statefun
-      component: statefun-python 
-  template:
-    metadata:
-      labels:
-        app: statefun
-        component: statefun-python 
-    spec:
-      containers:
-        - name: worker
-          image: k8s-demo-python-worker 
-          ports:
-            - containerPort: 8000
-              name: endpoint
-          livenessProbe:
-            tcpSocket:
-              port: 8000
-            initialDelaySeconds: 30
-            periodSeconds: 60
diff --git a/statefun-examples/statefun-python-k8s-example/python-worker-service.yaml b/statefun-examples/statefun-python-k8s-example/python-worker-service.yaml
deleted file mode 100644
index 534d70c..0000000
--- a/statefun-examples/statefun-python-k8s-example/python-worker-service.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-apiVersion: v1
-kind: Service
-metadata:
-  name: statefun-python 
-spec:
-  type: ClusterIP
-  ports:
-    - name: endpoint
-      port: 8000
-  selector:
-    app: statefun
-    component: statefun-python 
diff --git a/statefun-examples/statefun-python-k8s-example/requirements.txt b/statefun-examples/statefun-python-k8s-example/requirements.txt
deleted file mode 100644
index c65eb74..0000000
--- a/statefun-examples/statefun-python-k8s-example/requirements.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apache-flink-statefun
-flask
-gunicorn==20.0.4
-
-
-
diff --git a/statefun-examples/statefun-python-walkthrough-example/README.md b/statefun-examples/statefun-python-walkthrough-example/README.md
deleted file mode 100644
index fd75f1c..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# Apache Stateful Functions - Python SDK Walkthrough
-
-## Setup
-
-* Create a virtual env
-
-```
-python3 -m venv venv
-source venv/bin/activate   
-```
-
-* Install the requirements 
-
-```
-pip3 install -r requirements.txt
-```
-
-If you are building from source, then first build the 
-distribution (via calling `statefun-python-sdk/build-distribution.sh`)
-then copy `statefun-python-sdk/dist/apache_flink_statefun-<version>-py3-none-any.whl` here and
-run 
-
-```
-pip3 install apache_flink_statefun-<version>-py3-none-any.whl
-```
-
-## Examples
-
-* Checkout the walkthrough examples at [walkthrough.py](walkthrough.py)
-* To invoke one of the example functions, and observe its result, run:
-```
-python3 walkthrough.py
-```
-
-And from another terminal run:
-```
-python3 run-example.py <example name>
-```
-
-e.g.
-
-```
-python3 run-example.py walkthrough/hello
-```
diff --git a/statefun-examples/statefun-python-walkthrough-example/example_utils.py b/statefun-examples/statefun-python-walkthrough-example/example_utils.py
deleted file mode 100644
index 9409350..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/example_utils.py
+++ /dev/null
@@ -1,38 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-from flask import request
-from flask import make_response
-from flask import Flask
-
-from statefun import RequestReplyHandler
-
-
-def flask_server(endpoint, functions):
-    app = Flask(__name__)
-
-    handler = RequestReplyHandler(functions)
-
-    @app.route(endpoint, methods=['POST'])
-    def handle():
-        response_data = handler(request.data)
-        response = make_response(response_data)
-        response.headers.set('Content-Type', 'application/octet-stream')
-        return response
-
-    app.run()
diff --git a/statefun-examples/statefun-python-walkthrough-example/requirements.txt b/statefun-examples/statefun-python-walkthrough-example/requirements.txt
deleted file mode 100644
index 580d40e..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/requirements.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-flask
-protobuf>=3.11.3,<4.0.0
-requests
-
diff --git a/statefun-examples/statefun-python-walkthrough-example/run-example.py b/statefun-examples/statefun-python-walkthrough-example/run-example.py
deleted file mode 100644
index 8cee3b5..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/run-example.py
+++ /dev/null
@@ -1,200 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-import sys
-
-import pprint
-import requests
-from google.protobuf.json_format import MessageToDict
-from google.protobuf.any_pb2 import Any
-
-from statefun.request_reply_pb2 import ToFunction, FromFunction, TypedValue
-
-from walkthrough_pb2 import Hello, AnotherHello, Counter
-
-
-class InvocationBuilder(object):
-    """builder for the ToFunction message"""
-
-    def __init__(self):
-        self.to_function = ToFunction()
-
-    def with_target(self, ns, type, id):
-        InvocationBuilder.set_address(ns, type, id, self.to_function.invocation.target)
-        return self
-
-    def with_state(self, name, value=None):
-        state = self.to_function.invocation.state.add()
-        state.state_name = name
-        if value:
-            state.state_value.CopyFrom(self.to_typed_value_any_state(value))
-        return self
-
-    def with_invocation(self, arg, caller=None):
-        invocation = self.to_function.invocation.invocations.add()
-        if caller:
-            (ns, type, id) = caller
-            InvocationBuilder.set_address(ns, type, id, invocation.caller)
-        invocation.argument.CopyFrom(self.to_typed_value(arg))
-        return self
-
-    def SerializeToString(self):
-        return self.to_function.SerializeToString()
-
-    @staticmethod
-    def to_typed_value(proto_msg):
-        any = Any()
-        any.Pack(proto_msg)
-        typed_value = TypedValue()
-        typed_value.typename = any.type_url
-        typed_value.value = any.value
-        return typed_value
-
-    @staticmethod
-    def to_typed_value_any_state(proto_msg):
-        any = Any()
-        any.Pack(proto_msg)
-        typed_value = TypedValue()
-        typed_value.typename = "type.googleapis.com/google.protobuf.Any"
-        typed_value.value = any.SerializeToString()
-        return typed_value
-
-    @staticmethod
-    def set_address(namespace, type, id, address):
-        address.namespace = namespace
-        address.type = type
-        address.id = id
-
-
-def post(data):
-    return requests.post(url='http://localhost:5000/statefun',
-                         data=data,
-                         headers={'Content-Type': 'application/octet-stream'})
-
-
-# --------------------------------------------------------------------------------------------------------------
-# example
-# ---------------------------------------------------------------------------------------------------------------
-
-class Examples(object):
-    def __init__(self):
-        self.examples = {}
-
-    def bind(self, typename):
-        def wrapper(fn):
-            self.examples[typename] = fn
-            return fn
-
-        return wrapper
-
-    def invoke(self, typename):
-        fn = self.examples[typename]
-        builder = InvocationBuilder()
-        type, name = typename.split("/")
-        builder.with_target(type, name, "some id")
-        fn(builder)
-        result = post(builder.SerializeToString())
-        from_fn = FromFunction()
-        from_fn.ParseFromString(result.content)
-        pprint.pprint(MessageToDict(from_fn, preserving_proto_field_name=True, including_default_value_fields=True))
-
-
-examples = Examples()
-
-
-@examples.bind("walkthrough/hello")
-def hello(builder):
-    msg = Hello()
-    msg.world = "Hello world!"
-    builder.with_invocation(msg)
-
-
-@examples.bind("walkthrough/any")
-def any_example(builder):
-    hello(builder)
-
-
-@examples.bind("walkthrough/type-hint")
-def typehint(builder):
-    hello(builder)
-
-
-@examples.bind("walkthrough/union-type-hint")
-def union_type_hint(builder):
-    hello = Hello()
-    builder.with_invocation(hello)
-
-    another_hello = AnotherHello()
-    builder.with_invocation(another_hello)
-
-
-@examples.bind("walkthrough/state_access")
-def state1(builder):
-    builder.with_state("counter")
-    builder.with_invocation(Hello())
-
-
-@examples.bind("walkthrough/state_access_unpack")
-def state2(builder):
-    counter = Counter()
-    counter.value = 1
-    builder.with_state("counter", counter)
-    builder.with_invocation(Hello())
-
-
-@examples.bind("walkthrough/state_access_del")
-def state3(builder):
-    counter = Counter()
-    counter.value = 1
-    builder.with_state("counter", counter)
-    builder.with_invocation(Hello())
-
-
-@examples.bind("walkthrough/missing_state")
-def state4(builder):
-    counter = Counter()
-    counter.value = 1
-    builder.with_state("counter", counter)
-    builder.with_invocation(Hello())
-
-
-@examples.bind("walkthrough/send")
-def send(builder):
-    hello(builder)
-
-
-@examples.bind("walkthrough/reply")
-def reply(builder):
-    reply_to = ("example-runner", "reply", "0")
-    builder.with_invocation(Hello(), reply_to)
-
-
-@examples.bind("walkthrough/egress")
-def egress(builder):
-    hello(builder)
-
-
-def main():
-    if len(sys.argv) != 2:
-        print("usage: run-example.py <ns/name>")
-        sys.exit(1)
-    example = sys.argv[1]
-    examples.invoke(example)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/statefun-examples/statefun-python-walkthrough-example/walkthrough.proto b/statefun-examples/statefun-python-walkthrough-example/walkthrough.proto
deleted file mode 100644
index 8f2897f..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/walkthrough.proto
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-
-// protoc *.proto --python_out=.
-
-package walkthrough;
-
-message Hello {
-    string world = 1;
-}
-
-message AnotherHello {
-}
-
-message Counter {
-    int64 value = 1;
-}
-
-message HelloReply {
-    string message = 1;
-}
-
-message Event {
-}
-
-
diff --git a/statefun-examples/statefun-python-walkthrough-example/walkthrough.py b/statefun-examples/statefun-python-walkthrough-example/walkthrough.py
deleted file mode 100644
index ef3c142..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/walkthrough.py
+++ /dev/null
@@ -1,179 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-import typing
-
-from statefun import StatefulFunctions, StateSpec, AfterWrite, AfterInvoke, kafka_egress_record
-from google.protobuf.any_pb2 import Any
-from datetime import timedelta
-
-#
-# @functions is the entry point, that allows us to register
-# stateful functions identified via a namespace and a name pair
-# of the form "<namespace>/<name>".
-#
-from walkthrough_pb2 import HelloReply, Hello, Counter, AnotherHello, Event
-
-functions = StatefulFunctions()
-
-
-#
-# The following statement binds the Python function instance hello to a namespaced name
-# "walkthrough/hello". This is also known as a function type, in stateful functions terms.
-# i.e. the function type of hello is FunctionType(namespace="walkthrough", type="hello")
-# messages that would be address to this function type, would be dispatched to this function instance.
-#
-@functions.bind("walkthrough/hello")
-def hello(context, message):
-    print(message)
-
-
-# -----------------------------------------------------------------------------------------------------------------
-# Message Types
-# -----------------------------------------------------------------------------------------------------------------
-
-
-@functions.bind("walkthrough/any")
-def any_example(context, any_message):
-    # messages sent to a Python function are always packed into a google.protobuf.Any
-    # (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Any.html)
-    # Therefore the first thing we need to do is to unpack it.
-    if not any_message.Is(Hello.DESCRIPTOR):
-        raise TypeError('Unexpected message type')
-
-    hello = Hello()
-    any_message.Unpack(hello)
-    print(hello)
-
-
-@functions.bind("walkthrough/type-hint")
-def typehint(context, message: Hello):
-    # Although messages that are  sent to a Python function are always packed into a google.protobuf.Any
-    # StateFun can deduce type hints and can unpack the message for you automatically.
-    print(message.world)
-
-
-@functions.bind("walkthrough/union-type-hint")
-def union_type_hint(context, message: typing.Union[Hello, AnotherHello]):
-    # StateFun can deduce type hints and can unpack the message for you automatically, even
-    # when you are expecting more than one message type.
-    print(message)  # <-- would be either an instance of Hello or an instance of AnotherHello
-
-
-# -----------------------------------------------------------------------------------------------------------------
-# State management
-# -----------------------------------------------------------------------------------------------------------------
-
-@functions.bind(
-    typename="walkthrough/state_access",
-    states=[StateSpec("counter")])
-def state1(context, message):
-    # State can be accessed directly by getting the state name (as registered when binding the function).
-    # Remember that the state has to be a valid Protocol Buffers message, and has to be packed into a google.protobuf.Any.
-
-    pb_any = context['counter'] # this raises a ValueError is the accessed state name wasn't registered
-    if pb_any:
-        # state was previously stored for this address
-        counter = Counter()
-        pb_any.Unpack(counter)
-        counter.value += 1
-        pb_any.Pack(counter)
-        context['counter'] = pb_any
-    else:
-        # state was not stored for this address
-        counter = Counter()
-        counter.value = 1
-        pb_any = Any()
-        pb_any.Pack(counter)
-        context['counter'] = pb_any
-
-@functions.bind(
-    typename="walkthrough/state_access_unpack",
-    states=[StateSpec("counter")])
-def state2(context, message):
-    # statefun can help you to unpack/pack the values directly, removing some of the boilerplate
-    # associated with google.protobuf.Any.
-    counter = context.state('counter').unpack(Counter)
-    if counter:
-        counter.value += 1
-    else:
-        counter = Counter()
-        counter.value = 1
-    context.state('counter').pack(counter)
-
-
-@functions.bind(
-    typename="walkthrough/state_access_del",
-    states=[StateSpec("counter")])
-def state3(context, message):
-    # state can be deleted easily by using the del keyword.
-    del context['counter']
-
-
-@functions.bind(
-    typename="walkthrough/missing_state",
-    states=[
-        StateSpec("counter"),
-        StateSpec("missing-state-1"),
-        StateSpec("missing-state-2", expire_after=AfterInvoke(timedelta(days=5))),
-        StateSpec("missing-state-3", expire_after=AfterWrite(timedelta(minutes=10)))
-    ])
-def state4(context, message):
-    # this demonstrates the response from functions if it was invoked but had missing state
-    # in the request; the function would respond with a invocation retry request that
-    # indicates the missing state values and their respective configurations (e.g. TTL)
-    return
-
-
-# -----------------------------------------------------------------------------------------------------------------
-# Sending Messages
-# -----------------------------------------------------------------------------------------------------------------
-
-@functions.bind("walkthrough/send")
-def send(context, message):
-    # context allows you to send messages to other functions, as long as you
-    # know their address. An address is composed of a function type and an id.
-    any = Any()
-    any.Pack(Hello())
-    context.send("walkthrough/reply", "some-id", any)  # see reply() below.
-
-    # you can also use the convenience alternative, that would pack the argument to a google.protobuf.Any
-    context.pack_and_send("walkthrough/reply", "some-id", Hello())
-
-
-@functions.bind("walkthrough/reply")
-def reply(context, message):
-    # directly reply to the sender!
-    reply = HelloReply()
-    reply.message = "This is a reply!"
-    context.pack_and_reply(reply)
-
-
-@functions.bind("walkthrough/egress")
-def egress(context, message):
-    # send a message to an external system via an egress. Egresses needs to be defined in a module.yaml
-    # and can be referenced by type.
-    # The following two lines prepare a message to send to the pre-built Kafka egress.
-    key = context.address.identity  # use the identity part of our own address as the target Kafka key.
-    record = kafka_egress_record(topic="events", key=key, value=Event())
-    context.pack_and_send_egress("walkthrough/events-egress", record)
-
-
-if __name__ == "__main__":
-    from example_utils import flask_server
-
-    flask_server("/statefun", functions)
diff --git a/statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py b/statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py
deleted file mode 100644
index c974860..0000000
--- a/statefun-examples/statefun-python-walkthrough-example/walkthrough_pb2.py
+++ /dev/null
@@ -1,229 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: walkthrough.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='walkthrough.proto',
-  package='walkthrough',
-  syntax='proto3',
-  serialized_options=None,
-  serialized_pb=_b('\n\x11walkthrough.proto\x12\x0bwalkthrough\"\x16\n\x05Hello\x12\r\n\x05world\x18\x01 \x01(\t\"\x0e\n\x0c\x41notherHello\"\x18\n\x07\x43ounter\x12\r\n\x05value\x18\x01 \x01(\x03\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x07\n\x05\x45ventb\x06proto3')
-)
-
-
-
-
-_HELLO = _descriptor.Descriptor(
-  name='Hello',
-  full_name='walkthrough.Hello',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='world', full_name='walkthrough.Hello.world', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=34,
-  serialized_end=56,
-)
-
-
-_ANOTHERHELLO = _descriptor.Descriptor(
-  name='AnotherHello',
-  full_name='walkthrough.AnotherHello',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=58,
-  serialized_end=72,
-)
-
-
-_COUNTER = _descriptor.Descriptor(
-  name='Counter',
-  full_name='walkthrough.Counter',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='value', full_name='walkthrough.Counter.value', index=0,
-      number=1, type=3, cpp_type=2, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=74,
-  serialized_end=98,
-)
-
-
-_HELLOREPLY = _descriptor.Descriptor(
-  name='HelloReply',
-  full_name='walkthrough.HelloReply',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='message', full_name='walkthrough.HelloReply.message', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=100,
-  serialized_end=129,
-)
-
-
-_EVENT = _descriptor.Descriptor(
-  name='Event',
-  full_name='walkthrough.Event',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=131,
-  serialized_end=138,
-)
-
-DESCRIPTOR.message_types_by_name['Hello'] = _HELLO
-DESCRIPTOR.message_types_by_name['AnotherHello'] = _ANOTHERHELLO
-DESCRIPTOR.message_types_by_name['Counter'] = _COUNTER
-DESCRIPTOR.message_types_by_name['HelloReply'] = _HELLOREPLY
-DESCRIPTOR.message_types_by_name['Event'] = _EVENT
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Hello = _reflection.GeneratedProtocolMessageType('Hello', (_message.Message,), dict(
-  DESCRIPTOR = _HELLO,
-  __module__ = 'walkthrough_pb2'
-  # @@protoc_insertion_point(class_scope:walkthrough.Hello)
-  ))
-_sym_db.RegisterMessage(Hello)
-
-AnotherHello = _reflection.GeneratedProtocolMessageType('AnotherHello', (_message.Message,), dict(
-  DESCRIPTOR = _ANOTHERHELLO,
-  __module__ = 'walkthrough_pb2'
-  # @@protoc_insertion_point(class_scope:walkthrough.AnotherHello)
-  ))
-_sym_db.RegisterMessage(AnotherHello)
-
-Counter = _reflection.GeneratedProtocolMessageType('Counter', (_message.Message,), dict(
-  DESCRIPTOR = _COUNTER,
-  __module__ = 'walkthrough_pb2'
-  # @@protoc_insertion_point(class_scope:walkthrough.Counter)
-  ))
-_sym_db.RegisterMessage(Counter)
-
-HelloReply = _reflection.GeneratedProtocolMessageType('HelloReply', (_message.Message,), dict(
-  DESCRIPTOR = _HELLOREPLY,
-  __module__ = 'walkthrough_pb2'
-  # @@protoc_insertion_point(class_scope:walkthrough.HelloReply)
-  ))
-_sym_db.RegisterMessage(HelloReply)
-
-Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), dict(
-  DESCRIPTOR = _EVENT,
-  __module__ = 'walkthrough_pb2'
-  # @@protoc_insertion_point(class_scope:walkthrough.Event)
-  ))
-_sym_db.RegisterMessage(Event)
-
-
-# @@protoc_insertion_point(module_scope)
diff --git a/statefun-examples/statefun-ridesharing-example/Dockerfile.functions b/statefun-examples/statefun-ridesharing-example/Dockerfile.functions
deleted file mode 100644
index dd417bd..0000000
--- a/statefun-examples/statefun-ridesharing-example/Dockerfile.functions
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM flink-statefun:3.0-SNAPSHOT
-
-RUN mkdir -p /opt/statefun/modules/statefun-ridesharing-example
-COPY statefun-ridesharing-example-functions/target/statefun-ridesharing-example*jar /opt/statefun/modules/statefun-ridesharing-example/
-COPY statefun-ridesharing-protocol/target/statefun-ridesharing-protocol*jar /opt/statefun/modules/statefun-ridesharing-example/
diff --git a/statefun-examples/statefun-ridesharing-example/README.md b/statefun-examples/statefun-ridesharing-example/README.md
deleted file mode 100644
index 7655d5f..0000000
--- a/statefun-examples/statefun-ridesharing-example/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# The Ridesharing Example
-
-The Ridesharing example is a more complicated Stateful Functions example consisting of 4 different functions, each
-corresponding to a real-world entity in a ridesharing scenario: `FnDriver`, `FnGeoCell`, `FnPassenger`, and `FnRide`.
-
-The whole example also includes a simulator program, which simulates real-world drivers and passengers sending
-events to the Stateful Functions application. Driver simulations will be sending their location updates to the
-application, while passenger simulations will be sending ride requests.
-
-## Running the example
-
-To run the example:
-
-```
-docker-compose build
-docker-compose up
-```
-
-This starts both the simulator program and Stateful Functions ridesharing example application.
-
-After all the components have fully started, you can take a look at the web UI of the Flink Jobmanager to see the
-application running, at `localhost:8081`.
-
-Then, you need to issue a request to the simulator program to start the simulation:
-
-```
-curl -X POST localhost:5656/api/start
-```
diff --git a/statefun-examples/statefun-ridesharing-example/docker-compose.yml b/statefun-examples/statefun-ridesharing-example/docker-compose.yml
deleted file mode 100644
index 7fe14c5..0000000
--- a/statefun-examples/statefun-ridesharing-example/docker-compose.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-version: "2.1"
-services:
-  zookeeper:
-    image: wurstmeister/zookeeper
-    ports:
-      - "2181:2181"
-  kafka-broker:
-    image: wurstmeister/kafka:2.12-2.0.1
-    ports:
-      - "9092:9092"
-    environment:
-      KAFKA_BROKER_ID: 1
-      HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
-      KAFKA_CREATE_TOPICS: "to-driver:1:1,to-passenger:1:1,from-driver:1:1,from-passenger:1:1"
-      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
-    depends_on:
-      - zookeeper
-    volumes:
-      - /var/run/docker.sock:/var/run/docker.sock
-      - ./kafka:/kafka
-  master:
-    build:
-      dockerfile: Dockerfile.functions
-      context: .
-    # uncomment to start from a savepoint
-    #command: -s /checkpoint-dir/savepoint/savepoint-bf101a-4e99820085fe
-    expose:
-      - "6123"
-    ports:
-      - "8081:8081"
-    environment:
-      - ROLE=master
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-  worker:
-    build:
-      dockerfile: Dockerfile.functions
-      context: .
-    expose:
-      - "6121"
-      - "6122"
-    depends_on:
-      - master
-      - kafka-broker
-    links:
-      - "master:master"
-      - "kafka-broker:kafka-broker"
-    environment:
-      - ROLE=worker
-      - MASTER_HOST=master
-    volumes:
-      - ./checkpoint-dir:/checkpoint-dir
-  simulator:
-    build:
-      context: statefun-ridesharing-example-simulator
-    expose:
-      - "5656"
-    ports:
-      - "5656:5656"
-    depends_on:
-      - kafka-broker
-      - worker
-
diff --git a/statefun-examples/statefun-ridesharing-example/pom.xml b/statefun-examples/statefun-ridesharing-example/pom.xml
deleted file mode 100644
index b8e2509..0000000
--- a/statefun-examples/statefun-ridesharing-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>pom</packaging>
-
-    <artifactId>statefun-ridesharing-example</artifactId>
-
-    <modules>
-        <module>statefun-ridesharing-protocol</module>
-        <module>statefun-ridesharing-example-functions</module>
-        <module>statefun-ridesharing-example-simulator</module>
-    </modules>
-
-
-</project>
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/pom.xml b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/pom.xml
deleted file mode 100644
index 8ebde9a..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-ridesharing-example</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-ridesharing-example-functions</artifactId>
-
-    <dependencies>
-        <!-- ride sharing protocol -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-ridesharing-protocol</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- sdk -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-sdk</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-kafka-io</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- tests -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnDriver.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnDriver.java
deleted file mode 100644
index 5b4cb25..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnDriver.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverJoinsRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverRejectsPickup;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.JoinCell;
-import org.apache.flink.statefun.examples.ridesharing.generated.LeaveCell;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.PickupPassenger;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideEnded;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideStarted;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.match.MatchBinder;
-import org.apache.flink.statefun.sdk.match.StatefulMatchFunction;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-public class FnDriver extends StatefulMatchFunction {
-
-  static final FunctionType TYPE = new FunctionType(Identifiers.NAMESPACE, "driver");
-
-  @Persisted
-  private final PersistedValue<String> currentRideId = PersistedValue.of("ride", String.class);
-
-  @Persisted
-  private final PersistedValue<Integer> location = PersistedValue.of("location", Integer.class);
-
-  @Override
-  public void configure(MatchBinder binder) {
-    binder
-        .predicate(PickupPassenger.class, this::whenPickupIsNeeded)
-        .predicate(
-            InboundDriverMessage.class,
-            InboundDriverMessage::hasRideStarted,
-            this::whenRideHasStarted)
-        .predicate(
-            InboundDriverMessage.class, InboundDriverMessage::hasRideEnded, this::whenRideHasEnded)
-        .predicate(
-            InboundDriverMessage.class,
-            InboundDriverMessage::hasLocationUpdate,
-            this::whenLocationIsUpdated);
-  }
-
-  private void whenPickupIsNeeded(Context context, PickupPassenger pickupPassenger) {
-    if (isTaken()) {
-      // this driver is currently in a ride, and therefore can't take any more
-      // passengers.
-      context.reply(
-          DriverRejectsPickup.newBuilder()
-              .setDriverId(context.self().id())
-              .setRideId(context.caller().id())
-              .build());
-      return;
-    }
-    // We are called by the ride function, so we remember it's id for future communication.
-    currentRideId.set(context.caller().id());
-
-    // We also need to unregister ourselves from the current geo cell we belong to.
-    final int currentLocation =
-        location.getOrDefault(0); // drivers should have a location at this point.
-    context.send(FnGeoCell.TYPE, String.valueOf(currentLocation), LeaveCell.getDefaultInstance());
-
-    // reply to the ride, saying we are taking this passenger
-    context.reply(
-        DriverJoinsRide.newBuilder()
-            .setDriverId(context.self().id())
-            .setDriverLocation(currentLocation)
-            .build());
-
-    // also send a command to the physical driver to pickup the passenger
-    context.send(
-        Identifiers.TO_OUTBOUND_DRIVER,
-        OutboundDriverMessage.newBuilder()
-            .setDriverId(context.self().id())
-            .setPickupPassenger(
-                OutboundDriverMessage.PickupPassenger.newBuilder()
-                    .setRideId(pickupPassenger.getPassengerId())
-                    .setStartGeoLocation(pickupPassenger.getPassengerStartCell())
-                    .setEndGeoLocation(pickupPassenger.getPassengerEndCell())
-                    .build())
-            .build());
-  }
-
-  private void whenRideHasStarted(Context context, InboundDriverMessage ignored) {
-    context.send(
-        FnRide.TYPE,
-        currentRideId.get(),
-        RideStarted.newBuilder()
-            .setDriverId(context.self().id())
-            .setDriverGeoCell(location.get())
-            .build());
-  }
-
-  private void whenRideHasEnded(Context context, InboundDriverMessage ignored) {
-    context.send(FnRide.TYPE, currentRideId.get(), RideEnded.getDefaultInstance());
-    currentRideId.clear();
-
-    // register at the current location as free driver.
-    Integer currentLocation = location.get();
-    context.send(FnGeoCell.TYPE, String.valueOf(currentLocation), JoinCell.getDefaultInstance());
-  }
-
-  private void whenLocationIsUpdated(Context context, InboundDriverMessage locationUpdate) {
-    final int updated = locationUpdate.getLocationUpdate().getCurrentGeoCell();
-    final int last = location.getOrDefault(-1);
-    if (last == -1) {
-      // this is the first time this driver gets a location update.
-      // so we notify the relevant geo cell function.
-      location.set(updated);
-      context.send(FnGeoCell.TYPE, String.valueOf(updated), JoinCell.getDefaultInstance());
-      return;
-    }
-    if (last == updated) {
-      return;
-    }
-    location.set(updated);
-  }
-
-  private boolean isTaken() {
-    String rideId = currentRideId.get();
-    return rideId != null;
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnGeoCell.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnGeoCell.java
deleted file mode 100644
index cf2d39b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnGeoCell.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.*;
-import org.apache.flink.statefun.sdk.Address;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-public class FnGeoCell implements StatefulFunction {
-  static final FunctionType TYPE = new FunctionType(Identifiers.NAMESPACE, "geo-cell");
-
-  @Persisted
-  private final PersistedValue<GeoCellState> drivers =
-      PersistedValue.of("drivers", GeoCellState.class);
-
-  @Override
-  public void invoke(Context context, Object input) {
-    Address caller = context.caller();
-    if (input instanceof JoinCell) {
-      addDriver(caller);
-    } else if (input instanceof LeaveCell) {
-      removeDriver(caller);
-    } else if (input instanceof GetDriver) {
-      getDriver(context);
-    } else {
-      throw new IllegalStateException("Unknown message type " + input);
-    }
-  }
-
-  private void getDriver(Context context) {
-    final GeoCellState state = drivers.get();
-
-    if (hasDriver(state)) {
-      String nextDriverId = state.getDriverIdList().get(0);
-      context.reply(DriverInCell.newBuilder().setDriverId(nextDriverId).build());
-    } else {
-      context.reply(DriverInCell.newBuilder().build());
-    }
-  }
-
-  private void addDriver(Address driver) {
-    GeoCellState state = drivers.get();
-    if (state == null) {
-      state = GeoCellState.newBuilder().addDriverId(driver.id()).build();
-    } else {
-      state = state.toBuilder().addDriverId(driver.id()).build();
-    }
-    drivers.set(state);
-  }
-
-  private void removeDriver(Address driver) {
-    GeoCellState state = drivers.get();
-    if (state == null) {
-      return;
-    }
-    GeoCellState.Builder nextState = state.toBuilder();
-    nextState.clearDriverId();
-
-    for (String otherDriverID : state.getDriverIdList()) {
-      if (!otherDriverID.equals(driver.id())) {
-        nextState.addDriverId(otherDriverID);
-      }
-    }
-    drivers.set(nextState.build());
-  }
-
-  private boolean hasDriver(GeoCellState registeredDrivers) {
-    return registeredDrivers != null && !registeredDrivers.getDriverIdList().isEmpty();
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnPassenger.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnPassenger.java
deleted file mode 100644
index 9493428..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnPassenger.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverJoinsRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage.RequestRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.PassengerJoinsRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideEnded;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideFailed;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideStarted;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.match.MatchBinder;
-import org.apache.flink.statefun.sdk.match.StatefulMatchFunction;
-
-public class FnPassenger extends StatefulMatchFunction {
-
-  static final FunctionType TYPE = new FunctionType(Identifiers.NAMESPACE, "passenger");
-
-  @Override
-  public void configure(MatchBinder binder) {
-    binder
-        .predicate(
-            InboundPassengerMessage.class,
-            InboundPassengerMessage::hasRequestRide,
-            this::whenRideIsRequested)
-        .predicate(DriverJoinsRide.class, this::whenDriverJoins)
-        .predicate(RideFailed.class, this::whenRideFails)
-        .predicate(RideStarted.class, this::whenRideHasStarted)
-        .predicate(RideEnded.class, this::whenRideHasEnded);
-  }
-
-  private void whenRideIsRequested(Context context, InboundPassengerMessage request) {
-    String passengerID = context.self().id();
-    String rideId = "ride-" + ThreadLocalRandom.current().nextLong();
-
-    RequestRide rideRequest = request.getRequestRide();
-    PassengerJoinsRide joinRide =
-        PassengerJoinsRide.newBuilder()
-            .setPassengerId(passengerID)
-            .setStartGeoCell(rideRequest.getStartGeoCell())
-            .setEndGeoCell(rideRequest.getEndGeoCell())
-            .build();
-
-    context.send(FnRide.TYPE, rideId, joinRide);
-  }
-
-  private void whenRideHasEnded(Context context, RideEnded ignored) {
-    final OutboundPassengerMessage out =
-        OutboundPassengerMessage.newBuilder()
-            .setPassengerId(context.self().id())
-            .setRideEnded(OutboundPassengerMessage.RideEnded.newBuilder().build())
-            .build();
-
-    context.send(Identifiers.TO_PASSENGER_EGRESS, out);
-  }
-
-  private void whenRideHasStarted(Context context, RideStarted rideStarted) {
-    final OutboundPassengerMessage out =
-        OutboundPassengerMessage.newBuilder()
-            .setPassengerId(context.self().id())
-            .setRideStarted(
-                OutboundPassengerMessage.RideStarted.newBuilder()
-                    .setDriverId(rideStarted.getDriverId())
-                    .build())
-            .build();
-
-    context.send(Identifiers.TO_PASSENGER_EGRESS, out);
-  }
-
-  private void whenDriverJoins(Context context, DriverJoinsRide message) {
-    final OutboundPassengerMessage out =
-        OutboundPassengerMessage.newBuilder()
-            .setPassengerId(context.self().id())
-            .setDriverFound(
-                OutboundPassengerMessage.DriverHasBeenFound.newBuilder()
-                    .setDriverId(message.getDriverId())
-                    .setDriverGeoCell(message.getDriverLocation())
-                    .build())
-            .build();
-
-    context.send(Identifiers.TO_PASSENGER_EGRESS, out);
-  }
-
-  private void whenRideFails(Context context, RideFailed rideFailed) {
-    final OutboundPassengerMessage out =
-        OutboundPassengerMessage.newBuilder()
-            .setPassengerId(context.self().id())
-            .setRideFailed(
-                OutboundPassengerMessage.RideFailed.newBuilder()
-                    .setRideId(rideFailed.getRideId())
-                    .build())
-            .build();
-
-    context.send(Identifiers.TO_PASSENGER_EGRESS, out);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnRide.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnRide.java
deleted file mode 100644
index 90e623f..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnRide.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverInCell;
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverJoinsRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.DriverRejectsPickup;
-import org.apache.flink.statefun.examples.ridesharing.generated.GetDriver;
-import org.apache.flink.statefun.examples.ridesharing.generated.PassengerJoinsRide;
-import org.apache.flink.statefun.examples.ridesharing.generated.PickupPassenger;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideEnded;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideFailed;
-import org.apache.flink.statefun.examples.ridesharing.generated.RideStarted;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.match.MatchBinder;
-import org.apache.flink.statefun.sdk.match.StatefulMatchFunction;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-final class FnRide extends StatefulMatchFunction {
-
-  static final FunctionType TYPE = new FunctionType(Identifiers.NAMESPACE, "ride");
-
-  @Persisted
-  private final PersistedValue<PassengerJoinsRide> passenger =
-      PersistedValue.of("passenger", PassengerJoinsRide.class);
-
-  @Persisted
-  private final PersistedValue<String> driver = PersistedValue.of("driver", String.class);
-
-  public void configure(MatchBinder binder) {
-    binder
-        .predicate(PassengerJoinsRide.class, this::whenPassengerJoins)
-        .predicate(DriverInCell.class, this::whenGeoCellResponds)
-        .predicate(DriverRejectsPickup.class, this::whenDriverRejectsPickup)
-        .predicate(DriverJoinsRide.class, this::whenDriverJoins)
-        .predicate(RideStarted.class, this::whenRideHasStarted)
-        .predicate(RideEnded.class, this::whenRideHasEnded);
-  }
-
-  /**
-   * When a user joins a ride, we have to: 1. remember that user id 2. remember the starting
-   * location of that ride 3. contact the geo cell of the starting location, and ask for a free
-   * driver
-   */
-  private void whenPassengerJoins(Context context, PassengerJoinsRide in) {
-    final String cellKey = String.valueOf(in.getStartGeoCell());
-    passenger.set(in);
-
-    context.send(FnGeoCell.TYPE, cellKey, GetDriver.getDefaultInstance());
-  }
-
-  /**
-   * Geo cell responds, it might respond with: - there is no driver, in that case we fail the ride -
-   * there is a driver, let's ask them to pickup the passenger.
-   */
-  private void whenGeoCellResponds(Context context, DriverInCell in) {
-    final String driverId = in.getDriverId();
-    final PassengerJoinsRide rideRequest = passenger.get();
-    if (driverId != null && !driverId.isEmpty()) {
-      context.send(
-          FnDriver.TYPE,
-          driverId,
-          PickupPassenger.newBuilder()
-              .setPassengerId(rideRequest.getPassengerId())
-              .setPassengerStartCell(rideRequest.getStartGeoCell())
-              .setPassengerEndCell(rideRequest.getEndGeoCell())
-              .build());
-      return;
-    }
-    // no free drivers in this geo cell, at this example we just fail the ride
-    // but we can imagine that this is where we will expand our search to near geo cells
-    context.send(FnPassenger.TYPE, rideRequest.getPassengerId(), RideFailed.getDefaultInstance());
-
-    // by clearing our state, we essentially delete this instance of the ride actor
-    passenger.clear();
-  }
-
-  /**
-   * A driver might not be free, or for some other reason they can't take this ride, so we try
-   * another driver in that cell.
-   */
-  @SuppressWarnings("unused")
-  private void whenDriverRejectsPickup(Context context, DriverRejectsPickup ignored) {
-    // try another driver, realistically we need to pass in a list of 'banned' drivers,
-    // so that the GeoCell will not offer us these drivers again, but in this example
-    // if a driver rejects a ride, it means that he is currently busy (and it would soon delete
-    // itself from the geo cell)
-    final int startGeoCell = passenger.get().getStartGeoCell();
-    String cellKey = String.valueOf(startGeoCell);
-    context.send(FnGeoCell.TYPE, cellKey, GetDriver.getDefaultInstance());
-  }
-
-  /** A driver has taken this ride. */
-  private void whenDriverJoins(Context context, DriverJoinsRide driverJoinRide) {
-    driver.set(context.caller().id());
-    context.send(FnPassenger.TYPE, passenger.get().getPassengerId(), driverJoinRide);
-  }
-
-  /** A driver has successfully picked up the passenger */
-  private void whenRideHasStarted(Context context, RideStarted rideStarted) {
-    context.send(FnPassenger.TYPE, passenger.get().getPassengerId(), rideStarted);
-  }
-
-  /** The driver has successfully reached the destination. */
-  private void whenRideHasEnded(Context context, RideEnded rideEnded) {
-    context.send(FnPassenger.TYPE, passenger.get().getPassengerId(), rideEnded);
-    passenger.clear();
-    driver.clear();
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FunctionProvider.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FunctionProvider.java
deleted file mode 100644
index 1ac12ae..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FunctionProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.StatefulFunctionProvider;
-
-public class FunctionProvider implements StatefulFunctionProvider {
-
-  @Override
-  public StatefulFunction functionOfType(FunctionType type) {
-    if (type.equals(FnPassenger.TYPE)) {
-      return new FnPassenger();
-    } else if (type.equals(FnDriver.TYPE)) {
-      return new FnDriver();
-    } else if (type.equals(FnRide.TYPE)) {
-      return new FnRide();
-    } else if (type.equals(FnGeoCell.TYPE)) {
-      return new FnGeoCell();
-    } else {
-      throw new IllegalArgumentException("Unknown type " + type);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Identifiers.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Identifiers.java
deleted file mode 100644
index 4101f0b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Identifiers.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.io.IngressIdentifier;
-
-final class Identifiers {
-
-  static final String NAMESPACE = "org.apache.flink.statefun.examples.ridesharing";
-
-  static final IngressIdentifier<InboundPassengerMessage> FROM_PASSENGERS =
-      new IngressIdentifier<>(InboundPassengerMessage.class, NAMESPACE, "from-passenger");
-
-  static final IngressIdentifier<InboundDriverMessage> FROM_DRIVER =
-      new IngressIdentifier<>(InboundDriverMessage.class, NAMESPACE, "from-driver");
-
-  static EgressIdentifier<OutboundPassengerMessage> TO_PASSENGER_EGRESS =
-      new EgressIdentifier<>(NAMESPACE, "to-passenger", OutboundPassengerMessage.class);
-
-  static EgressIdentifier<OutboundDriverMessage> TO_OUTBOUND_DRIVER =
-      new EgressIdentifier<>(NAMESPACE, "to-driver", OutboundDriverMessage.class);
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundDriverRouter.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundDriverRouter.java
deleted file mode 100644
index df5dd37..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundDriverRouter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.sdk.io.Router;
-
-public class InboundDriverRouter implements Router<InboundDriverMessage> {
-
-  @Override
-  public void route(InboundDriverMessage message, Downstream<InboundDriverMessage> downstream) {
-    downstream.forward(FnDriver.TYPE, message.getDriverId(), message);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundPassengerRouter.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundPassengerRouter.java
deleted file mode 100644
index 0da3545..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/InboundPassengerRouter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.sdk.io.Router;
-
-public class InboundPassengerRouter implements Router<InboundPassengerMessage> {
-
-  @Override
-  public void route(
-      InboundPassengerMessage message, Downstream<InboundPassengerMessage> downstream) {
-    downstream.forward(FnPassenger.TYPE, message.getPassengerId(), message);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/KafkaSpecs.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/KafkaSpecs.java
deleted file mode 100644
index 30c554e..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/KafkaSpecs.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import com.google.protobuf.InvalidProtocolBufferException;
-import java.nio.charset.StandardCharsets;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.sdk.io.EgressSpec;
-import org.apache.flink.statefun.sdk.io.IngressSpec;
-import org.apache.flink.statefun.sdk.kafka.KafkaEgressBuilder;
-import org.apache.flink.statefun.sdk.kafka.KafkaEgressSerializer;
-import org.apache.flink.statefun.sdk.kafka.KafkaIngressBuilder;
-import org.apache.flink.statefun.sdk.kafka.KafkaIngressDeserializer;
-import org.apache.kafka.clients.consumer.ConsumerConfig;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-import org.apache.kafka.clients.producer.ProducerRecord;
-
-final class KafkaSpecs {
-
-  private static final String KAFKA_SERVER = "kafka-broker:9092";
-  private static final String TO_PASSENGER_KAFKA_TOPIC_NAME = "to-passenger";
-  private static final String TO_DRIVER_TOPIC_NAME = "to-driver";
-  private static final String FROM_DRIVER_TOPIC_NAME = "from-driver";
-  private static final String FROM_PASSENGER_TOPIC_NAME = "from-passenger";
-
-  static IngressSpec<InboundDriverMessage> FROM_DRIVER_SPEC =
-      KafkaIngressBuilder.forIdentifier(Identifiers.FROM_DRIVER)
-          .withKafkaAddress(KAFKA_SERVER)
-          .withTopic(FROM_DRIVER_TOPIC_NAME)
-          .withProperty(ConsumerConfig.GROUP_ID_CONFIG, "statefun-from-driver-group")
-          .withDeserializer(FromDriverDeserializer.class)
-          .build();
-
-  static IngressSpec<InboundPassengerMessage> FROM_PASSENGER_SPEC =
-      KafkaIngressBuilder.forIdentifier(Identifiers.FROM_PASSENGERS)
-          .withKafkaAddress(KAFKA_SERVER)
-          .withTopic(FROM_PASSENGER_TOPIC_NAME)
-          .withProperty(ConsumerConfig.GROUP_ID_CONFIG, "statefun-from-passenger-group")
-          .withDeserializer(FromPassengersDeserializer.class)
-          .build();
-
-  static EgressSpec<OutboundPassengerMessage> TO_PASSENGER_SPEC =
-      KafkaEgressBuilder.forIdentifier(Identifiers.TO_PASSENGER_EGRESS)
-          .withKafkaAddress(KAFKA_SERVER)
-          .withSerializer(ToPassengersSerializer.class)
-          .build();
-
-  static EgressSpec<OutboundDriverMessage> TO_DRIVER_SPEC =
-      KafkaEgressBuilder.forIdentifier(Identifiers.TO_OUTBOUND_DRIVER)
-          .withKafkaAddress(KAFKA_SERVER)
-          .withSerializer(ToDriverSerializer.class)
-          .build();
-
-  private static final class FromDriverDeserializer
-      implements KafkaIngressDeserializer<InboundDriverMessage> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public InboundDriverMessage deserialize(ConsumerRecord<byte[], byte[]> input) {
-      try {
-        return InboundDriverMessage.parseFrom(input.value());
-      } catch (InvalidProtocolBufferException ex) {
-        throw new RuntimeException(ex);
-      }
-    }
-  }
-
-  private static final class FromPassengersDeserializer
-      implements KafkaIngressDeserializer<InboundPassengerMessage> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public InboundPassengerMessage deserialize(ConsumerRecord<byte[], byte[]> input) {
-      try {
-        return InboundPassengerMessage.parseFrom(input.value());
-      } catch (InvalidProtocolBufferException ex) {
-        throw new RuntimeException(ex);
-      }
-    }
-  }
-
-  private static final class ToPassengersSerializer
-      implements KafkaEgressSerializer<OutboundPassengerMessage> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public ProducerRecord<byte[], byte[]> serialize(OutboundPassengerMessage message) {
-      byte[] key = message.getPassengerId().getBytes(StandardCharsets.UTF_8);
-      byte[] value = message.toByteArray();
-      return new ProducerRecord<>(TO_PASSENGER_KAFKA_TOPIC_NAME, key, value);
-    }
-  }
-
-  private static final class ToDriverSerializer
-      implements KafkaEgressSerializer<OutboundDriverMessage> {
-
-    private static final long serialVersionUID = 1;
-
-    @Override
-    public ProducerRecord<byte[], byte[]> serialize(OutboundDriverMessage message) {
-      byte[] key = message.getDriverId().getBytes(StandardCharsets.UTF_8);
-      byte[] value = message.toByteArray();
-      return new ProducerRecord<>(TO_DRIVER_TOPIC_NAME, key, value);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Module.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Module.java
deleted file mode 100644
index bea933c..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/Module.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
-
-@AutoService(StatefulFunctionModule.class)
-public class Module implements StatefulFunctionModule {
-
-  @Override
-  public void configure(Map<String, String> globalConfiguration, Binder binder) {
-    FunctionProvider provider = new FunctionProvider();
-    binder.bindFunctionProvider(FnPassenger.TYPE, provider);
-    binder.bindFunctionProvider(FnDriver.TYPE, provider);
-    binder.bindFunctionProvider(FnRide.TYPE, provider);
-    binder.bindFunctionProvider(FnGeoCell.TYPE, provider);
-
-    binder.bindIngress(KafkaSpecs.FROM_DRIVER_SPEC);
-    binder.bindIngressRouter(Identifiers.FROM_DRIVER, new InboundDriverRouter());
-    binder.bindEgress(KafkaSpecs.TO_DRIVER_SPEC);
-
-    binder.bindIngress(KafkaSpecs.FROM_PASSENGER_SPEC);
-    binder.bindIngressRouter(Identifiers.FROM_PASSENGERS, new InboundPassengerRouter());
-    binder.bindEgress(KafkaSpecs.TO_PASSENGER_SPEC);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/Dockerfile b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/Dockerfile
deleted file mode 100644
index c8066d9..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Start with a base image containing Java runtime
-FROM openjdk:8-jdk-alpine
-
-# Add a volume pointing to /tmp
-VOLUME /tmp
-
-# Make port 5656 available to the world outside this container
-EXPOSE 5656
-
-ADD target/statefun-ridesharing-example-simulator-*.jar simulator.jar
-ADD application.yaml application.yaml 
-
-# Run the jar file
-ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=dev","-Dspring.config.location=file:/application.yaml","-jar","/simulator.jar"]
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/application.yaml b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/application.yaml
deleted file mode 100644
index 2a124b5..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/application.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-server:
-  port: 5656
-
-security.auth.enabled: false
-security.basic.enable: false
-security.ignored: /**
-
-simulation:
-  grid: 50
-  drivers: 2500
-  passengers: 10
-
-kafka:
-  topic:
-    from-driver: from-driver
-    to-driver: to-driver
-    from-passenger: from-passenger
-    to-passenger: to-passenger
-  listeners:
-    transactions.id: simulator-java-listener
-  bootstrap-servers: kafka-broker:9092
-
-web-socket:
-  topic:
-    passenger: /topic/passenger
-    driver: /topic/driver
-
-management.endpoints.web.exposure.include: mappings, loggers
-  
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/pom.xml b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/pom.xml
deleted file mode 100644
index e788fde..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/pom.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <parent>
-        <artifactId>statefun-ridesharing-example</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-ridesharing-example-simulator</artifactId>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-dependencies</artifactId>
-                <version>2.1.6.RELEASE</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <java.version>1.8</java.version>
-        <logback.version>1.2.3</logback.version>
-        <swagger.version>2.9.2</swagger.version>
-    </properties>
-
-    <dependencies>
-        <!-- ride sharing protocol -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-ridesharing-protocol</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- spring boot -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-websocket</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.kafka</groupId>
-            <artifactId>spring-kafka</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-devtools</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <!-- WEB JARS -->
-        <dependency>
-            <groupId>org.webjars</groupId>
-            <artifactId>sockjs-client</artifactId>
-            <version>1.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.webjars</groupId>
-            <artifactId>stomp-websocket</artifactId>
-            <version>2.3.3</version>
-        </dependency>
-
-        <!-- 3rd party -->
-
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>3.8.0</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-            <version>28.0-jre</version>
-        </dependency>
-
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>${logback.version}</version>
-        </dependency>
-
-        <!-- test -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/Main.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/Main.java
deleted file mode 100644
index 28f5d5f..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/Main.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScan;
-
-@SpringBootApplication
-@EnableAutoConfiguration
-@ComponentScan("org.apache.flink.statefun")
-public class Main {
-  public static void main(String[] args) {
-    SpringApplication.run(Main.class, args);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaConsumerConfig.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaConsumerConfig.java
deleted file mode 100644
index b131b27..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaConsumerConfig.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.configurations;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import org.apache.kafka.clients.consumer.ConsumerConfig;
-import org.apache.kafka.common.serialization.ByteArrayDeserializer;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.kafka.annotation.EnableKafka;
-import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory;
-import org.springframework.kafka.config.KafkaListenerContainerFactory;
-import org.springframework.kafka.core.ConsumerFactory;
-import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
-import org.springframework.kafka.listener.ConcurrentMessageListenerContainer;
-
-@EnableKafka
-@Configuration
-public class KafkaConsumerConfig {
-  private final String bootstrapServer;
-
-  public KafkaConsumerConfig(@Value("${kafka.bootstrap-servers}") String bootstrapServer) {
-    this.bootstrapServer = Objects.requireNonNull(bootstrapServer);
-  }
-
-  @Bean
-  public ConsumerFactory<String, String> consumerFactory() {
-    Map<String, Object> props = new HashMap<>();
-    props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServer);
-    props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-    props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-    props.put(ConsumerConfig.GROUP_ID_CONFIG, "simulator-java.group");
-    props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");
-    return new DefaultKafkaConsumerFactory<>(props);
-  }
-
-  @Bean
-  public KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>>
-      kafkaListenerContainerFactory(ConsumerFactory<String, String> consumerFactory) {
-    ConcurrentKafkaListenerContainerFactory<String, String> factory =
-        new ConcurrentKafkaListenerContainerFactory<>();
-    factory.setConsumerFactory(consumerFactory);
-    return factory;
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaProducerConfig.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaProducerConfig.java
deleted file mode 100644
index e2bfebd..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/KafkaProducerConfig.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.configurations;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import org.apache.kafka.clients.producer.ProducerConfig;
-import org.apache.kafka.common.serialization.ByteArraySerializer;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.kafka.core.DefaultKafkaProducerFactory;
-import org.springframework.kafka.core.KafkaTemplate;
-import org.springframework.kafka.core.ProducerFactory;
-
-@Configuration
-public class KafkaProducerConfig {
-  private final String bootstrapServers;
-
-  public KafkaProducerConfig(@Value("${kafka.bootstrap-servers}") String bootstrapServers) {
-    this.bootstrapServers = Objects.requireNonNull(bootstrapServers);
-  }
-
-  @Bean
-  public ProducerFactory<Object, Object> producerFactory() {
-    Map<String, Object> props = new HashMap<>();
-    props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
-    props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class);
-    props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class);
-    props.put("batch.size", 16384);
-    props.put("linger.ms", 1);
-    props.put("buffer.memory", 33554432);
-
-    return new DefaultKafkaProducerFactory<>(props);
-  }
-
-  @Bean
-  public KafkaTemplate<Object, Object> kafkaTemplate(
-      ProducerFactory<Object, Object> producerFactory) {
-    return new KafkaTemplate<>(producerFactory);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/WebSocketConfig.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/WebSocketConfig.java
deleted file mode 100644
index e7d2ca5..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/configurations/WebSocketConfig.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.configurations;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.messaging.simp.config.MessageBrokerRegistry;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
-import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
-import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
-
-@Configuration
-@EnableWebSocketMessageBroker
-public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
-
-  @Bean
-  public WebMvcConfigurer corsConfigurer() {
-    return new WebMvcConfigurerAdapter() {
-      @Override
-      public void addCorsMappings(CorsRegistry registry) {
-        registry.addMapping("/**").allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH");
-      }
-    };
-  }
-
-  @Override
-  public void registerStompEndpoints(StompEndpointRegistry registry) {
-    registry.addEndpoint("/ws/simulation").setAllowedOrigins("*").withSockJS();
-  }
-
-  @Override
-  public void configureMessageBroker(MessageBrokerRegistry registry) {
-    registry.enableSimpleBroker("/topic");
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/controllers/ApiController.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/controllers/ApiController.java
deleted file mode 100644
index 0d1ae7f..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/controllers/ApiController.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.controllers;
-
-import java.util.Objects;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.SimulationStartedEvent;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.Simulation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RequestMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE, path = "/api")
-@RestController
-public class ApiController {
-
-  private final Simulation simulation;
-
-  @Autowired
-  public ApiController(Simulation simulation) {
-    this.simulation = Objects.requireNonNull(simulation);
-  }
-
-  @PostMapping("/start")
-  public SimulationStartedEvent startSimulation() throws Exception {
-    simulation.start();
-    return new SimulationStartedEvent(true);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/SimulationStartedEvent.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/SimulationStartedEvent.java
deleted file mode 100644
index 5c20d1f..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/SimulationStartedEvent.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.model;
-
-import java.util.Objects;
-
-public class SimulationStartedEvent {
-  private boolean started;
-
-  public SimulationStartedEvent() {}
-
-  public SimulationStartedEvent(boolean started) {
-    this.started = started;
-  }
-
-  public boolean isStarted() {
-    return started;
-  }
-
-  public void setStarted(boolean started) {
-    this.started = started;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    SimulationStartedEvent that = (SimulationStartedEvent) o;
-    return started == that.started;
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(started);
-  }
-
-  @Override
-  public String toString() {
-    return "SimulationStartedEvent{" + "started=" + started + '}';
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketDriverEvent.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketDriverEvent.java
deleted file mode 100644
index 86e60c3..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketDriverEvent.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.model;
-
-import java.util.Objects;
-
-public class WebsocketDriverEvent {
-  private String driverId;
-  private int currentLocation;
-  private DriverStatus driverStatus;
-  private RideInformation ride;
-
-  public WebsocketDriverEvent() {}
-
-  public WebsocketDriverEvent(
-      String driverId, int currentLocation, DriverStatus driverStatus, RideInformation ride) {
-    this.driverId = driverId;
-    this.currentLocation = currentLocation;
-    this.driverStatus = driverStatus;
-    this.ride = ride;
-  }
-
-  public String getDriverId() {
-    return driverId;
-  }
-
-  public void setDriverId(String driverId) {
-    this.driverId = driverId;
-  }
-
-  public int getCurrentLocation() {
-    return currentLocation;
-  }
-
-  public void setCurrentLocation(int currentLocation) {
-    this.currentLocation = currentLocation;
-  }
-
-  public DriverStatus getDriverStatus() {
-    return driverStatus;
-  }
-
-  public void setDriverStatus(DriverStatus driverStatus) {
-    this.driverStatus = driverStatus;
-  }
-
-  public RideInformation getRide() {
-    return ride;
-  }
-
-  public void setRide(RideInformation ride) {
-    this.ride = ride;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    WebsocketDriverEvent that = (WebsocketDriverEvent) o;
-    return currentLocation == that.currentLocation
-        && Objects.equals(driverId, that.driverId)
-        && driverStatus == that.driverStatus
-        && Objects.equals(ride, that.ride);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(driverId, currentLocation, driverStatus, ride);
-  }
-
-  @Override
-  public String toString() {
-    return "WebsocketDriverEvent{"
-        + "driverId='"
-        + driverId
-        + '\''
-        + ", currentLocation="
-        + currentLocation
-        + ", driverStatus="
-        + driverStatus
-        + ", ride="
-        + ride
-        + '}';
-  }
-
-  public enum DriverStatus {
-    IDLE,
-    PICKUP,
-    ENROUTE,
-    RIDE_COMPLETED
-  }
-
-  public static class RideInformation {
-    private String passengerId;
-    private int pickupLocation;
-    private int dropoffLocation;
-
-    public RideInformation() {}
-
-    public RideInformation(String passengerId, int pickupLocation, int dropoffLocation) {
-      this.passengerId = passengerId;
-      this.pickupLocation = pickupLocation;
-      this.dropoffLocation = dropoffLocation;
-    }
-
-    public String getPassengerId() {
-      return passengerId;
-    }
-
-    public void setPassengerId(String passengerId) {
-      this.passengerId = passengerId;
-    }
-
-    public int getPickupLocation() {
-      return pickupLocation;
-    }
-
-    public void setPickupLocation(int pickupLocation) {
-      this.pickupLocation = pickupLocation;
-    }
-
-    public int getDropoffLocation() {
-      return dropoffLocation;
-    }
-
-    public void setDropoffLocation(int dropoffLocation) {
-      this.dropoffLocation = dropoffLocation;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (this == o) {
-        return true;
-      }
-      if (o == null || getClass() != o.getClass()) {
-        return false;
-      }
-      RideInformation that = (RideInformation) o;
-      return pickupLocation == that.pickupLocation
-          && dropoffLocation == that.dropoffLocation
-          && Objects.equals(passengerId, that.passengerId);
-    }
-
-    @Override
-    public String toString() {
-      return "RideInformation{"
-          + "passengerId='"
-          + passengerId
-          + '\''
-          + ", pickupLocation="
-          + pickupLocation
-          + ", dropoffLocation="
-          + dropoffLocation
-          + '}';
-    }
-
-    @Override
-    public int hashCode() {
-      return Objects.hash(passengerId, pickupLocation, dropoffLocation);
-    }
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static final class Builder {
-    private String driverId;
-    private int currentLocation;
-    private DriverStatus driverStatus;
-    private RideInformation ride;
-
-    private Builder() {}
-
-    public Builder driverId(String driverId) {
-      this.driverId = driverId;
-      return this;
-    }
-
-    public Builder currentLocation(int currentLocation) {
-      this.currentLocation = currentLocation;
-      return this;
-    }
-
-    public Builder driverStatus(DriverStatus driverStatus) {
-      this.driverStatus = driverStatus;
-      return this;
-    }
-
-    public Builder ride(RideInformation ride) {
-      this.ride = ride;
-      return this;
-    }
-
-    public WebsocketDriverEvent build() {
-      WebsocketDriverEvent websocketDriverEvent = new WebsocketDriverEvent();
-      websocketDriverEvent.setDriverId(driverId);
-      websocketDriverEvent.setCurrentLocation(currentLocation);
-      websocketDriverEvent.setDriverStatus(driverStatus);
-      websocketDriverEvent.setRide(ride);
-      return websocketDriverEvent;
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketPassengerEvent.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketPassengerEvent.java
deleted file mode 100644
index dc67fe6..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/model/WebsocketPassengerEvent.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.model;
-
-import java.util.Objects;
-
-public class WebsocketPassengerEvent {
-  private String passengerId;
-  private PassengerStatus status;
-  private String rideId;
-  private String driverId;
-  private int startLocation;
-  private int endLocation;
-
-  public WebsocketPassengerEvent() {}
-
-  public WebsocketPassengerEvent(
-      String passengerId,
-      PassengerStatus status,
-      String rideId,
-      String driverId,
-      int startLocation,
-      int endLocation) {
-    this.passengerId = passengerId;
-    this.status = status;
-    this.rideId = rideId;
-    this.driverId = driverId;
-    this.startLocation = startLocation;
-    this.endLocation = endLocation;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    WebsocketPassengerEvent that = (WebsocketPassengerEvent) o;
-    return startLocation == that.startLocation
-        && endLocation == that.endLocation
-        && Objects.equals(passengerId, that.passengerId)
-        && status == that.status
-        && Objects.equals(rideId, that.rideId)
-        && Objects.equals(driverId, that.driverId);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(passengerId, status, rideId, driverId, startLocation, endLocation);
-  }
-
-  public String getPassengerId() {
-    return passengerId;
-  }
-
-  public void setPassengerId(String passengerId) {
-    this.passengerId = passengerId;
-  }
-
-  public PassengerStatus getStatus() {
-    return status;
-  }
-
-  public void setStatus(PassengerStatus status) {
-    this.status = status;
-  }
-
-  public String getRideId() {
-    return rideId;
-  }
-
-  public void setRideId(String rideId) {
-    this.rideId = rideId;
-  }
-
-  public String getDriverId() {
-    return driverId;
-  }
-
-  public void setDriverId(String driverId) {
-    this.driverId = driverId;
-  }
-
-  public int getStartLocation() {
-    return startLocation;
-  }
-
-  public void setStartLocation(int startLocation) {
-    this.startLocation = startLocation;
-  }
-
-  public int getEndLocation() {
-    return endLocation;
-  }
-
-  public void setEndLocation(int endLocation) {
-    this.endLocation = endLocation;
-  }
-
-  public enum PassengerStatus {
-    IDLE,
-    REQUESTING,
-    WAITING_FOR_RIDE_TO_START,
-    FAIL,
-    RIDING,
-    DONE
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static final class Builder {
-    private String passengerId;
-    private PassengerStatus status;
-    private String rideId;
-    private String driverId;
-    private int startLocation;
-    private int endLocation;
-
-    private Builder() {}
-
-    public Builder passengerId(String passengerId) {
-      this.passengerId = passengerId;
-      return this;
-    }
-
-    public Builder status(PassengerStatus status) {
-      this.status = status;
-      return this;
-    }
-
-    public Builder rideId(String rideId) {
-      this.rideId = rideId;
-      return this;
-    }
-
-    public Builder driverId(String driverId) {
-      this.driverId = driverId;
-      return this;
-    }
-
-    public Builder startLocation(int startLocation) {
-      this.startLocation = startLocation;
-      return this;
-    }
-
-    public Builder endLocation(int endLocation) {
-      this.endLocation = endLocation;
-      return this;
-    }
-
-    public WebsocketPassengerEvent build() {
-      WebsocketPassengerEvent websocketPassengerEvent = new WebsocketPassengerEvent();
-      websocketPassengerEvent.setPassengerId(passengerId);
-      websocketPassengerEvent.setStatus(status);
-      websocketPassengerEvent.setRideId(rideId);
-      websocketPassengerEvent.setDriverId(driverId);
-      websocketPassengerEvent.setStartLocation(startLocation);
-      websocketPassengerEvent.setEndLocation(endLocation);
-      return websocketPassengerEvent;
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaConsumerService.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaConsumerService.java
deleted file mode 100644
index 906e90f..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaConsumerService.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.services;
-
-import com.google.protobuf.InvalidProtocolBufferException;
-import java.util.Objects;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.messaging.Communication;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.kafka.annotation.KafkaListener;
-import org.springframework.messaging.handler.annotation.Payload;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KafkaConsumerService {
-  private final Communication simulation;
-
-  @Autowired
-  public KafkaConsumerService(Communication simulation) {
-    this.simulation = Objects.requireNonNull(simulation);
-  }
-
-  @KafkaListener(topics = "${kafka.topic.to-passenger}", groupId = "passengers")
-  public void toPassenger(@Payload byte[] message) throws InvalidProtocolBufferException {
-    OutboundPassengerMessage passengerMessage = OutboundPassengerMessage.parseFrom(message);
-    simulation.incomingPassengerEvent(passengerMessage);
-  }
-
-  @KafkaListener(topics = "${kafka.topic.to-driver}", groupId = "drivers")
-  public void toDriver(@Payload byte[] message) throws InvalidProtocolBufferException {
-    OutboundDriverMessage driverMessage = OutboundDriverMessage.parseFrom(message);
-    simulation.incomingDriverEvent(driverMessage);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaDriverPublisher.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaDriverPublisher.java
deleted file mode 100644
index a3c3ba5..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaDriverPublisher.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.services;
-
-import java.nio.charset.StandardCharsets;
-import java.util.function.Consumer;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.kafka.core.KafkaTemplate;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KafkaDriverPublisher implements Consumer<InboundDriverMessage> {
-  private final String topic;
-  private KafkaTemplate<Object, Object> kafkaTemplate;
-
-  @Autowired
-  public KafkaDriverPublisher(
-      KafkaTemplate<Object, Object> kafkaTemplateForJson,
-      @Value("${kafka.topic.from-driver}") String topic) {
-    this.kafkaTemplate = kafkaTemplateForJson;
-    this.topic = topic;
-  }
-
-  @Override
-  public void accept(InboundDriverMessage driver) {
-    byte[] keyBytes = driver.getDriverId().getBytes(StandardCharsets.UTF_8);
-    kafkaTemplate.send(topic, keyBytes, driver.toByteArray());
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaPassengerPublisher.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaPassengerPublisher.java
deleted file mode 100644
index c83bd7d..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/services/KafkaPassengerPublisher.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.services;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-import java.util.function.Consumer;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.kafka.core.KafkaTemplate;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KafkaPassengerPublisher implements Consumer<InboundPassengerMessage> {
-  private final String topic;
-  private final KafkaTemplate<Object, Object> kafkaTemplate;
-
-  @Autowired
-  public KafkaPassengerPublisher(
-      KafkaTemplate<Object, Object> kafkaTemplate,
-      @Value("${kafka.topic.from-passenger}") String topic) {
-    this.kafkaTemplate = Objects.requireNonNull(kafkaTemplate);
-    this.topic = Objects.requireNonNull(topic);
-  }
-
-  @Override
-  public void accept(InboundPassengerMessage passenger) {
-    byte[] bytes = passenger.getPassengerId().getBytes(StandardCharsets.UTF_8);
-    kafkaTemplate.send(topic, bytes, passenger.toByteArray());
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Driver.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Driver.java
deleted file mode 100644
index cf1e030..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Driver.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import com.google.common.base.Preconditions;
-import java.util.concurrent.ThreadLocalRandom;
-import javax.annotation.Nullable;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketDriverEvent;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.LifecycleMessages;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.Simulatee;
-
-public class Driver implements Simulatee {
-  private final String driverId;
-  private final DriverMessaging messaging;
-  private final StateMachine<WebsocketDriverEvent.DriverStatus> stateMachine;
-  private final int gridDimension;
-
-  private int currentLocation;
-
-  @Nullable private WebsocketDriverEvent.RideInformation rideInformation;
-
-  Driver(String driverId, DriverMessaging messaging, int gridDimension, int startLocation) {
-    this.driverId = driverId;
-    this.messaging = messaging;
-    this.gridDimension = gridDimension;
-    this.currentLocation = startLocation;
-
-    stateMachine = new StateMachine<>(WebsocketDriverEvent.DriverStatus.IDLE);
-
-    // we don't have anything to do on initialization
-    stateMachine.withState(
-        WebsocketDriverEvent.DriverStatus.IDLE,
-        LifecycleMessages.Initialization.class,
-        unused -> WebsocketDriverEvent.DriverStatus.IDLE);
-
-    // idle heartbeat
-    stateMachine.withState(
-        WebsocketDriverEvent.DriverStatus.IDLE, LifecycleMessages.TimeTick.class, this::heartbeat);
-
-    // pickup request
-    stateMachine.withState(
-        WebsocketDriverEvent.DriverStatus.IDLE,
-        OutboundDriverMessage.class,
-        OutboundDriverMessage::hasPickupPassenger,
-        this::pickupPassenger);
-
-    stateMachine.withState(
-        WebsocketDriverEvent.DriverStatus.PICKUP,
-        LifecycleMessages.TimeTick.class,
-        this::preformPickup);
-    stateMachine.withState(
-        WebsocketDriverEvent.DriverStatus.ENROUTE,
-        LifecycleMessages.TimeTick.class,
-        this::preformRoute);
-  }
-
-  /** send periodic heart beats when idle */
-  private WebsocketDriverEvent.DriverStatus heartbeat(
-      @SuppressWarnings("unused") LifecycleMessages.TimeTick ignored) {
-
-    // notify application
-    messaging.outgoingDriverEvent(
-        InboundDriverMessage.newBuilder()
-            .setDriverId(driverId)
-            .setLocationUpdate(
-                InboundDriverMessage.LocationUpdate.newBuilder().setCurrentGeoCell(currentLocation))
-            .build());
-
-    // notify the websocket
-    messaging.broadcastDriverSimulationEvent(
-        WebsocketDriverEvent.builder()
-            .currentLocation(currentLocation)
-            .driverId(driverId)
-            .driverStatus(WebsocketDriverEvent.DriverStatus.IDLE)
-            .ride(null)
-            .build());
-
-    return WebsocketDriverEvent.DriverStatus.IDLE;
-  }
-
-  /** receive a pickup command and start riding to the passenger */
-  private WebsocketDriverEvent.DriverStatus pickupPassenger(OutboundDriverMessage message) {
-    OutboundDriverMessage.PickupPassenger pickup = message.getPickupPassenger();
-
-    // capture ride info from the pickup message
-    this.rideInformation =
-        new WebsocketDriverEvent.RideInformation(
-            pickup.getRideId(), pickup.getStartGeoLocation(), pickup.getEndGeoLocation());
-
-    // notify the websocket
-    messaging.broadcastDriverSimulationEvent(
-        WebsocketDriverEvent.builder()
-            .ride(rideInformation)
-            .driverStatus(WebsocketDriverEvent.DriverStatus.PICKUP)
-            .driverId(driverId)
-            .currentLocation(currentLocation)
-            .build());
-
-    return WebsocketDriverEvent.DriverStatus.PICKUP;
-  }
-
-  private WebsocketDriverEvent.DriverStatus preformPickup(
-      @SuppressWarnings("unused") LifecycleMessages.TimeTick ignored) {
-    Preconditions.checkState(rideInformation != null, "should have ride information.");
-    if (currentLocation == rideInformation.getPickupLocation()) {
-      // we have reached to the passenger, lets pick him up!
-
-      messaging.broadcastDriverSimulationEvent(
-          WebsocketDriverEvent.builder()
-              .currentLocation(currentLocation)
-              .driverId(driverId)
-              .driverStatus(WebsocketDriverEvent.DriverStatus.ENROUTE)
-              .ride(rideInformation)
-              .build());
-
-      messaging.outgoingDriverEvent(
-          InboundDriverMessage.newBuilder()
-              .setDriverId(driverId)
-              .setRideStarted(InboundDriverMessage.RideStarted.getDefaultInstance())
-              .build());
-
-      return WebsocketDriverEvent.DriverStatus.ENROUTE;
-    }
-
-    // we need to advance toward the passenger
-    int selfX = currentLocation / gridDimension;
-    int selfY = currentLocation % gridDimension;
-    final int passX = rideInformation.getPickupLocation() / gridDimension;
-    final int passY = rideInformation.getPickupLocation() % gridDimension;
-
-    if (ThreadLocalRandom.current().nextBoolean()) {
-      //
-      // advance in X
-      //
-      if (selfX > passX) {
-        selfX--;
-      } else if (selfX < passX) {
-        selfX++;
-      }
-    } else {
-      //
-      // advance in Y
-      //
-      if (selfY > passY) {
-        selfY--;
-      } else if (selfY < passY) {
-        selfY++;
-      }
-    }
-
-    currentLocation = selfX * gridDimension + selfY;
-
-    // send a heartbeat with our new location
-    // notify application of our new location
-    messaging.outgoingDriverEvent(
-        InboundDriverMessage.newBuilder()
-            .setDriverId(driverId)
-            .setLocationUpdate(
-                InboundDriverMessage.LocationUpdate.newBuilder().setCurrentGeoCell(currentLocation))
-            .build());
-
-    // notify the websocket
-    messaging.broadcastDriverSimulationEvent(
-        WebsocketDriverEvent.builder()
-            .currentLocation(currentLocation)
-            .driverId(driverId)
-            .driverStatus(WebsocketDriverEvent.DriverStatus.PICKUP)
-            .ride(rideInformation)
-            .build());
-
-    return WebsocketDriverEvent.DriverStatus.PICKUP;
-  }
-
-  private WebsocketDriverEvent.DriverStatus preformRoute(
-      @SuppressWarnings("unused") LifecycleMessages.TimeTick ignored) {
-    Preconditions.checkState(rideInformation != null, "should have ride information.");
-    if (currentLocation == rideInformation.getDropoffLocation()) {
-      // done!
-
-      // notify websocket
-      messaging.broadcastDriverSimulationEvent(
-          WebsocketDriverEvent.builder()
-              .currentLocation(currentLocation)
-              .driverId(driverId)
-              .driverStatus(
-                  WebsocketDriverEvent.DriverStatus
-                      .RIDE_COMPLETED) // TODO: should we send ride done?
-              .ride(rideInformation)
-              .build());
-
-      // notify application
-      messaging.outgoingDriverEvent(
-          InboundDriverMessage.newBuilder()
-              .setDriverId(driverId)
-              .setRideEnded(
-                  InboundDriverMessage.RideEnded.newBuilder()
-                      .setRideId(rideInformation.getPassengerId()))
-              .build());
-
-      rideInformation = null;
-
-      // we switch back to idle
-      return WebsocketDriverEvent.DriverStatus.IDLE;
-    }
-
-    // we need to advance toward the passenger's dropoff location
-    int selfX = currentLocation / gridDimension;
-    int selfY = currentLocation % gridDimension;
-    final int passX = rideInformation.getDropoffLocation() / gridDimension;
-    final int passY = rideInformation.getDropoffLocation() % gridDimension;
-
-    if (ThreadLocalRandom.current().nextBoolean()) {
-      //
-      // advance in X
-      //
-      if (selfX > passX) {
-        selfX--;
-      } else if (selfX < passX) {
-        selfX++;
-      }
-    } else {
-      //
-      // advance in Y
-      //
-      if (selfY > passY) {
-        selfY--;
-      } else if (selfY < passY) {
-        selfY++;
-      }
-    }
-
-    currentLocation = selfX * gridDimension + selfY;
-
-    // send a heartbeat with our new location
-    // notify application of our new location
-    messaging.outgoingDriverEvent(
-        InboundDriverMessage.newBuilder()
-            .setDriverId(driverId)
-            .setLocationUpdate(
-                InboundDriverMessage.LocationUpdate.newBuilder().setCurrentGeoCell(currentLocation))
-            .build());
-
-    // notify the websocket
-    messaging.broadcastDriverSimulationEvent(
-        WebsocketDriverEvent.builder()
-            .currentLocation(currentLocation)
-            .driverId(driverId)
-            .driverStatus(WebsocketDriverEvent.DriverStatus.ENROUTE)
-            .ride(rideInformation)
-            .build());
-
-    return WebsocketDriverEvent.DriverStatus.ENROUTE;
-  }
-
-  @Override
-  public String id() {
-    return driverId;
-  }
-
-  @Override
-  public boolean isDone() {
-    return stateMachine.isAtTerminalState();
-  }
-
-  @Override
-  public void apply(Object event) {
-    stateMachine.apply(event);
-  }
-
-  @Override
-  public boolean needReschedule() {
-    return true; // the driver never rests.
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/DriverMessaging.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/DriverMessaging.java
deleted file mode 100644
index 4218947..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/DriverMessaging.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketDriverEvent;
-
-public interface DriverMessaging {
-
-  /** handle an event that was sent from application to the simulator */
-  void incomingDriverEvent(OutboundDriverMessage message);
-
-  /** send an event to the application */
-  void outgoingDriverEvent(InboundDriverMessage message);
-
-  /** notify to whoever is listening that there is a driver state change */
-  void broadcastDriverSimulationEvent(WebsocketDriverEvent driverEvent);
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Passenger.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Passenger.java
deleted file mode 100644
index daae86b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Passenger.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketPassengerEvent;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.LifecycleMessages;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.Simulatee;
-
-public class Passenger implements Simulatee {
-  private final PassengerMessaging simulation;
-  private final StateMachine<WebsocketPassengerEvent.PassengerStatus> stateMachine;
-  private final String id;
-  private final int startCell;
-  private final int endCell;
-
-  private String driverId;
-
-  Passenger(PassengerMessaging simulation, String id, int startCell, int endCell) {
-    this.simulation = simulation;
-    this.id = id;
-    this.startCell = startCell;
-    this.endCell = endCell;
-    this.stateMachine = passengerStateMachine();
-  }
-
-  /**
-   * when this state machine initializes we send a ride request, and move to the next state ({@link
-   * WebsocketPassengerEvent.PassengerStatus#REQUESTING}
-   */
-  @SuppressWarnings("unused")
-  private WebsocketPassengerEvent.PassengerStatus init(LifecycleMessages.Initialization ignored) {
-
-    final InboundPassengerMessage rideRequest =
-        InboundPassengerMessage.newBuilder()
-            .setPassengerId(id)
-            .setRequestRide(
-                InboundPassengerMessage.RequestRide.newBuilder()
-                    .setStartGeoCell(startCell)
-                    .setEndGeoCell(endCell))
-            .build();
-
-    // send to application
-    simulation.outgoingPassengerEvent(rideRequest);
-
-    // send to the web socket
-    simulation.broadcastPassengerSimulationEvent(
-        WebsocketPassengerEvent.builder()
-            .passengerId(id)
-            .startLocation(startCell)
-            .endLocation(endCell)
-            .status(WebsocketPassengerEvent.PassengerStatus.REQUESTING)
-            .rideId("") // we don't have it yet.
-            .build());
-
-    // next state would be requesting a ride
-    return WebsocketPassengerEvent.PassengerStatus.REQUESTING;
-  }
-
-  /** The ride failed, couldn't find a driver nearby. */
-  private WebsocketPassengerEvent.PassengerStatus rideFailed(OutboundPassengerMessage message) {
-    final String failedRideId = message.getRideFailed().getRideId();
-    //
-    // notify the websocket
-    //
-    simulation.broadcastPassengerSimulationEvent(
-        WebsocketPassengerEvent.builder()
-            .passengerId(id)
-            .startLocation(startCell)
-            .endLocation(endCell)
-            .status(WebsocketPassengerEvent.PassengerStatus.FAIL)
-            .rideId(failedRideId)
-            .build());
-
-    return WebsocketPassengerEvent.PassengerStatus.FAIL;
-  }
-
-  /** A driver was found, now waiting for the pickup to happen. */
-  private WebsocketPassengerEvent.PassengerStatus driverFound(OutboundPassengerMessage message) {
-    OutboundPassengerMessage.DriverHasBeenFound driverFound = message.getDriverFound();
-
-    simulation.broadcastPassengerSimulationEvent(
-        WebsocketPassengerEvent.builder()
-            .rideId("") // TODO: ?
-            .passengerId(id)
-            .startLocation(startCell)
-            .endLocation(endCell)
-            .driverId(driverFound.getDriverId())
-            .status(WebsocketPassengerEvent.PassengerStatus.WAITING_FOR_RIDE_TO_START)
-            .build());
-
-    // capture the driver id
-    driverId = driverFound.getDriverId();
-
-    return WebsocketPassengerEvent.PassengerStatus.WAITING_FOR_RIDE_TO_START;
-  }
-
-  private WebsocketPassengerEvent.PassengerStatus rideStarted(OutboundPassengerMessage message) {
-    OutboundPassengerMessage.RideStarted rideStarted = message.getRideStarted();
-
-    simulation.broadcastPassengerSimulationEvent(
-        WebsocketPassengerEvent.builder()
-            .rideId("") // TODO: ?
-            .passengerId(id)
-            .startLocation(startCell)
-            .endLocation(endCell)
-            .driverId(rideStarted.getDriverId())
-            .status(WebsocketPassengerEvent.PassengerStatus.RIDING)
-            .build());
-
-    return WebsocketPassengerEvent.PassengerStatus.RIDING;
-  }
-
-  @SuppressWarnings("unused")
-  private WebsocketPassengerEvent.PassengerStatus rideEnded(OutboundPassengerMessage ignored) {
-    simulation.broadcastPassengerSimulationEvent(
-        WebsocketPassengerEvent.builder()
-            .rideId("") // TODO: ?
-            .passengerId(id)
-            .startLocation(startCell)
-            .endLocation(endCell)
-            .driverId(driverId)
-            .status(WebsocketPassengerEvent.PassengerStatus.DONE)
-            .build());
-
-    return WebsocketPassengerEvent.PassengerStatus.DONE;
-  }
-
-  private StateMachine<WebsocketPassengerEvent.PassengerStatus> passengerStateMachine() {
-    StateMachine<WebsocketPassengerEvent.PassengerStatus> stateMachine =
-        new StateMachine<>(WebsocketPassengerEvent.PassengerStatus.IDLE);
-
-    stateMachine.withTerminalState(WebsocketPassengerEvent.PassengerStatus.FAIL);
-    stateMachine.withTerminalState(WebsocketPassengerEvent.PassengerStatus.DONE);
-
-    // send the req
-    stateMachine.withState(
-        WebsocketPassengerEvent.PassengerStatus.IDLE,
-        LifecycleMessages.Initialization.class,
-        this::init);
-
-    // req success
-    stateMachine.withState(
-        WebsocketPassengerEvent.PassengerStatus.REQUESTING,
-        OutboundPassengerMessage.class,
-        OutboundPassengerMessage::hasDriverFound,
-        this::driverFound);
-
-    // req failure (terminal)
-    stateMachine.withState(
-        WebsocketPassengerEvent.PassengerStatus.REQUESTING,
-        OutboundPassengerMessage.class,
-        OutboundPassengerMessage::hasRideFailed,
-        this::rideFailed);
-
-    // ride started
-    stateMachine.withState(
-        WebsocketPassengerEvent.PassengerStatus.WAITING_FOR_RIDE_TO_START,
-        OutboundPassengerMessage.class,
-        OutboundPassengerMessage::hasRideStarted,
-        this::rideStarted);
-
-    // ride finished (terminal)
-    stateMachine.withState(
-        WebsocketPassengerEvent.PassengerStatus.RIDING,
-        OutboundPassengerMessage.class,
-        OutboundPassengerMessage::hasRideEnded,
-        this::rideEnded);
-
-    return stateMachine;
-  }
-
-  @Override
-  public String id() {
-    return id;
-  }
-
-  @Override
-  public boolean isDone() {
-    return stateMachine.isAtTerminalState();
-  }
-
-  @Override
-  public void apply(Object event) {
-    stateMachine.apply(event);
-  }
-
-  @Override
-  public boolean needReschedule() {
-    return false;
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/PassengerMessaging.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/PassengerMessaging.java
deleted file mode 100644
index 20099f8..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/PassengerMessaging.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketPassengerEvent;
-
-public interface PassengerMessaging {
-
-  /** handle an event that was sent from application to the simulator */
-  void incomingPassengerEvent(OutboundPassengerMessage message);
-
-  /** send an event to the application */
-  void outgoingPassengerEvent(InboundPassengerMessage message);
-
-  /** notify whoever is listening that there is a passenger state change */
-  void broadcastPassengerSimulationEvent(WebsocketPassengerEvent passengerEvent);
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Simulation.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Simulation.java
deleted file mode 100644
index 417a490..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/Simulation.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import com.google.common.util.concurrent.RateLimiter;
-import java.util.Objects;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.Scheduler;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.Simulatee;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.messaging.Communication;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-@Component
-public class Simulation {
-  private final Scheduler scheduler;
-  private final Communication communication;
-  private final int gridDimension;
-  private final int driverCount;
-  private final int passengerCount;
-
-  @Autowired
-  public Simulation(
-      Scheduler scheduler,
-      Communication communication,
-      @Value("${simulation.grid}") int gridDimension,
-      @Value("${simulation.drivers}") int driverCount,
-      @Value("${simulation.passengers}") int passengerCount) {
-    this.scheduler = Objects.requireNonNull(scheduler);
-    this.communication = Objects.requireNonNull(communication);
-    this.gridDimension = gridDimension;
-    this.driverCount = driverCount;
-    this.passengerCount = passengerCount;
-  }
-
-  public void start() {
-    if (!scheduler.start()) {
-      return;
-    }
-    //
-    // create the drivers
-    //
-    createDrivers();
-    createPassengers();
-  }
-
-  private void createDrivers() {
-    final ThreadLocalRandom random = ThreadLocalRandom.current();
-    for (int i = 0; i < driverCount; i++) {
-      final String id = "driver-" + UUID.randomUUID();
-      final int startLocation = random.nextInt(gridDimension * gridDimension);
-
-      Driver driver = new Driver(id, communication, gridDimension, startLocation);
-      scheduler.add(driver);
-    }
-  }
-
-  private void createPassengers() {
-    Thread t = new Thread(new PassengerLoop());
-    t.setDaemon(true);
-    t.start();
-  }
-
-  private final class PassengerLoop implements Runnable {
-
-    @SuppressWarnings("InfiniteLoopStatement")
-    @Override
-    public void run() {
-      final ThreadLocalRandom random = ThreadLocalRandom.current();
-      while (true) {
-        try {
-          createBatchOfPassengers(random);
-        } catch (Throwable ignored) {
-        }
-      }
-    }
-
-    private void createBatchOfPassengers(ThreadLocalRandom random) {
-      @SuppressWarnings("UnstableApiUsage")
-      RateLimiter rate = RateLimiter.create(2);
-      for (int j = 0; j < passengerCount; j++) {
-        rate.acquire();
-        int startCell, endCell;
-        do {
-          startCell = random.nextInt(gridDimension * gridDimension);
-          int dx = random.nextInt(-10, 10);
-          int dy = random.nextInt(-10, 10);
-          endCell = moveSlightly(startCell, dx, dy);
-        } while (startCell == endCell);
-
-        String id = "passenger-" + UUID.randomUUID();
-        Simulatee passenger = new Passenger(communication, id, startCell, endCell);
-        scheduler.add(passenger);
-      }
-    }
-
-    private int moveSlightly(int startCell, int dx, int dy) {
-      int x = startCell / gridDimension;
-      int y = startCell % gridDimension;
-
-      x += dx;
-      y += dy;
-
-      if (x < 0) {
-        x = 0;
-      }
-      if (x >= gridDimension) {
-        x = gridDimension - 1;
-      }
-      if (y < 0) {
-        y = 0;
-      }
-      if (y >= gridDimension) {
-        y = gridDimension - 1;
-      }
-      return x * gridDimension + y;
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/StateMachine.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/StateMachine.java
deleted file mode 100644
index 54d76f2..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/StateMachine.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation;
-
-import static com.google.common.base.Preconditions.checkState;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-import java.util.function.Predicate;
-
-final class StateMachine<S extends Enum<S>> {
-
-  public interface Behaviour<S extends Enum<S>, E> {
-    S apply(E event);
-  }
-
-  private final class Case<E> {
-    private final Class<E> eventType;
-    private final Predicate<E> predicate;
-    private final Behaviour<S, E> action;
-
-    Case(Class<E> eventType, Predicate<E> predicate, Behaviour<S, E> action) {
-      this.eventType = eventType;
-      this.predicate = predicate;
-      this.action = action;
-    }
-
-    Optional<S> tryApply(Object event) {
-      if (!eventType.isInstance(event)) {
-        return Optional.empty();
-      }
-      final E e = eventType.cast(event);
-      if (!predicate.test(e)) {
-        return Optional.empty();
-      }
-      final S nextState = action.apply(e);
-      return Optional.ofNullable(nextState);
-    }
-  }
-
-  private final Map<S, List<Case<?>>> cases = new HashMap<>();
-
-  private S current;
-  private final Set<S> terminalStates = new HashSet<>();
-
-  StateMachine(S initialState) {
-    this.current = initialState;
-  }
-
-  @SuppressWarnings("UnusedReturnValue")
-  <E> StateMachine<S> withState(S state, Class<E> eventType, Behaviour<S, E> action) {
-    return withState(state, eventType, unused -> true, action);
-  }
-
-  @SuppressWarnings("UnusedReturnValue")
-  <E> StateMachine<S> withState(
-      S state, Class<E> eventType, Predicate<E> guard, Behaviour<S, E> action) {
-    List<Case<?>> stateCases = cases.computeIfAbsent(state, unused -> new ArrayList<>());
-    stateCases.add(new Case<>(eventType, guard, action));
-    return this;
-  }
-
-  void withTerminalState(S terminalState) {
-    this.terminalStates.add(terminalState);
-  }
-
-  void apply(Object event) {
-    checkState(!terminalStates.contains(current), "Already at a terminal state " + current);
-    Optional<S> next = tryApply(event);
-    if (!next.isPresent()) {
-      throw new IllegalArgumentException(
-          "Don't know how to handle the event "
-              + safeGetClass(event)
-              + " in state "
-              + current
-              + " event:"
-              + event);
-    }
-    current = next.get();
-  }
-
-  boolean isAtTerminalState() {
-    return terminalStates.contains(current);
-  }
-
-  private Optional<S> tryApply(Object event) {
-    final List<Case<?>> stateCases = cases.getOrDefault(current, Collections.emptyList());
-    for (Case<?> c : stateCases) {
-      final Optional<S> nextState = c.tryApply(event);
-      if (nextState.isPresent()) {
-        return nextState;
-      }
-    }
-    return Optional.empty();
-  }
-
-  private static String safeGetClass(Object event) {
-    return event == null ? "<null>" : event.getClass().toString();
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/DaemonThreadFactory.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/DaemonThreadFactory.java
deleted file mode 100644
index bd42eaa..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/DaemonThreadFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-import java.util.concurrent.ThreadFactory;
-import javax.annotation.Nonnull;
-
-public enum DaemonThreadFactory implements ThreadFactory {
-  INSTANCE;
-
-  @Override
-  public Thread newThread(@Nonnull Runnable r) {
-    Thread t = new Thread(r);
-    t.setDaemon(true);
-    return t;
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/EventLoop.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/EventLoop.java
deleted file mode 100644
index 3f9928b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/EventLoop.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-import java.util.Objects;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-
-final class EventLoop implements Runnable {
-  private final ReadySet readySet = new ReadySet();
-  private final ConcurrentHashMap<String, Task> globalTasks;
-  private final ScheduledExecutorService timerExecutor =
-      Executors.newScheduledThreadPool(1, DaemonThreadFactory.INSTANCE);
-
-  EventLoop(ConcurrentHashMap<String, Task> globalTasks) {
-    this.globalTasks = globalTasks;
-  }
-
-  void addToReadySet(Task task) {
-    readySet.add(task);
-  }
-
-  @SuppressWarnings("InfiniteLoopStatement")
-  @Override
-  public void run() {
-    while (true) {
-      try {
-        processTask();
-      } catch (Throwable ignored) {
-      }
-    }
-  }
-
-  private void processTask() throws InterruptedException {
-    final Task task = readySet.take();
-    try {
-      task.processEnqueued();
-      if (task.isDone()) {
-        // this entity is done and can be removed from the system
-        globalTasks.remove(task.id());
-      } else if (task.needReschedule()) {
-        scheduleLater(task);
-      }
-    } catch (Throwable ignored) {
-    }
-  }
-
-  private void scheduleLater(Task e) {
-    final int jitter = ThreadLocalRandom.current().nextInt(500, 1100);
-    Objects.requireNonNull(e);
-    timerExecutor.schedule(
-        () -> {
-          e.enqueue(LifecycleMessages.timeTick());
-          readySet.add(e);
-        },
-        jitter,
-        TimeUnit.MILLISECONDS);
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/LifecycleMessages.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/LifecycleMessages.java
deleted file mode 100644
index db7c7d5..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/LifecycleMessages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-public final class LifecycleMessages {
-  private LifecycleMessages() {}
-
-  static Initialization initialization() {
-    return Initialization.INSTANCE;
-  }
-
-  static TimeTick timeTick() {
-    return TimeTick.INSTANCE;
-  }
-
-  public enum Initialization {
-    INSTANCE
-  }
-
-  public enum TimeTick {
-    INSTANCE
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/ReadySet.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/ReadySet.java
deleted file mode 100644
index a7608a3..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/ReadySet.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-import java.util.ArrayDeque;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-
-final class ReadySet {
-  private final ReentrantLock lock = new ReentrantLock(true);
-  private final Condition hasWork = lock.newCondition();
-  private final HashSet<String> enqueuedIds = new HashSet<>();
-  private final ArrayDeque<Task> ready = new ArrayDeque<>(4096);
-
-  void add(Task e) {
-    Objects.requireNonNull(e);
-    lock.lock();
-    try {
-      if (!enqueuedIds.add(e.id())) {
-        return;
-      }
-      ready.addLast(e);
-      hasWork.signalAll();
-    } finally {
-      lock.unlock();
-    }
-  }
-
-  Task take() throws InterruptedException {
-    lock.lock();
-    try {
-      while (ready.isEmpty()) {
-        hasWork.await();
-      }
-      final Task e = ready.poll();
-      enqueuedIds.remove(e.id());
-      return e;
-    } finally {
-      lock.unlock();
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Scheduler.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Scheduler.java
deleted file mode 100644
index 809d1d8..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Scheduler.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-import java.util.Objects;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.annotation.Nullable;
-import org.springframework.stereotype.Component;
-
-@Component
-public class Scheduler {
-
-  private static final int THREAD_COUNT = 4;
-
-  private final AtomicBoolean started = new AtomicBoolean(false);
-
-  private final ConcurrentHashMap<String, Task> tasks = new ConcurrentHashMap<>();
-
-  private final Executor eventLoopExecutor =
-      Executors.newFixedThreadPool(THREAD_COUNT, DaemonThreadFactory.INSTANCE);
-
-  private final EventLoop[] eventLoops = new EventLoop[THREAD_COUNT];
-
-  public boolean start() {
-    if (!started.compareAndSet(false, true)) {
-      return false;
-    }
-    for (int i = 0; i < THREAD_COUNT; i++) {
-      EventLoop eventLoop = new EventLoop(tasks);
-      eventLoops[i] = eventLoop;
-      eventLoopExecutor.execute(eventLoop);
-    }
-    return true;
-  }
-
-  public void add(Simulatee simulatee) {
-    Objects.requireNonNull(simulatee);
-
-    Task task = new Task(simulatee);
-    task.enqueue(LifecycleMessages.initialization());
-
-    tasks.put(task.id(), task);
-
-    eventLoopFor(task).addToReadySet(task);
-  }
-
-  public void enqueueTaskMessage(String simulateeId, Object message) {
-    Objects.requireNonNull(simulateeId);
-    Objects.requireNonNull(message);
-
-    final @Nullable Task task = tasks.get(simulateeId);
-    if (task == null) {
-      return;
-    }
-    task.enqueue(message);
-    eventLoopFor(task).addToReadySet(task);
-  }
-
-  private EventLoop eventLoopFor(Task task) {
-    return eventLoops[partition(task)];
-  }
-
-  private static int partition(Task task) {
-    Objects.requireNonNull(task);
-    return Math.abs(task.id().hashCode()) % THREAD_COUNT;
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Simulatee.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Simulatee.java
deleted file mode 100644
index 1c7268b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Simulatee.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-public interface Simulatee {
-
-  String id();
-
-  void apply(Object event);
-
-  boolean isDone();
-
-  boolean needReschedule();
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Task.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Task.java
deleted file mode 100644
index d7c096b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/engine/Task.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine;
-
-import java.util.Objects;
-import java.util.concurrent.ConcurrentLinkedDeque;
-import javax.annotation.Nullable;
-
-final class Task {
-
-  private final ConcurrentLinkedDeque<Object> events = new ConcurrentLinkedDeque<>();
-
-  private final Simulatee simulatee;
-
-  Task(Simulatee simulatee) {
-    this.simulatee = Objects.requireNonNull(simulatee);
-  }
-
-  String id() {
-    return simulatee.id();
-  }
-
-  final void enqueue(Object event) {
-    Objects.requireNonNull(event);
-    events.add(event);
-  }
-
-  final void processEnqueued() {
-    final Simulatee simulatee = this.simulatee;
-    while (!simulatee.isDone()) {
-      final @Nullable Object event = events.poll();
-      if (event == null) {
-        return;
-      }
-      simulatee.apply(event);
-    }
-  }
-
-  boolean isDone() {
-    return simulatee.isDone();
-  }
-
-  boolean needReschedule() {
-    return simulatee.needReschedule();
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/messaging/Communication.java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/messaging/Communication.java
deleted file mode 100644
index af1d43a..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/java/org/apache/flink/statefun/examples/ridesharing/simulator/simulation/messaging/Communication.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.ridesharing.simulator.simulation.messaging;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.util.Objects;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.InboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundDriverMessage;
-import org.apache.flink.statefun.examples.ridesharing.generated.OutboundPassengerMessage;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketDriverEvent;
-import org.apache.flink.statefun.examples.ridesharing.simulator.model.WebsocketPassengerEvent;
-import org.apache.flink.statefun.examples.ridesharing.simulator.services.KafkaDriverPublisher;
-import org.apache.flink.statefun.examples.ridesharing.simulator.services.KafkaPassengerPublisher;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.DriverMessaging;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.PassengerMessaging;
-import org.apache.flink.statefun.examples.ridesharing.simulator.simulation.engine.Scheduler;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.messaging.simp.SimpMessagingTemplate;
-import org.springframework.stereotype.Component;
-
-@Component
-public class Communication implements PassengerMessaging, DriverMessaging {
-  private final KafkaPassengerPublisher passengerPublisher;
-  private final KafkaDriverPublisher driverPublisher;
-  private final SimpMessagingTemplate simpSender;
-  private final String passengerWebSocketTopic;
-  private final String driverWebSocketTopic;
-  private final ObjectMapper objectMapper = new ObjectMapper();
-
-  private final Scheduler scheduler;
-
-  @Autowired
-  public Communication(
-      KafkaPassengerPublisher passengerPublisher,
-      KafkaDriverPublisher driverPublisher,
-      SimpMessagingTemplate simpSender,
-      @Value("${web-socket.topic.passenger}") String passengerWebSocketTopic,
-      @Value("${web-socket.topic.driver}") String driverWebSocketTopic,
-      Scheduler scheduler) {
-    this.passengerPublisher = Objects.requireNonNull(passengerPublisher);
-    this.driverPublisher = Objects.requireNonNull(driverPublisher);
-    this.simpSender = Objects.requireNonNull(simpSender);
-    this.passengerWebSocketTopic = Objects.requireNonNull(passengerWebSocketTopic);
-    this.driverWebSocketTopic = Objects.requireNonNull(driverWebSocketTopic);
-    this.scheduler = Objects.requireNonNull(scheduler);
-  }
-
-  public void incomingPassengerEvent(OutboundPassengerMessage message) {
-    scheduler.enqueueTaskMessage(message.getPassengerId(), message);
-  }
-
-  public void incomingDriverEvent(OutboundDriverMessage message) {
-    scheduler.enqueueTaskMessage(message.getDriverId(), message);
-  }
-
-  public void outgoingPassengerEvent(InboundPassengerMessage message) {
-    passengerPublisher.accept(message);
-  }
-
-  public void outgoingDriverEvent(InboundDriverMessage message) {
-    driverPublisher.accept(message);
-  }
-
-  public void broadcastPassengerSimulationEvent(WebsocketPassengerEvent passengerEvent) {
-    String json = toJsonString(passengerEvent);
-    simpSender.convertAndSend(passengerWebSocketTopic, json);
-  }
-
-  public void broadcastDriverSimulationEvent(WebsocketDriverEvent driverEvent) {
-    if (driverEvent.getDriverStatus() == WebsocketDriverEvent.DriverStatus.IDLE) {
-      // don't broadcast idle drivers, this is slightly too much.
-      return;
-    }
-    String json = toJsonString(driverEvent);
-    simpSender.convertAndSend(driverWebSocketTopic, json);
-  }
-
-  private String toJsonString(Object what) {
-    try {
-      return objectMapper.writeValueAsString(what);
-    } catch (JsonProcessingException e) {
-      throw new RuntimeException(e);
-    }
-  }
-}
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/NOTICE b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 410dd4a..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,82 +0,0 @@
-statefun-ridesharing-example-simulator
-Copyright 2014-2020 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This project bundles the following dependencies under the Apache Software License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-- org.springframework.boot:spring-boot:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-autoconfigure:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter-web:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter-logging:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter-json:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter-tomcat:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-starter-websocket:2.1.6.RELEASE
-- org.springframework.boot:spring-boot-devtools:2.1.6.RELEASE
-- org.springframework:spring-web:5.1.8.RELEASE
-- org.springframework:spring-beans:5.1.8.RELEASE
-- org.springframework:spring-webmvc:5.1.8.RELEASE
-- org.springframework:spring-aop:5.1.8.RELEASE
-- org.springframework:spring-expression:5.1.8.RELEASE
-- org.springframework:spring-messaging:5.1.8.RELEASE
-- org.springframework:spring-websocket:5.1.8.RELEASE
-- org.springframework:spring-context:5.1.8.RELEASE
-- org.springframework:spring-tx:5.1.8.RELEASE
-- org.springframework:spring-core:5.1.8.RELEASE
-- org.springframework:spring-jcl:5.1.8.RELEASE
-- org.springframework.kafka:spring-kafka:2.2.7.RELEASE
-- org.springframework.retry:spring-retry:1.2.4.RELEASE
-- org.apache.tomcat.embed:tomcat-embed-core:9.0.21
-- org.apache.tomcat.embed:tomcat-embed-el:9.0.21
-- org.apache.tomcat.embed:tomcat-embed-websocket:9.0.21
-- org.apache.logging.log4j:log4j-to-slf4j:2.11.2
-- org.apache.logging.log4j:log4j-api:2.11.2
-- org.yaml:snakeyaml:1.23
-- com.fasterxml.jackson.core:jackson-databind:2.9.9
-- com.fasterxml.jackson.core:jackson-annotations:2.9.0
-- com.fasterxml.jackson.core:jackson-core:2.9.9
-- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9
-- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9
-- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9
-- com.fasterxml:classmate:1.4.0
-- org.hibernate.validator:hibernate-validator:6.0.17.Final
-- javax.validation:validation-api:2.0.1.Final
-- org.jboss.logging:jboss-logging:3.3.2.Final
-- org.apache.kafka:kafka-clients:2.0.1
-- org.lz4:lz4-java:1.4.1
-- org.xerial.snappy:snappy-java:1.1.7.1
-- org.webjars:stomp-websocket:2.3.3
-- com.google.guava:guava:28.0-jre
-- com.google.guava:failureaccess:1.0.1
-- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-- com.google.code.findbugs:jsr305:3.0.2
-- com.google.errorprone:error_prone_annotations:2.3.2
-- com.google.j2objc:j2objc-annotations:1.3
-- com.google.auto.service:auto-service-annotations:1.0-rc6
-
-This project bundles the following dependencies under the MIT license.
-See bundled license files under "META-INF/licenses" for details.
-
-- org.slf4j:jul-to-slf4j:1.7.26
-- org.webjars:sockjs-client:1.0.2
-- org.checkerframework:checker-qual:2.8.1
-- org.codehaus.mojo:animal-sniffer-annotations:1.17
-- org.slf4j:slf4j-api:1.7.26
-
-This project bundles the following dependencies under the BSD license.
-See bundled license files under "META-INF/licenses" for details.
-
-- com.google.protobuf:protobuf-java:3.8.0
-
-This project bundles the following dual-licensed dependency under the terms of the CDDL 1.1 license.
-See bundled license files under "META-INF/licenses" for details.
-
-- javax.annotation:javax.annotation-api:1.3.2 (dual-licensed under CDDL 1.1 and GPLv2)
-
-This project bundles the following dual-licensed dependencies under the terms of the EPL v1.0 license.
-See bundled license files under "META-INF/licenses" for details.
-
-- ch.qos.logback:logback-classic:1.2.3 (dual-licensed under EPL v1.0 and LGPL 2.1)
-- ch.qos.logback:logback-core:1.2.3 (dual-licensed under EPL v1.0 and LGPL 2.1)
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.animal-sniffer-annotations b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.animal-sniffer-annotations
deleted file mode 100644
index 7f197e9..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.animal-sniffer-annotations
+++ /dev/null
@@ -1,19 +0,0 @@
-MIT License:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.checker-qual b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.checker-qual
deleted file mode 100644
index 9837c6b..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.checker-qual
+++ /dev/null
@@ -1,22 +0,0 @@
-Checker Framework qualifiers
-Copyright 2004-present by the Checker Framework developers
-
-MIT License:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.javax.annotation-api b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.javax.annotation-api
deleted file mode 100644
index b1c74f9..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.javax.annotation-api
+++ /dev/null
@@ -1,759 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1
-
-1. Definitions.
-
-    1.1. "Contributor" means each individual or entity that creates or
-    contributes to the creation of Modifications.
-
-    1.2. "Contributor Version" means the combination of the Original
-    Software, prior Modifications used by a Contributor (if any), and
-    the Modifications made by that particular Contributor.
-
-    1.3. "Covered Software" means (a) the Original Software, or (b)
-    Modifications, or (c) the combination of files containing Original
-    Software with files containing Modifications, in each case including
-    portions thereof.
-
-    1.4. "Executable" means the Covered Software in any form other than
-    Source Code.
-
-    1.5. "Initial Developer" means the individual or entity that first
-    makes Original Software available under this License.
-
-    1.6. "Larger Work" means a work which combines Covered Software or
-    portions thereof with code not governed by the terms of this License.
-
-    1.7. "License" means this document.
-
-    1.8. "Licensable" means having the right to grant, to the maximum
-    extent possible, whether at the time of the initial grant or
-    subsequently acquired, any and all of the rights conveyed herein.
-
-    1.9. "Modifications" means the Source Code and Executable form of
-    any of the following:
-
-    A. Any file that results from an addition to, deletion from or
-    modification of the contents of a file containing Original Software
-    or previous Modifications;
-
-    B. Any new file that contains any part of the Original Software or
-    previous Modification; or
-
-    C. Any new file that is contributed or otherwise made available
-    under the terms of this License.
-
-    1.10. "Original Software" means the Source Code and Executable form
-    of computer software code that is originally released under this
-    License.
-
-    1.11. "Patent Claims" means any patent claim(s), now owned or
-    hereafter acquired, including without limitation, method, process,
-    and apparatus claims, in any patent Licensable by grantor.
-
-    1.12. "Source Code" means (a) the common form of computer software
-    code in which modifications are made and (b) associated
-    documentation included in or with such code.
-
-    1.13. "You" (or "Your") means an individual or a legal entity
-    exercising rights under, and complying with all of the terms of,
-    this License. For legal entities, "You" includes any entity which
-    controls, is controlled by, or is under common control with You. For
-    purposes of this definition, "control" means (a) the power, direct
-    or indirect, to cause the direction or management of such entity,
-    whether by contract or otherwise, or (b) ownership of more than
-    fifty percent (50%) of the outstanding shares or beneficial
-    ownership of such entity.
-
-2. License Grants.
-
-    2.1. The Initial Developer Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and subject
-    to third party intellectual property claims, the Initial Developer
-    hereby grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Initial Developer, to use, reproduce,
-    modify, display, perform, sublicense and distribute the Original
-    Software (or portions thereof), with or without Modifications,
-    and/or as part of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using or selling of
-    Original Software, to make, have made, use, practice, sell, and
-    offer for sale, and/or otherwise dispose of the Original Software
-    (or portions thereof).
-
-    (c) The licenses granted in Sections 2.1(a) and (b) are effective on
-    the date Initial Developer first distributes or otherwise makes the
-    Original Software available to a third party under the terms of this
-    License.
-
-    (d) Notwithstanding Section 2.1(b) above, no patent license is
-    granted: (1) for code that You delete from the Original Software, or
-    (2) for infringements caused by: (i) the modification of the
-    Original Software, or (ii) the combination of the Original Software
-    with other software or devices.
-
-    2.2. Contributor Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and subject
-    to third party intellectual property claims, each Contributor hereby
-    grants You a world-wide, royalty-free, non-exclusive license:
-
-    (a) under intellectual property rights (other than patent or
-    trademark) Licensable by Contributor to use, reproduce, modify,
-    display, perform, sublicense and distribute the Modifications
-    created by such Contributor (or portions thereof), either on an
-    unmodified basis, with other Modifications, as Covered Software
-    and/or as part of a Larger Work; and
-
-    (b) under Patent Claims infringed by the making, using, or selling
-    of Modifications made by that Contributor either alone and/or in
-    combination with its Contributor Version (or portions of such
-    combination), to make, use, sell, offer for sale, have made, and/or
-    otherwise dispose of: (1) Modifications made by that Contributor (or
-    portions thereof); and (2) the combination of Modifications made by
-    that Contributor with its Contributor Version (or portions of such
-    combination).
-
-    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
-    on the date Contributor first distributes or otherwise makes the
-    Modifications available to a third party.
-
-    (d) Notwithstanding Section 2.2(b) above, no patent license is
-    granted: (1) for any code that Contributor has deleted from the
-    Contributor Version; (2) for infringements caused by: (i) third
-    party modifications of Contributor Version, or (ii) the combination
-    of Modifications made by that Contributor with other software
-    (except as part of the Contributor Version) or other devices; or (3)
-    under Patent Claims infringed by Covered Software in the absence of
-    Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-    3.1. Availability of Source Code.
-
-    Any Covered Software that You distribute or otherwise make available
-    in Executable form must also be made available in Source Code form
-    and that Source Code form must be distributed only under the terms
-    of this License. You must include a copy of this License with every
-    copy of the Source Code form of the Covered Software You distribute
-    or otherwise make available. You must inform recipients of any such
-    Covered Software in Executable form as to how they can obtain such
-    Covered Software in Source Code form in a reasonable manner on or
-    through a medium customarily used for software exchange.
-
-    3.2. Modifications.
-
-    The Modifications that You create or to which You contribute are
-    governed by the terms of this License. You represent that You
-    believe Your Modifications are Your original creation(s) and/or You
-    have sufficient rights to grant the rights conveyed by this License.
-
-    3.3. Required Notices.
-
-    You must include a notice in each of Your Modifications that
-    identifies You as the Contributor of the Modification. You may not
-    remove or alter any copyright, patent or trademark notices contained
-    within the Covered Software, or any notices of licensing or any
-    descriptive text giving attribution to any Contributor or the
-    Initial Developer.
-
-    3.4. Application of Additional Terms.
-
-    You may not offer or impose any terms on any Covered Software in
-    Source Code form that alters or restricts the applicable version of
-    this License or the recipients' rights hereunder. You may choose to
-    offer, and to charge a fee for, warranty, support, indemnity or
-    liability obligations to one or more recipients of Covered Software.
-    However, you may do so only on Your own behalf, and not on behalf of
-    the Initial Developer or any Contributor. You must make it
-    absolutely clear that any such warranty, support, indemnity or
-    liability obligation is offered by You alone, and You hereby agree
-    to indemnify the Initial Developer and every Contributor for any
-    liability incurred by the Initial Developer or such Contributor as a
-    result of warranty, support, indemnity or liability terms You offer.
-
-    3.5. Distribution of Executable Versions.
-
-    You may distribute the Executable form of the Covered Software under
-    the terms of this License or under the terms of a license of Your
-    choice, which may contain terms different from this License,
-    provided that You are in compliance with the terms of this License
-    and that the license for the Executable form does not attempt to
-    limit or alter the recipient's rights in the Source Code form from
-    the rights set forth in this License. If You distribute the Covered
-    Software in Executable form under a different license, You must make
-    it absolutely clear that any terms which differ from this License
-    are offered by You alone, not by the Initial Developer or
-    Contributor. You hereby agree to indemnify the Initial Developer and
-    every Contributor for any liability incurred by the Initial
-    Developer or such Contributor as a result of any such terms You offer.
-
-    3.6. Larger Works.
-
-    You may create a Larger Work by combining Covered Software with
-    other code not governed by the terms of this License and distribute
-    the Larger Work as a single product. In such a case, You must make
-    sure the requirements of this License are fulfilled for the Covered
-    Software.
-
-4. Versions of the License.
-
-    4.1. New Versions.
-
-    Oracle is the initial license steward and may publish revised and/or
-    new versions of this License from time to time. Each version will be
-    given a distinguishing version number. Except as provided in Section
-    4.3, no one other than the license steward has the right to modify
-    this License.
-
-    4.2. Effect of New Versions.
-
-    You may always continue to use, distribute or otherwise make the
-    Covered Software available under the terms of the version of the
-    License under which You originally received the Covered Software. If
-    the Initial Developer includes a notice in the Original Software
-    prohibiting it from being distributed or otherwise made available
-    under any subsequent version of the License, You must distribute and
-    make the Covered Software available under the terms of the version
-    of the License under which You originally received the Covered
-    Software. Otherwise, You may also choose to use, distribute or
-    otherwise make the Covered Software available under the terms of any
-    subsequent version of the License published by the license steward.
-
-    4.3. Modified Versions.
-
-    When You are an Initial Developer and You want to create a new
-    license for Your Original Software, You may create and use a
-    modified version of this License if You: (a) rename the license and
-    remove any references to the name of the license steward (except to
-    note that the license differs from this License); and (b) otherwise
-    make it clear that the license contains terms which differ from this
-    License.
-
-5. DISCLAIMER OF WARRANTY.
-
-    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-    WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE
-    IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
-    NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
-    THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
-    DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY
-    OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
-    REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-    ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS
-    AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to
-    cure such breach within 30 days of becoming aware of the breach.
-    Provisions which, by their nature, must remain in effect beyond the
-    termination of this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding
-    declaratory judgment actions) against Initial Developer or a
-    Contributor (the Initial Developer or Contributor against whom You
-    assert such claim is referred to as "Participant") alleging that the
-    Participant Software (meaning the Contributor Version where the
-    Participant is a Contributor or the Original Software where the
-    Participant is the Initial Developer) directly or indirectly
-    infringes any patent, then any and all rights granted directly or
-    indirectly to You by such Participant, the Initial Developer (if the
-    Initial Developer is not the Participant) and all Contributors under
-    Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice
-    from Participant terminate prospectively and automatically at the
-    expiration of such 60 day notice period, unless if within such 60
-    day period You withdraw Your claim with respect to the Participant
-    Software against such Participant either unilaterally or pursuant to
-    a written agreement with Participant.
-
-    6.3. If You assert a patent infringement claim against Participant
-    alleging that the Participant Software directly or indirectly
-    infringes any patent where such claim is resolved (such as by
-    license or settlement) prior to the initiation of patent
-    infringement litigation, then the reasonable value of the licenses
-    granted by such Participant under Sections 2.1 or 2.2 shall be taken
-    into account in determining the amount or value of any payment or
-    license.
-
-    6.4. In the event of termination under Sections 6.1 or 6.2 above,
-    all end user licenses that have been validly granted by You or any
-    distributor hereunder prior to termination (excluding licenses
-    granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE
-    TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-    LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
-    FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
-    LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE
-    POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT
-    APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
-    PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
-    LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
-    LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
-    AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-    The Covered Software is a "commercial item," as that term is defined
-    in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-    software" (as that term is defined at 48 C.F.R. §
-    252.227-7014(a)(1)) and "commercial computer software documentation"
-    as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent
-    with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
-    (June 1995), all U.S. Government End Users acquire Covered Software
-    with only those rights set forth herein. This U.S. Government Rights
-    clause is in lieu of, and supersedes, any other FAR, DFAR, or other
-    clause or provision that addresses Government rights in computer
-    software under this License.
-
-9. MISCELLANEOUS.
-
-    This License represents the complete agreement concerning subject
-    matter hereof. If any provision of this License is held to be
-    unenforceable, such provision shall be reformed only to the extent
-    necessary to make it enforceable. This License shall be governed by
-    the law of the jurisdiction specified in a notice contained within
-    the Original Software (except to the extent applicable law, if any,
-    provides otherwise), excluding such jurisdiction's conflict-of-law
-    provisions. Any litigation relating to this License shall be subject
-    to the jurisdiction of the courts located in the jurisdiction and
-    venue specified in a notice contained within the Original Software,
-    with the losing party responsible for costs, including, without
-    limitation, court costs and reasonable attorneys' fees and expenses.
-    The application of the United Nations Convention on Contracts for
-    the International Sale of Goods is expressly excluded. Any law or
-    regulation which provides that the language of a contract shall be
-    construed against the drafter shall not apply to this License. You
-    agree that You alone are responsible for compliance with the United
-    States export administration regulations (and the export control
-    laws and regulation of any other countries) when You use, distribute
-    or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-    As between Initial Developer and the Contributors, each party is
-    responsible for claims and damages arising, directly or indirectly,
-    out of its utilization of rights under this License and You agree to
-    work with Initial Developer and Contributors to distribute such
-    responsibility on an equitable basis. Nothing herein is intended or
-    shall be deemed to constitute any admission of liability.
-
-------------------------------------------------------------------------
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-LICENSE (CDDL)
-
-The code released under the CDDL shall be governed by the laws of the
-State of California (excluding conflict-of-law provisions). Any
-litigation relating to this License shall be subject to the jurisdiction
-of the Federal Courts of the Northern District of California and the
-state courts of the State of California, with venue lying in Santa Clara
-County, California.
-
-
-
-  The GNU General Public License (GPL) Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor
-Boston, MA 02110-1335
-USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users. This General Public
-License applies to most of the Free Software Foundation's software and
-to any other program whose authors commit to using it. (Some other Free
-Software Foundation software is covered by the GNU Library General
-Public License instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price.
-Our General Public Licenses are designed to make sure that you have the
-freedom to distribute copies of free software (and charge for this
-service if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone
-to deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis
-or for a fee, you must give the recipients all the rights that you have.
-You must make sure that they, too, receive or can get the source code.
-And you must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-Finally, any free program is threatened constantly by software patents.
-We wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program
-proprietary. To prevent this, we have made it clear that any patent must
-be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and
-modification follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License applies to any program or other work which contains a
-notice placed by the copyright holder saying it may be distributed under
-the terms of this General Public License. The "Program", below, refers
-to any such program or work, and a "work based on the Program" means
-either the Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it, either
-verbatim or with modifications and/or translated into another language.
-(Hereinafter, translation is included without limitation in the term
-"modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of running
-the Program is not restricted, and the output from the Program is
-covered only if its contents constitute a work based on the Program
-(independent of having been made by running the Program). Whether that
-is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy an appropriate copyright notice
-and disclaimer of warranty; keep intact all the notices that refer to
-this License and to the absence of any warranty; and give any other
-recipients of the Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of
-it, thus forming a work based on the Program, and copy and distribute
-such modifications or work under the terms of Section 1 above, provided
-that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any part
-    thereof, to be licensed as a whole at no charge to all third parties
-    under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a notice
-    that there is no warranty (or else, saying that you provide a
-    warranty) and that users may redistribute the program under these
-    conditions, and telling the user how to view a copy of this License.
-    (Exception: if the Program itself is interactive but does not
-    normally print such an announcement, your work based on the Program
-    is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program, and
-can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based on
-the Program, the distribution of the whole must be on the terms of this
-License, whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of a
-storage or distribution medium does not bring the other work under the
-scope of this License.
-
-3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections 1
-    and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your cost
-    of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer to
-    distribute corresponding source code. (This alternative is allowed
-    only for noncommercial distribution and only if you received the
-    program in object code or executable form with such an offer, in
-    accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source code
-means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to control
-compilation and installation of the executable. However, as a special
-exception, the source code distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies the
-executable.
-
-If distribution of executable or object code is made by offering access
-to copy from a designated place, then offering equivalent access to copy
-the source code from the same place counts as distribution of the source
-code, even though third parties are not compelled to copy the source
-along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt otherwise
-to copy, modify, sublicense or distribute the Program is void, and will
-automatically terminate your rights under this License. However, parties
-who have received copies, or rights, from you under this License will
-not have their licenses terminated so long as such parties remain in
-full compliance.
-
-5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and all
-its terms and conditions for copying, distributing or modifying the
-Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further restrictions
-on the recipients' exercise of the rights granted herein. You are not
-responsible for enforcing compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot distribute
-so as to satisfy simultaneously your obligations under this License and
-any other pertinent obligations, then as a consequence you may not
-distribute the Program at all. For example, if a patent license would
-not permit royalty-free redistribution of the Program by all those who
-receive copies directly or indirectly through you, then the only way you
-could satisfy both it and this License would be to refrain entirely from
-distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is implemented
-by public license practices. Many people have made generous
-contributions to the wide range of software distributed through that
-system in reliance on consistent application of that system; it is up to
-the author/donor to decide if he or she is willing to distribute
-software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be
-a consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License may
-add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among countries
-not thus excluded. In such case, this License incorporates the
-limitation as if written in the body of this License.
-
-9. The Free Software Foundation may publish revised and/or new
-versions of the General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Program does not specify a version
-number of this License, you may choose any version ever published by the
-Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the
-author to ask for permission. For software which is copyrighted by the
-Free Software Foundation, write to the Free Software Foundation; we
-sometimes make exceptions for this. Our decision will be guided by the
-two goals of preserving the free status of all derivatives of our free
-software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
-EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
-YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
-DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
-DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
-(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
-INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
-THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
-OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is safest to
-attach them to the start of each source file to most effectively convey
-the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    One line to give the program's name and a brief idea of what it does.
-    Copyright (C) <year> <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
-    `show w'. This is free software, and you are welcome to redistribute
-    it under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the
-appropriate parts of the General Public License. Of course, the commands
-you use may be called something other than `show w' and `show c'; they
-could even be mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
-    Yoyodyne, Inc., hereby disclaims all copyright interest in the
-    program `Gnomovision' (which makes passes at compilers) written by
-    James Hacker.
-
-    signature of Ty Coon, 1 April 1989
-    Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications
-with the library. If this is what you want to do, use the GNU Library
-General Public License instead of this License.
-
-#
-
-Certain source files distributed by Oracle America, Inc. and/or its
-affiliates are subject to the following clarification and special
-exception to the GPLv2, based on the GNU Project exception for its
-Classpath libraries, known as the GNU Classpath Exception, but only
-where Oracle has expressly included in the particular source file's
-header the words "Oracle designates this particular file as subject to
-the "Classpath" exception as provided by Oracle in the LICENSE file
-that accompanied this code."
-
-You should also note that Oracle includes multiple, independent
-programs in this software package. Some of those programs are provided
-under licenses deemed incompatible with the GPLv2 by the Free Software
-Foundation and others.  For example, the package includes programs
-licensed under the Apache License, Version 2.0.  Such programs are
-licensed to you under their original licenses.
-
-Oracle facilitates your further distribution of this package by adding
-the Classpath Exception to the necessary parts of its GPLv2 code, which
-permits you to use that code in combination with other independent
-modules not licensed under the GPLv2.  However, note that this would
-not permit you to commingle code under an incompatible license with
-Oracle's GPLv2 licensed code by, for example, cutting and pasting such
-code into a file also containing Oracle's GPLv2 licensed code and then
-distributing the result.  Additionally, if you were to remove the
-Classpath Exception from any of the files to which it applies and
-distribute the result, you would likely be required to license some or
-all of the other code in that distribution under the GPLv2 as well, and
-since the GPLv2 is incompatible with the license terms of some items
-included in the distribution by Oracle, removing the Classpath
-Exception could therefore effectively compromise your ability to
-further distribute the package.
-
-Proceed with caution and we recommend that you obtain the advice of a
-lawyer skilled in open source matters before removing the Classpath
-Exception or making modifications to this package which may
-subsequently be redistributed and/or involve the use of third party
-software.
-
-CLASSPATH EXCEPTION
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License version 2 cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from or
-based on this library.  If you modify this library, you may extend this
-exception to your version of the library, but you are not obligated to
-do so.  If you do not wish to do so, delete this exception statement
-from your version.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.jul-to-slf4j b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.jul-to-slf4j
deleted file mode 100644
index 744377c..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.jul-to-slf4j
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2004-2017 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-classic b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-classic
deleted file mode 100644
index 44f8eb8..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-classic
+++ /dev/null
@@ -1,24 +0,0 @@
-Logback License
-As of release 0.9.18, logback source code and binaries are dual-licensed under the EPL v1.0 and the LGPL 2.1, or more formally:
-
-Logback: the reliable, generic, fast and flexible logging framework.
-Copyright (C) 1999-2017, QOS.ch. All rights reserved.
-
-This program and the accompanying materials are dual-licensed under
-either the terms of the Eclipse Public License v1.0 as published by
-the Eclipse Foundation
-
-  or (per the licensee's choosing)
-
-under the terms of the GNU Lesser General Public License version 2.1
-as published by the Free Software Foundation.
-
-The EPL/LGPL dual-license serves several purposes. The LGPL license ensures continuity in terms of licensing of the logback project. Prior to version 0.9.18, logback was licensed (exclusively) under the LGPL v2.1. Moreover, since the EPL is deemed incompatible by the Free Software Foundation, the LGPL will allow various licensees, in particular software distributors who may be already bound by the terms of the GPL or the LGPL, to distribute our software.
-
-On the other hand, the EPL license will placate organizations which refuse certain restrictions imposed by the LGPL.
-
-Please note that logback-classic is intended to be used behind the SLF4J API, which is licensed under the MIT license.
-
-If you wish to make a significant contribution to the logback project, you are invited to file a Contributor License Agreement. The purpose of this agreement is to formalize the terms of your contribution and to protect the project in case of litigation.
-
-Upon request, we may exempt open-source projects from LGPL and EPL's reciprocity clauses so that the said projects can develop logback extensions under the license of their choice. Exemptions are granted on a case by case basis.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-core b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-core
deleted file mode 100644
index 44f8eb8..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.logback-core
+++ /dev/null
@@ -1,24 +0,0 @@
-Logback License
-As of release 0.9.18, logback source code and binaries are dual-licensed under the EPL v1.0 and the LGPL 2.1, or more formally:
-
-Logback: the reliable, generic, fast and flexible logging framework.
-Copyright (C) 1999-2017, QOS.ch. All rights reserved.
-
-This program and the accompanying materials are dual-licensed under
-either the terms of the Eclipse Public License v1.0 as published by
-the Eclipse Foundation
-
-  or (per the licensee's choosing)
-
-under the terms of the GNU Lesser General Public License version 2.1
-as published by the Free Software Foundation.
-
-The EPL/LGPL dual-license serves several purposes. The LGPL license ensures continuity in terms of licensing of the logback project. Prior to version 0.9.18, logback was licensed (exclusively) under the LGPL v2.1. Moreover, since the EPL is deemed incompatible by the Free Software Foundation, the LGPL will allow various licensees, in particular software distributors who may be already bound by the terms of the GPL or the LGPL, to distribute our software.
-
-On the other hand, the EPL license will placate organizations which refuse certain restrictions imposed by the LGPL.
-
-Please note that logback-classic is intended to be used behind the SLF4J API, which is licensed under the MIT license.
-
-If you wish to make a significant contribution to the logback project, you are invited to file a Contributor License Agreement. The purpose of this agreement is to formalize the terms of your contribution and to protect the project in case of litigation.
-
-Upon request, we may exempt open-source projects from LGPL and EPL's reciprocity clauses so that the said projects can develop logback extensions under the license of their choice. Exemptions are granted on a case by case basis.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.protobuf-java b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.protobuf-java
deleted file mode 100644
index 97a6e3d..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.protobuf-java
+++ /dev/null
@@ -1,32 +0,0 @@
-Copyright 2008 Google Inc.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-    * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Code generated by the Protocol Buffer compiler is owned by the owner
-of the input file used when generating it.  This code is not
-standalone and requires a support library to be linked with it.  This
-support library is itself covered by the above license.
\ No newline at end of file
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.slf4j-api b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.slf4j-api
deleted file mode 100644
index 744377c..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.slf4j-api
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2004-2017 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.sockjs-client b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.sockjs-client
deleted file mode 100644
index fe0c249..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-simulator/src/main/resources/META-INF/licenses/LICENSE.sockjs-client
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2011-2018 The sockjs-client Authors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/pom.xml b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/pom.xml
deleted file mode 100644
index a41fcae..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-ridesharing-example</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-ridesharing-protocol</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>3.8.0</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>com.github.os72</groupId>
-                <artifactId>protoc-jar-maven-plugin</artifactId>
-                <version>${protoc-jar-maven-plugin.version}</version>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/src/main/protobuf/ridesharing.proto b/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/src/main/protobuf/ridesharing.proto
deleted file mode 100644
index 1a133c5..0000000
--- a/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-protocol/src/main/protobuf/ridesharing.proto
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-
-package org.apache.flink.statefun.examples.ridesharing;
-
-option java_package = "org.apache.flink.statefun.examples.ridesharing.generated";
-option java_multiple_files = true;
-
-option go_package = "main";
-
-// -----------------------------------------------------------------------------------------
-// External messages
-// -----------------------------------------------------------------------------------------
-
-// the messages that corresponds to the FROM_PASSENGER_INGRESS
-message InboundPassengerMessage {
-
-    // A message sent by the physical driver to the ridesharing statefun job, indicating that the user
-    // would like to be picked up from start_geo_cell and dropped off at end_geo_cell
-    message RequestRide {
-        int32 start_geo_cell = 2;
-        int32 end_geo_cell = 3;
-    }
-
-    string passenger_id = 1;
-    
-    oneof message {
-        RequestRide request_ride = 2;
-    }
-}
-
-// the messages that corresponds to the TO_PASSENGER_EGRESS
-message OutboundPassengerMessage {
-    
-    // A message that is sent to the passenger, when there is a driver that 
-    // is ready to pick them up.
-    message DriverHasBeenFound {
-        string driver_id = 2;
-        int32 driver_geo_cell = 3;
-    }
-    // A message that is sent to the passenger when the system couldn't find in reasonable time
-    // a driver to pickup the passenger.
-    message RideFailed {
-        string ride_id = 2;
-    }
-    // A notification that is sent to the passenger indicating that the ride has started.
-    message RideStarted {
-        string driver_id = 2;
-    }
-    // A notification that is sent to the passenger indicating that the ride has end.
-    message RideEnded {
-    }
-
-    string passenger_id = 1;
-
-    oneof message {
-        DriverHasBeenFound driver_found = 2;
-        RideFailed ride_failed = 3;
-        RideStarted ride_started = 4;
-        RideEnded ride_ended = 5;
-    }
-}
-
-// the messages that corresponds to the FROM_DRIVER_INGRESS
-message InboundDriverMessage {
-
-    // A message the driver sends once they pickup the passenger
-    message RideStarted {
-    }
-
-    // A message the driver sends when they drop off the passenger.
-    message RideEnded {
-        string ride_id = 2;
-    }
-
-    // A periodic location update message
-    message LocationUpdate {
-        int32 current_geo_cell = 2;
-    }
-
-    string driver_id = 1;
-    
-    oneof message {
-        RideStarted ride_started = 2;
-        RideEnded ride_ended = 3;
-        LocationUpdate location_update = 4;
-    }
-}
-
-// the messages that corresponds to the TO_DRIVER_EGRESS
-message OutboundDriverMessage {
-
-    // A message that is sent to the physical driver to indicate that
-    // a pickup is needed.
-    // a pickup is needed.
-    message PickupPassenger {
-        string ride_id = 2;
-        int32 start_geo_location = 3;
-        int32 end_geo_location = 4;
-    }
-
-    string driver_id = 1;
-
-    oneof message {
-        PickupPassenger pickup_passenger = 2;
-    }
-}
-
-// -----------------------------------------------------------------------------------------
-// Internal messages
-// -----------------------------------------------------------------------------------------
-
-message DriverJoinsRide {
-    string driver_id = 1;
-    string passenger_id = 2;
-    int32 driver_location = 3;
-}
-
-message PassengerJoinsRide {
-    string passenger_id = 1;
-    int32 start_geo_cell = 2;
-    int32 end_geo_cell = 3;
-}
-
-message RideStarted {
-    string driver_id = 1;
-    int32 driver_geo_cell = 2;
-}
-
-message RideFailed {
-    string ride_id = 1;
-}
-
-message RideEnded {
-}
-
-message JoinCell {
-}
-
-message LeaveCell {
-}
-
-message GetDriver {
-}
-
-message DriverInCell {
-    string driver_id = 1;
-}
-
-message PickupPassenger {
-    string driver_id = 1;
-    string passenger_id = 2;
-    int32 passenger_start_cell = 3;
-    int32 passenger_end_cell = 4;
-}
-
-message DriverRejectsPickup {
-    string driver_id = 1;
-    string ride_id = 2;
-}
-
-// -----------------------------------------------------------------------------------------
-// Internal States
-// -----------------------------------------------------------------------------------------
-
-message GeoCellState {
-    repeated string driver_id = 1;
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/Dockerfile b/statefun-examples/statefun-shopping-cart-example/Dockerfile
deleted file mode 100644
index 43cef61..0000000
--- a/statefun-examples/statefun-shopping-cart-example/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM flink-statefun:3.0-SNAPSHOT
-
-RUN mkdir -p /opt/statefun/modules/statefun-shopping-cart-example
-COPY target/statefun-shopping-cart-example*jar /opt/statefun/modules/statefun-shopping-cart-example/
diff --git a/statefun-examples/statefun-shopping-cart-example/pom.xml b/statefun-examples/statefun-shopping-cart-example/pom.xml
deleted file mode 100644
index 72b3deb..0000000
--- a/statefun-examples/statefun-shopping-cart-example/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-shopping-cart-example</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-sdk</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-kafka-io</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>3.8.0</version>
-        </dependency>
-
-        <!-- test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>com.github.os72</groupId>
-                <artifactId>protoc-jar-maven-plugin</artifactId>
-                <version>${protoc-jar-maven-plugin.version}</version>
-            </plugin>
-        </plugins>
-    </build>
-    
-</project>
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Identifiers.java b/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Identifiers.java
deleted file mode 100644
index 0f392c3..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Identifiers.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.shoppingcart;
-
-import org.apache.flink.statefun.examples.shoppingcart.generated.ProtobufMessages;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.io.EgressIdentifier;
-import org.apache.flink.statefun.sdk.io.IngressIdentifier;
-
-final class Identifiers {
-
-  private Identifiers() {}
-
-  static final FunctionType USER = new FunctionType("shopping-cart", "user");
-
-  static final FunctionType INVENTORY = new FunctionType("shopping-cart", "inventory");
-
-  static final IngressIdentifier<ProtobufMessages.RestockItem> RESTOCK =
-      new IngressIdentifier<>(ProtobufMessages.RestockItem.class, "shopping-cart", "restock-item");
-
-  static final EgressIdentifier<ProtobufMessages.Receipt> RECEIPT =
-      new EgressIdentifier<>("shopping-cart", "receipt", ProtobufMessages.Receipt.class);
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Inventory.java b/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Inventory.java
deleted file mode 100644
index e0ce250..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/Inventory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.shoppingcart;
-
-import org.apache.flink.statefun.examples.shoppingcart.generated.ProtobufMessages;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-final class Inventory implements StatefulFunction {
-
-  @Persisted
-  private final PersistedValue<Integer> inventory = PersistedValue.of("inventory", Integer.class);
-
-  @Override
-  public void invoke(Context context, Object message) {
-    if (message instanceof ProtobufMessages.RestockItem) {
-      int quantity =
-          inventory.getOrDefault(0) + ((ProtobufMessages.RestockItem) message).getQuantity();
-      inventory.set(quantity);
-    } else if (message instanceof ProtobufMessages.RequestItem) {
-      int quantity = inventory.getOrDefault(0);
-      int requestedAmount = ((ProtobufMessages.RequestItem) message).getQuantity();
-
-      ProtobufMessages.ItemAvailability.Builder availability =
-          ProtobufMessages.ItemAvailability.newBuilder().setQuantity(requestedAmount);
-
-      if (quantity >= requestedAmount) {
-        inventory.set(quantity - requestedAmount);
-        availability.setStatus(ProtobufMessages.ItemAvailability.Status.INSTOCK);
-      } else {
-        availability.setStatus(ProtobufMessages.ItemAvailability.Status.OUTOFSTOCK);
-      }
-
-      context.send(context.caller(), availability.build());
-    }
-  }
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/RestockRouter.java b/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/RestockRouter.java
deleted file mode 100644
index 6be01ef..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/RestockRouter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.shoppingcart;
-
-import org.apache.flink.statefun.examples.shoppingcart.generated.ProtobufMessages;
-import org.apache.flink.statefun.sdk.io.Router;
-
-final class RestockRouter implements Router<ProtobufMessages.RestockItem> {
-  @Override
-  public void route(
-      ProtobufMessages.RestockItem message, Downstream<ProtobufMessages.RestockItem> downstream) {
-    downstream.forward(Identifiers.INVENTORY, message.getItemId(), message);
-  }
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/ShoppingCartModule.java b/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/ShoppingCartModule.java
deleted file mode 100644
index 4658dc0..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/ShoppingCartModule.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.shoppingcart;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import org.apache.flink.statefun.examples.shoppingcart.generated.ProtobufMessages;
-import org.apache.flink.statefun.sdk.io.EgressSpec;
-import org.apache.flink.statefun.sdk.io.IngressSpec;
-import org.apache.flink.statefun.sdk.kafka.KafkaEgressBuilder;
-import org.apache.flink.statefun.sdk.kafka.KafkaIngressBuilder;
-import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
-
-@AutoService(StatefulFunctionModule.class)
-public class ShoppingCartModule implements StatefulFunctionModule {
-  @Override
-  public void configure(Map<String, String> globalConfiguration, Binder binder) {
-    // bind functions
-    binder.bindFunctionProvider(Identifiers.USER, unused -> new UserShoppingCart());
-    binder.bindFunctionProvider(Identifiers.INVENTORY, unused -> new Inventory());
-
-    // For ingress and egress pretend I filled in the details :)
-
-    IngressSpec<ProtobufMessages.RestockItem> restockSpec =
-        KafkaIngressBuilder.forIdentifier(Identifiers.RESTOCK).build();
-
-    binder.bindIngress(restockSpec);
-
-    binder.bindIngressRouter(Identifiers.RESTOCK, new RestockRouter());
-
-    EgressSpec<ProtobufMessages.Receipt> receiptSpec =
-        KafkaEgressBuilder.forIdentifier(Identifiers.RECEIPT).build();
-
-    binder.bindEgress(receiptSpec);
-  }
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/UserShoppingCart.java b/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/UserShoppingCart.java
deleted file mode 100644
index 73a0222..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/java/org/apache/flink/statefun/examples/shoppingcart/UserShoppingCart.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.examples.shoppingcart;
-
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.util.stream.StreamSupport;
-import org.apache.flink.statefun.examples.shoppingcart.generated.ProtobufMessages;
-import org.apache.flink.statefun.sdk.Address;
-import org.apache.flink.statefun.sdk.Context;
-import org.apache.flink.statefun.sdk.StatefulFunction;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.state.PersistedTable;
-
-final class UserShoppingCart implements StatefulFunction {
-
-  @Persisted
-  private final PersistedTable<String, Integer> userBasket =
-      PersistedTable.of("basket", String.class, Integer.class);
-
-  @Override
-  public void invoke(Context context, Object input) {
-    if (input instanceof ProtobufMessages.AddToCart) {
-      ProtobufMessages.AddToCart addToCart = (ProtobufMessages.AddToCart) input;
-      ProtobufMessages.RequestItem request =
-          ProtobufMessages.RequestItem.newBuilder().setQuantity(addToCart.getQuantity()).build();
-      Address address = new Address(Identifiers.INVENTORY, addToCart.getItemId());
-      context.send(address, request);
-    }
-
-    if (input instanceof ProtobufMessages.ItemAvailability) {
-      ProtobufMessages.ItemAvailability availability = (ProtobufMessages.ItemAvailability) input;
-
-      if (availability.getStatus() == ProtobufMessages.ItemAvailability.Status.INSTOCK) {
-        userBasket.set(context.caller().id(), availability.getQuantity());
-      }
-    }
-
-    if (input instanceof ProtobufMessages.ClearCart) {
-      for (Map.Entry<String, Integer> entry : userBasket.entries()) {
-        ProtobufMessages.RestockItem item =
-            ProtobufMessages.RestockItem.newBuilder()
-                .setItemId(entry.getKey())
-                .setQuantity(entry.getValue())
-                .build();
-
-        Address address = new Address(Identifiers.INVENTORY, entry.getKey());
-        context.send(address, item);
-      }
-
-      userBasket.clear();
-    }
-
-    if (input instanceof ProtobufMessages.Checkout) {
-
-      String items =
-          StreamSupport.stream(userBasket.entries().spliterator(), false)
-              .map(entry -> entry.getKey() + ": " + entry.getValue())
-              .collect(Collectors.joining("\n"));
-
-      ProtobufMessages.Receipt receipt =
-          ProtobufMessages.Receipt.newBuilder()
-              .setUserId(context.self().id())
-              .setDetails(items)
-              .build();
-
-      context.send(Identifiers.RECEIPT, receipt);
-      userBasket.clear();
-    }
-  }
-}
diff --git a/statefun-examples/statefun-shopping-cart-example/src/main/protobuf/shoppingcart.proto b/statefun-examples/statefun-shopping-cart-example/src/main/protobuf/shoppingcart.proto
deleted file mode 100644
index 087119d..0000000
--- a/statefun-examples/statefun-shopping-cart-example/src/main/protobuf/shoppingcart.proto
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-syntax = "proto3";
-
-package org.apache.flink.statefun.examples.shoppingcart;
-
-option java_package = "org.apache.flink.statefun.examples.shoppingcart.generated";
-option java_outer_classname = "ProtobufMessages";
-option java_multiple_files = false;
-
-// ---------------------------------------------------------------------
-// External messages
-// ---------------------------------------------------------------------
-
-message AddToCart {
-    string user_id = 1;
-    string item_id = 2;
-    int32 quantity = 3;
-}
-
-message ClearCart {
-    string user_id = 1;
-}
-
-message Checkout {
-    string user_id = 1;
-}
-
-message Receipt {
-    string user_id = 1;
-    string details = 2;
-}
-
-message RestockItem {
-    string item_id = 1;
-    int32 quantity = 2;
-}
-
-// ---------------------------------------------------------------------
-// Internal messages
-// ---------------------------------------------------------------------
-
-message RequestItem {
-    int32 quantity = 1;
-}
-
-message ItemAvailability {
-    enum Status {
-        INSTOCK = 0;
-        OUTOFSTOCK = 1;
-    }
-
-    Status status = 1;
-    int32 quantity = 2;
-}
diff --git a/statefun-examples/statefun-state-processor-example/pom.xml b/statefun-examples/statefun-state-processor-example/pom.xml
deleted file mode 100644
index dbb562a..0000000
--- a/statefun-examples/statefun-state-processor-example/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-  http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>statefun-examples</artifactId>
-        <groupId>org.apache.flink</groupId>
-        <version>3.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>statefun-state-processor-example</artifactId>
-
-    <properties>
-        <scala.binary.version>2.12</scala.binary.version>
-    </properties>
-
-    <dependencies>
-        <!-- Stateful Functions dependencies -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>statefun-flink-state-processor</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <!-- Apache Flink dependencies -->
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-state-processor-api_${scala.binary.version}</artifactId>
-            <version>${flink.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-java</artifactId>
-            <version>${flink.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-statebackend-rocksdb_${scala.binary.version}</artifactId>
-            <version>${flink.version}</version>
-        </dependency>
-    </dependencies>
-
-</project>
diff --git a/statefun-examples/statefun-state-processor-example/src/main/java/org/apache/flink/statefun/flink/state/processor/example/GreetStatefulFunctionBootstrapExample.java b/statefun-examples/statefun-state-processor-example/src/main/java/org/apache/flink/statefun/flink/state/processor/example/GreetStatefulFunctionBootstrapExample.java
deleted file mode 100644
index dabd236..0000000
--- a/statefun-examples/statefun-state-processor-example/src/main/java/org/apache/flink/statefun/flink/state/processor/example/GreetStatefulFunctionBootstrapExample.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.flink.statefun.flink.state.processor.example;
-
-import java.util.Arrays;
-import org.apache.flink.api.java.DataSet;
-import org.apache.flink.api.java.ExecutionEnvironment;
-import org.apache.flink.api.java.tuple.Tuple2;
-import org.apache.flink.api.java.utils.ParameterTool;
-import org.apache.flink.statefun.flink.state.processor.Context;
-import org.apache.flink.statefun.flink.state.processor.StateBootstrapFunction;
-import org.apache.flink.statefun.flink.state.processor.StatefulFunctionsSavepointCreator;
-import org.apache.flink.statefun.sdk.Address;
-import org.apache.flink.statefun.sdk.FunctionType;
-import org.apache.flink.statefun.sdk.annotations.Persisted;
-import org.apache.flink.statefun.sdk.io.Router;
-import org.apache.flink.statefun.sdk.state.PersistedValue;
-
-/**
- * An example that demonstrates how to generate a savepoint to bootstrap function state for the
- * Greeter example. The savepoint generated with example may be used to restore the Greeter Stateful
- * Functions example.
- *
- * <p>Usage: --savepointPath [output path for generated savepoint]
- *
- * @see StatefulFunctionsSavepointCreator
- * @see StateBootstrapFunction
- */
-public class GreetStatefulFunctionBootstrapExample {
-
-  private static final FunctionType GREETER_FUNCTION_TYPE = new FunctionType("apache", "greeter");
-
-  public static void main(String[] args) throws Exception {
-    final ParameterTool params = ParameterTool.fromArgs(args);
-    final String savepointPath = params.getRequired("savepointPath");
-
-    final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
-
-    final DataSet<Tuple2<String, Integer>> userSeenCounts =
-        env.fromCollection(
-            Arrays.asList(Tuple2.of("foo", 4), Tuple2.of("bar", 3), Tuple2.of("joe", 2)));
-
-    final StatefulFunctionsSavepointCreator newSavepoint =
-        new StatefulFunctionsSavepointCreator(128);
-    newSavepoint.withBootstrapData(userSeenCounts, GreetingsStateBootstrapDataRouter::new);
-    newSavepoint.withStateBootstrapFunctionProvider(
-        GREETER_FUNCTION_TYPE, ignored -> new GreetingsStateBootstrapFunction());
-    newSavepoint.write(savepointPath);
-
-    env.execute();
-  }
-
-  public static class GreetingsStateBootstrapDataRouter implements Router<Tuple2<String, Integer>> {
-    @Override
-    public void route(
-        Tuple2<String, Integer> message, Downstream<Tuple2<String, Integer>> downstream) {
-      downstream.forward(new Address(GREETER_FUNCTION_TYPE, message.f0), message);
-    }
-  }
-
-  public static class GreetingsStateBootstrapFunction implements StateBootstrapFunction {
-
-    @Persisted
-    private final PersistedValue<Integer> seenCount =
-        PersistedValue.of("seen-count", Integer.class);
-
-    @Override
-    public void bootstrap(Context context, Object bootstrapData) {
-      seenCount.set(getSeenCount(bootstrapData));
-    }
-
-    @SuppressWarnings("unchecked")
-    private static int getSeenCount(Object bootstrapData) {
-      return ((Tuple2<String, Integer>) bootstrapData).f1;
-    }
-  }
-}