Temporal is an open-source durable execution platform that lets developers write reliable, long-running workflows as ordinary code, automatically persisting state and retrying failures across process crashes and hardware outages. It solves the distributed-systems reliability problem β error handling, retries, timeouts, and state management β so application code can focus on business logic rather than fault-tolerance plumbing. The key mental model: a Temporal Workflow is a crash-proof function that can run for seconds or years, while Activities are the side-effectful steps (API calls, database writes) that the Workflow orchestrates and that can be retried independently.
What This Cheat Sheet Covers
This topic spans 17 focused tables and 130 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Architecture and Components
Temporal's architecture separates the coordination plane (the Temporal Service) from the execution plane (Workers). Understanding how these three roles β Service, Worker, and Client β interact is the foundation for everything else in the platform.
| Concept | Example | Description |
|---|---|---|
Temporal Cloud or self-hosted cluster | β’ The central coordination layer that persists Event History, schedules Tasks, and manages Namespace state β’ Workers and Clients connect to it via gRPC | |
w := temporal.NewWorker(c, "my-queue", opts) | A long-running process that polls Task Queues for Workflow and Activity Tasks, executes them, and reports results back to the Service. | |
c, _ := client.Dial(client.Options{}) | SDK object used by application code to start Workflow Executions, send Signals, issue Queries, and run Updates against the Temporal Service. | |
A running instance of OrderWorkflow for order #42 | β’ The durable, stateful execution unit β uniquely identified by Namespace + Workflow ID + Run ID β’ survives Worker crashes by replaying Event History | |
executeActivity(chargeCard, input, opts) | β’ A single invocation of an Activity function β’ encapsulates side-effectful, non-deterministic code (API calls, DB writes) outside the replay path |