Public Courses

Temporal 102: Exploring Durable Execution with TypeScript (102_ts)

In this course, you'll go beyond the basics of Temporal application development, acquiring skills that will help you on your journey to production deployment. Along the way, you'll encounter several common problems faced by Temporal developers, find out why they occur, and more importantly, how to identify and solve them, as well as how to avoid them in the future. By emphasizing key concepts and best practices, you'll gain a deeper understanding of how Temporal works and how to use it effectively.

When you've completed the course, you'll be able to:

- Apply Temporal best practices for application development
- Validate application behavior through automated testing
- Evaluate an Event History to debug problems with Workflow Execution


To be successful in this course, you should have an understanding of the fundamental concepts, tools, and techniques used to develop and execute basic Temporal applications with the TypeScript SDK. This includes the ability to develop and execute Temporal Workflows and Activities, navigate the Web UI, configure and run a Worker, as well as an understanding of the high-level interactions between the Temporal Application and Temporal Cluster during Workflow Execution. We strongly recommend that you complete Temporal 101, which covers these topics, before starting this course.

Since code used in examples and exercises are written in TypeScript, you must also have at least basic proficiency with the TypeScript programming language.

Programming Language: TypeScript Number of hours: 4

  • About this Course
  • Welcome
  • Format and Duration
  • Course Outcomes
  • Exercise Environment Orientation
  • (Optional Activity) Setting Up a Local Development Environment
  • Course Conventions
  • Getting Help
  • Understanding Key Concepts in Temporal
  • Durable Execution System
  • Temporal Application Structure
  • How Errors Affect Workflow Execution
  • Improving Your Temporal Application Code
  • Backwards-Compatible Evolution of Input Parameters and Return Values
  • Choosing Names for Task Queues
  • Choosing Workflow IDs
  • Workflow ID Reuse Policy and Retention Period
  • Logging in Workflows and Activities
  • Accessing Results
  • Using Timers in a Workflow Definition
  • What is a Timer?
  • Use Cases for Timers
  • Pausing Workflow Execution for a Specified Duration
  • What Happens to a Timer if the Worker Crashes?
  • Hands-On Exercise #1: Observing Durable Execution
  • Understanding Event History
  • Workflow Execution Overview
  • How Workflow Code Maps to Commands
  • Overview of Event History
  • Event History Limits
  • Event Structure and Attributes
  • How Commands Map to Events
  • Workflow and Activity Task States
  • Sticky Execution
  • Understanding Workflow Determinism
  • History Replay: How Temporal Provides Durable Execution
  • Why Temporal Requires Determinism for Workflows
  • Identifying Non-Deterministic Code through TypeScript SDK Workflow Sandbox
  • Common Sources of Non-Determinism
  • How Workflow Changes Can Lead to Non-Deterministic Errors
  • Deployment Leads to Non-Deterministic Error
  • Using Workflow Reset to Recover from a Bad Deployment
  • Testing Your Temporal Application Code
  • Unit Testing Primer for TypeScript (Optional)
  • Validating Correctness of Temporal Application Code
  • Testing Activities
  • Testing Workflows
  • Mocking Activities for Workflow Tests
  • Hands-On Exercise #2: Testing the Translation Workflow
  • Debugging Workflow Execution
  • Debugging a Workflow that Does Not Progress
  • Interpreting Event History for Workflow Executions
  • Terminating a Workflow Execution with the Web UI
  • Identifying and Fixing a Bug in an Activity Definition
  • Hands-On Exercise #3: Debugging and Fixing an Activity Failure
  • Introducing Temporal for Visual Studio Code
  • Deploying Your Application to Production
  • The Deployment Landscape
  • Configuring a Temporal Client for Production
  • Overview of Temporal Application Deployment
  • Conclusion
  • Essential Points
  • Parting Words
  • For More Information
Completion rules
  • All units must be completed