diff --git a/CONTEXT.md b/CONTEXT.md index 2d20b1b..01a8ac3 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -77,6 +77,13 @@ Core TODOs are required to finish; Stretch TODOs are optional extras for learner who finish early, and nothing later depends on them. _Avoid_: starter, skeleton, template +**Stretch Workshop**: +A Workshop whose Track is offered, in every Dev Day, only to learners who +finish early. Everyone still sees its Deck segment; nothing later in a Dev Day +depends on its Track. It describes live delivery only: on its own, the +Workshop and its Track are like any other. +_Avoid_: bonus lab, optional workshop, extra + **Solution**: The completed counterpart of an Exercise, structurally identical to it. _Avoid_: answer, final, complete diff --git a/decks/java-master/components/ContinueAsNewRuns.vue b/decks/java-master/components/ContinueAsNewRuns.vue new file mode 100644 index 0000000..e3fa2a2 --- /dev/null +++ b/decks/java-master/components/ContinueAsNewRuns.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/decks/java-master/segments/14-child-workflows.md b/decks/java-master/segments/14-child-workflows.md index 93525c4..7408c37 100644 --- a/decks/java-master/segments/14-child-workflows.md +++ b/decks/java-master/segments/14-child-workflows.md @@ -117,8 +117,8 @@ closes, and only the child's lane changes. one people misunderstand: the child keeps running even though the parent is gone. That is intentional, and powerful for fire-and-forget sub-processes. - **Click 3 - `REQUEST_CANCEL`.** The child is sent a cancellation request and - can clean up gracefully, the same cancellation the Saga section uses to run - compensations, before it ends as cancelled. + can clean up gracefully before it ends as cancelled: the cancellation the + Saga section pointed to, where compensations still run in a detached scope. The policy applies whenever the parent closes, whether it completed, failed, timed out or was terminated. Not only on failure. In code these are diff --git a/decks/java-master/segments/15-continue-as-new.md b/decks/java-master/segments/15-continue-as-new.md index 2842a06..fe137c2 100644 --- a/decks/java-master/segments/15-continue-as-new.md +++ b/decks/java-master/segments/15-continue-as-new.md @@ -61,6 +61,31 @@ from the Workflow ID alone follows the chain: `WorkflowStub.getResult(...)` waits for the last run. --> +--- +layout: default +clicks: 2 +--- + +# One Workflow, many runs + + + + + --- layout: default --- @@ -89,6 +114,53 @@ Worker Versioning, a Pinned run's continuation inherits its version unless you ask for `AUTO_UPGRADE`.) --> +--- +layout: center +class: text-center +--- + +

Why doesn't Temporal default to Continue‑As‑New?

+ +

Only your code knows what state to carry forward.

+ +
+ +History is the state · It needs cleanup first · Most Workflows never need it + +
+ + + --- layout: code-walkthrough heading: "Continue-As-New in practice: a monthly subscription" diff --git a/decks/java-master/slides.md b/decks/java-master/slides.md index 1557fbd..f2304e4 100644 --- a/decks/java-master/slides.md +++ b/decks/java-master/slides.md @@ -52,14 +52,14 @@ themeConfig: label: Updates - id: quiz label: Quiz + - id: saga + label: "Compensations: the Saga pattern" - id: child label: Child Workflows - id: can label: Continue-As-New - id: heartbeats label: Heartbeats - - id: saga - label: "Compensations: the Saga pattern" - id: patterns label: Patterns and anti-patterns - id: claim-check @@ -198,7 +198,7 @@ layout: section # Advanced Temporal Topics -Child Workflows, Continue‑As‑New, Heartbeats, Sagas, and beyond. +Sagas, Child Workflows, Continue‑As‑New, Heartbeats, and beyond. @@ -214,52 +214,6 @@ post); there is no official wizard version, so check with brand before using it outside a workshop. --> ---- -src: ./segments/14-child-workflows.md ---- - ---- -src: ./segments/15-continue-as-new.md ---- - ---- -src: ./segments/16-heartbeating.md ---- - ---- -layout: exercise -minutes: 35 -heading: Labs ---- - - - -- Child Workflows · 15 min -- Continue-As-New · 10 min -- Heartbeats · 10 min - - - --- layout: section --- @@ -309,20 +263,77 @@ src: ./segments/17-saga-07-related.md --- layout: exercise -minutes: 25 +minutes: 30 heading: "Lab: The Saga Pattern" --- +Finished early? **Heartbeats** · 10 min + +--- +src: ./segments/14-child-workflows.md +--- + +--- +src: ./segments/15-continue-as-new.md +--- + +--- +src: ./segments/16-heartbeating.md +--- + +--- +layout: exercise +minutes: 25 +heading: Labs +--- + + + +- Child Workflows · 15 min +- Continue-As-New · 10 min + +Finished early? **Heartbeats** · 10 min + + + --- src: ./segments/17b-patterns-and-anti-patterns.md --- diff --git a/docs/adr/0005-heartbeats-is-a-stretch-workshop-and-saga-gets-its-time.md b/docs/adr/0005-heartbeats-is-a-stretch-workshop-and-saga-gets-its-time.md new file mode 100644 index 0000000..efe0244 --- /dev/null +++ b/docs/adr/0005-heartbeats-is-a-stretch-workshop-and-saga-gets-its-time.md @@ -0,0 +1,37 @@ +# Heartbeats is a Stretch Workshop, and the Saga lab gets its time + +Learners rate the Saga Workshop the most useful lab of a Dev Day, so every +Deck gives it more room and an earlier slot. The Saga section and its lab run +straight after the Quiz, ahead of Child Workflows, Continue-As-New and +Heartbeats, and the lab gets 30 minutes instead of 25. + +The time comes from Heartbeats, which becomes a Stretch Workshop in every Deck: +its slides are still taught to everyone, but its Track is offered only to +learners who finish early, on both the Saga lab slide and the Labs slide. +Child Workflows (15 minutes) and Continue-As-New (10 minutes) stay core, so the +Labs block drops from 35 to 25 minutes and the day comes out 5 minutes shorter, +kept as buffer. + +Stretch describes live delivery only. The Heartbeats Workshop, its Track and +its README row are unchanged; someone taking the Track on their own sees an +ordinary Workshop. + +## Considered Options + +- **Child Workflows as the Stretch Workshop** was rejected: it is the only one + of the three at the Foundations Level, and it teaches composition every later + pattern uses. +- **Continue-As-New as the Stretch Workshop** was considered; learner feedback + pointed at Heartbeats instead. +- **A STRETCH Challenge inside the Saga Track** was considered for early + finishers and not added: the Saga's four Challenges fill the 30 minutes. +- **Marking Heartbeats as Stretch in the README index** was rejected: Stretch is + about how a Dev Day is run, not about the Workshop. + +## Consequences + +The Saga section now comes before Child Workflows, so the Child Workflows +segment's mention of the Saga section points back to something already taught. + +The Python and TypeScript DevDays repos keep their own order until the same +change is made there.