Course lesson 35 · Managing Workflows with Durable Objects

System design & How we can use Durable Objects

One study unit · Read, recall, then practice · Original video 00:07:58

The course introduces Durable Objects to decide when expensive destination-evaluation workflows should run. Instead of launching a workflow for every click, a stateful coordinator groups relevant clicks and schedules later work with an alarm. This places the scheduling and future subscription rules between the queue consumer and the evaluation workflow while keeping the redirect path fast.

Primary source: course video 35 · Supplied English subtitles · 00:07:58.

Understand the idea

What the course does

  1. Review the full path from the application’s stored links through Hono redirection and queue consumption.
  2. Identify browser rendering and AI as the comparatively expensive work that should not run on every click.
  3. Consider a rule that groups repeated clicks and performs one evaluation after a delay.
  4. Place a Durable Object between the queue handler and workflow creation.
  5. Keep the click context in persistent state and use an alarm to schedule the evaluation.
  6. Treat account tier and first-click behaviour as possible future business rules rather than completed features.

Watch for

Recall before revealing

What responsibility belongs to the Durable Object here, and what remains in the workflow?

Reveal the explanation

The Durable Object decides when to start an evaluation using stored context and an alarm; the workflow performs the rendering, AI analysis, and persistence.

Try it

For 500 clicks to the same link and destination, describe the state and alarm you need to run one evaluation after a chosen delay.

Check your result

Your design keeps scheduling independent from evaluation execution and explains why the other 499 clicks do not require new workflows.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: What are Durable Objects?. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →