Skip to main content

Temporal

The Temporal Platform explained.

Temporal is a scalable and reliable runtime for Reentrant Processes called Temporal Workflow Executions.

The Temporal System

The Temporal System

Temporal Platform

The Temporal Platform consists of a Temporal ClusterLink preview iconWhat is a Temporal Cluster?

A Temporal Cluster is the Temporal Server paired with persistence.

Learn more and Worker ProcessesLink preview iconWhat is a Worker Process?

A Worker Process is responsible for polling a Task Queue, dequeueing a Task, executing your code in response to a Task, and responding to the Temporal Server with the results.

Learn more. Together these components create a runtime for Workflow Executions.

The Temporal Platform

The Temporal Platform

The Temporal Cluster is open source and can be operated by you. The Temporal Cloud is a set of Clusters operated by us.

Worker Processes are hosted by you and execute your code. They communicate with a Temporal Cluster via gRPC.

Temporal Application

A Temporal Application is a set of Temporal Workflow Executions. Each Temporal Workflow Execution has exclusive access to its local state, executes concurrently to all other Workflow Executions, and communicates with other Workflow Executions and the environment via message passing.

A Temporal Application can consist of millions to billions of Workflow Executions. Workflow Executions are lightweight components. A Workflow Execution consumes few compute resources; in fact, if a Workflow Execution is suspended, such as when it is in a waiting state, the Workflow Execution consumes no compute resources at all.

Reentrant Process

A Temporal Workflow Execution is a Reentrant Process. A Reentrant Process is resumable, recoverable, and reactive.

  • Resumable: Ability of a process to continue execution after execution was suspended on an awaitable.
  • Recoverable: Ability of a process to continue execution after execution was suspended on a failure.
  • Reactive: Ability of a process to react to external events.

Therefore, a Temporal Workflow Execution executes a Temporal Workflow DefinitionLink preview iconWhat is a Workflow Definition?

A Workflow Definition is the code that defines the constraints of a Workflow Execution.

Learn more, also called a Temporal Workflow Function, your application code, exactly once and to completion—whether your code executes for seconds or years, in the presence of arbitrary load and arbitrary failures.

Temporal SDK

A Temporal SDK is a language-specific library that offers APIs to do the following:

  1. Construct and use a Temporal ClientLink preview iconWhat is a Temporal Client

    A Temporal Client, provided by a Temporal SDK, provides a set of APIs to communicate with a Temporal Cluster.

    Learn more
  2. Develop Workflow DefinitionsLink preview iconWhat is a Workflow Definition?

    A Workflow Definition is the code that defines the constraints of a Workflow Execution.

    Learn more
  3. Develop Worker ProgramsLink preview iconWhat is a Worker Program?

    A Worker Program is the static code that defines the constraints of the Worker Process, developed using the APIs of a Temporal SDK.

    Learn more

A Temporal SDK enables you to write your application code using the full power of the programming language, while the Temporal Platform handles the durability, reliability, and scalability of the application.

Temporal currently offers the following SDKs:

Each SDK emits metrics which can be ingested into monitoring platforms. See the SDK metrics reference for a complete list.

Auth

Temporal offers methods of authenticating and authorizing client API calls within our SDKs.

Sandbox environment

Some SDKs support running Workflows inside a sandbox environment.

The Temporal Python SDK, for example, enables you to run Workflow code in a sandbox environment to help prevent non-determinism errors in your application. The Temporal Workflow Sandbox for Python is not completely isolated, and some libraries can internally mutate state, which can result in breaking determinism.

By default, Workflows run in a sandbox environment. If a Workflow Execution performs a non-deterministic event, an exception is thrown, which results in failing the Workflow Task. The Workflow will not progress until the code is fixed.

For more information, see the knowledge base article on Python sandbox environments.

SDKs in development

The following SDKs are in alpha/pre-alpha development stages, but are not yet supported in the Developer's guide:

Third-party SDKs

The following third-party SDKs exist but are not supported in the Developer's guide:

Temporal Client

A Temporal Client is available in each SDK and provides a set of APIs to communicate with a Temporal ClusterLink preview iconWhat is a Temporal Cluster?

A Temporal Cluster is the Temporal Server paired with persistence.

Learn more.

The most common operations that a Temporal Client enables you to perform are the following:

  • Get the result of Workflow Execution.
  • List Workflow Executions.
  • Query a Workflow Execution.
  • Signal a Workflow Execution.
  • Start a Workflow Execution.

Failure

Temporal Failures are representations (in the SDKs and Event History) of various types of errors that occur in the system.

Failure handling is an essential part of development. For more information, including the difference between application-level and platform-level failures, see Handling Failure From First Principles. For the practical application of those concepts in Temporal, see Failure Handling in Practice.

For languages that throw (or raise) errors (or exceptions), throwing an error that is not a Temporal Failure from a Workflow fails the Workflow Task (and the Task will be retried until it succeeds), whereas throwing a Temporal Failure (or letting a Temporal Failure propagate from Temporal calls, like an Activity Failure from an Activity call) fails the Workflow Execution. For more information, see Application Failure.