alpinegizmo commented on a change in pull request #31:
URL: https://github.com/apache/flink-training/pull/31#discussion_r695131178



##########
File path: long-ride-alerts/README.md
##########
@@ -62,41 +61,29 @@ The resulting stream should be printed to standard out.
 <details>
 <summary><strong>Overall approach</strong></summary>
 
-This exercise revolves around using a `ProcessFunction` to manage some keyed 
state and event time timers,
-and doing so in a way that works even when the END event for a given `rideId` 
arrives before the START (which can happen).
-The challenge is figuring out what state to keep, and when to set and clear 
that state.
-You will want to use event time timers that fire two hours after an incoming 
START event, and in the `onTimer()` method,
-collect START events to the output only if a matching END event hasn't yet 
arrived.
-</details>
-
-<details>
-<summary><strong>State and timers</strong></summary>
-
-There are many possible solutions for this exercise, but in general it is 
enough to keep one
-`TaxiRide` in state (one `TaxiRide` for each key, or `rideId`). The approach 
used in the reference solution is to
-store whichever event arrives first (the START or the END), and if it's a 
START event,
-create a timer for two hours later. If and when the other event (for the same 
`rideId`) arrives,
-carefully clean things up.
-
-It is possible to arrange this so that if `onTimer()` is called, you are 
guaranteed that
-an alert (i.e., the ride kept in state) should be emitted. Writing the code 
this way conveniently
-puts all of the complex business logic together in one place (in the 
`processElement()` method).
+This exercise revolves around using a `KeyedProcessFunction` to manage some 
state and event time timers,
+and doing so in a way that works even when the END event for a given `rideId` 
arrives before the START.
+The challenge is figuring out what state and timers to use, and when to set 
and clear the state (and timers).
+It is not enough to simply wait for the END event and calculate the duration, 
as the END event
+may be missing.
 </details>
 
 ## Documentation
 
 - 
[ProcessFunction](https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/process_function.html)
 - [Working with 
State](https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/state/index.html)
 
+## After you've completed the exercise
+
+Read the [discussion of the reference solutions](DISCUSSION.md).
+
 ## Reference Solutions
 
-Reference solutions are available at GitHub:
+Reference solutions:
 
 - Java API:  
[`org.apache.flink.training.solutions.longrides.LongRidesSolution`](src/solution/java/org/apache/flink/training/solutions/longrides/LongRidesSolution.java)
 - Scala API: 
[`org.apache.flink.training.solutions.longrides.scala.LongRidesSolution`](src/solution/scala/org/apache/flink/training/solutions/longrides/scala/LongRidesSolution.scala)
 
 -----
 
-[**Lab Discussion: `ProcessFunction` and Timers (Long Ride 
Alerts)**](DISCUSSION.md)
-

Review comment:
       It's not gone, it's just a bit higher up in the page.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to