Public Courses

Temporal 102: Exploring Durable Execution with Python (102_python)


Description
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

Prerequisites:

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 Python 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 Python, you must also have at least basic proficiency with the Python programming language.

Programming Language: Python Number of hours: 4

Content
  • About this course
  • Welcome
  • Format and Duration
  • Course Outcomes
  • Meet the Instructors
  • Exercise Environment Orientation
  • (Optional Activity) Setting up a Local Development Environment
  • Course Conventions
  • Getting Help
  • Understanding Key Concepts in Temporal
  • Understanding Key Concepts in Temporal: What to Expect
  • Durable Execution System
  • Temporal Application Structure
  • How Errors Affect Workflow Execution
  • Improving Your Temporal Application Code
  • Improving Your Temporal Application Code: What to Expect
  • 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
  • Accessing Workflow Results
  • Accessing Activity Results
  • Using Timers in a workflow definition
  • Using Timers in a Workflow Definition: What to Expect
  • What is a Timer?
  • Use Cases for Timers
  • Timer APIs Provided by the Python SDK
  • 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
  • Understanding Event History: What to Expect
  • 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
  • Understanding Workflow Determinism: What to Expect
  • History Replay: How Temporal Provides Durable Execution
  • Why Temporal Requires Determinism for Workflows
  • Python Sandbox Environment
  • 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
  • Testing Your Temporal Application Code: What to Expect
  • Unit Testing Primer for Python (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 Workflow Execution: What to Expect
  • Debugging a Workflow that Does Not Progress
  • Interpreting Event History for Workflow Execution
  • Terminating a Workflow Execution with the Web UI
  • Identify and Fixing a Bug in an Activity Definition
  • Hands-On Exercise #3: Debugging and Fixing an Activity Failure
  • Deploying your application to production
  • Deploying Your Application to Production: What to Expect
  • The Deployment Landscape
  • Configuring a Temporal Client for Production
  • Overview of Temporal Application Development
  • Conclusion
  • Essential Points
  • Parting Words
  • For More Information
Completion rules
  • All units must be completed