syntaxsugar

Wordflow: Learn Temporal by Building a Word Game

A hands-on Temporal course: build the backend of a timed word game one concept at a time, from your first Workflow through Signals, Updates, Timers, Entity Workflows, Continue-As-New, and versioning.

You’ll build the backend of Wordflow, a timed word game, one Temporal concept at a time. The web app and HTTP routing are already written. You write the Workflows, Activities, and Worker, plus the API code that uses the Temporal Client to start, signal, query, and update Workflows.

Each lesson adds one feature to the game and teaches the concept behind it. By the end you’ll have used the Temporal design patterns that come up most in real systems.

You need: a GitHub account, and to be comfortable in the language you choose. No Temporal experience needed.

Start

  1. Pick a language. Each one lives on its own branch:

    LanguageBranch
    Gogo
    Pythonpython (coming soon)
  2. Switch to that branch on GitHub, then choose Code → Codespaces → Create codespace on <branch>. Setup takes a few minutes.

  3. The course opens in a browser tab once the Codespace is ready. If it doesn’t, open the Ports tab and open Course (port 8000). Each lesson page shows the concepts, the build steps for your language, and a checklist that remembers your progress.

You can also read the lessons here on GitHub, starting with course/00-setup.

The main branch only has the shared material (lesson text, web app, puzzles), so it won’t run on its own.

How each lesson works

  • README.md explains the concept and what you’ll build. It is the same for every language.
  • build.md walks you through the code in your language.
  • Check it tells you what you should see in the game and in the Temporal UI. If you see it, move on.
  • You write all your code in app/. Each lesson’s finished code is in solutions/NN/. Run a solution with make worker S=NN and make server S=NN to compare.

Lessons

#LessonWhat you addConcepts and patterns
00SetupNothing yetTemporal Service, Temporal UI, the project
01Your first WorkflowStart a gameWorkflow, Worker, Task Queue, Client, Workflow ID
02ActivitiesLoad puzzles from storageActivity, retries, timeouts, determinism, non-retryable errors
03Signals and QueriesGuess words, see the boardLong-running Workflow, Signal, Query
04UpdatesInstant guess resultsUpdate, validator, Update-with-Start, Request-Response via Updates, Early Return
05Durable TimersA game clock you can extendTimer, cancellation, Updatable Timer
06Entity WorkflowsPlayers with pointsEntity Workflow, ID conflict policy
07Child WorkflowsPlayers start their own gamesChild Workflow, parent close policy
08Workflow to WorkflowHints that cost pointsActivity Dependency Injection, idempotent Updates, Workflow mutex
09Signal-with-StartA global leaderboardSignal-with-Start, singleton Workflow
10Continue-As-NewPlayers who play foreverEvent History limits, Continue-As-New
11Retries in depthBonus words from a flaky dictionaryRetry policies, Fixed Count, Fixed Wall-Time, Delayed Retry, Non-Retryable Errors
12Determinism and replayAn activity feed, and a broken deployReplay, nondeterminism errors, replay testing
13VersioningShip the change safelyPatching with GetVersion, Worker Versioning

Optional exercises, after Lesson 13:

ExerciseWhat you addPattern
SagaGift points to a friendSaga, compensation
Pick FirstRace two dictionary regionsPick First, cancellation
ApprovalPlayers submit puzzles for reviewParallel Execution, Approval
SchedulesPuzzle of the daySchedules, Delayed Start

Reference