---
title: "Durable Execution Platform"
description: "Temporal's durable execution platform helps simplify your code and allow you to build more features, faster. Learn more today."
canonical: "https://temporal.io/product.md"
source: "https://temporal.io/product"
---

# A durable execution platform that lets you write the code you want

- [How Temporal works](https://temporal.io/how-it-works.md): Go inside the machine and see how Temporal works.
- [Build Now](https://docs.temporal.io/develop): Start developing on Temporal now
- [How to deploy](https://docs.temporal.io/production-deployment): Deploy Temporal in production
- [Explore Cloud](https://temporal.io/cloud.md): Start building with Temporal Cloud

## Temporal capabilities

Temporal delivers new development primitives that help simplify your code and allow you to build more features, faster. And at runtime, it's fault-tolerant and easily scalable so your apps can grow bigger, more reliably.

## Stop building state machines

Temporal captures the complete state of your functions (variables, threads, blocking calls) so you get the benefits of a state machine, without maintaining complex state machine code.

### State Machines

```typescript
async function transfer(
  fromAccount: string,
  toAccount: string,
  amount: number,
) {
  // These are activities, not regular functions.
  // Activities may run elsewhere, and their return value
  // is automatically persisted by Temporal.
  await myActivities.withdraw(fromAccount, amount);
  try {
    await myActivities.deposit(toAccount, amount);
  } catch {
    await myActivities.deposit(fromAccount, amount);
  }
}
```

## Set retry policies, don't code them

Temporal allows you to define exponential retry policies for Activities, so you don’t have to write retry logic into your application code. And your retry duration can be as long as needed, even months.

### Retry Policies

```python
@activity.defn
async def compose_greeting(input: ComposeGreetingInput) -> str:
    print(f"Invoking activity, attempt number {activity.info().attempt}")
    # Fail the first 3 attempts, succeed the 4th
    if activity.info().attempt < 4:
        raise RuntimeError("Intentional failure" )
    return f"{input.greeting}, {input.name}!"


@workflow.defn
class GreetingWorkflow:
    @workflow.run
    async def run(self, name: str) -> str:
        # By default activities will retry, backing off an initial interval and
        # then using a coefficient of 2 to increase the backoff each time after
        # for an unlimited amount of time and an unlimited number of attempts.
        # We'll keep those defaults except we'll set the maximum interval to
        # just 2 seconds.
        return await workflow.execute_activity(
            compose_greeting,
            ComposeGreetingInput("Hello", name),
            start_to_close_timeout =timedelta(seconds=10),
            retry_policy=RetryPolicy(maximum_interval=timedelta(seconds=2)),
        )
```

## Wait for 3 seconds or 3 months

Set timers to wait for days, weeks, or months, knowing that an outage or server restart during the wait period won’t prevent your workflow from executing.

### 3 sec or months

```typescript
import { proxyActivities, sleep } from "@temporalio/workflow";
import type { Activities } from "./activities";
const { hasUpgraded, sendReminderEmail } = proxyActivities<Activities>({
  startToCloseTimeout: "10 seconds",
});

async function startTrial(user: string) {
  while (!(await hasUpgraded(user))) {
    await sendReminderEmail(user);
    await sleep("30 days");
  }
}
```

## Schedule, don't Cron

Temporal delivers an ability to schedule a workflow (much like a cron job) and then pause, re-start, and stop them as needed.

```typescript
await new Client().schedule.create({
  action: {
    type: "startWorkflow",
    workflowType: reminderWorkflow,
    args: [
      "♻️ Dear future self, please take out the recycling tonight. Sincerely, past you ❤️",
    ],
    taskQueue: "schedules",
  },
  scheduleId: "sample-schedule",
  spec: {
    calendars: [
      {
        comment: "every wednesday at 8:30pm",
        dayOfWeek: "WEDNESDAY",
        hour: 20,
        minute: 30,
      },
    ],
  },
});
```

- [Documentation](https://docs.temporal.io/workflows#schedule)

## Code like a champion, in your language

Temporal allows you to simply code for durable execution, using one or more of our SDKs in Go, Java, Typescript, Python and .NET (and even deploy polyglot workflows).

### Idiomatic Language Support

#### Python

```python
@dataclass
class GreetingParam:
    name: str


@workflow.defn
class GreetingWorkflow:
    @workflow.run
    async def run(self, param: GreetingParam) -> str:
        return await workflow.execute_activity(
            greet,
            param,
            schedule_to_close_timeout=timedelta(seconds=30),
        )
```

#### Go

```go
type GreetingParam struct {
	Name string `json:"name"`
}
func GreetingWorkflow(ctx workflow.Context, param *GreetingParam) (string, error) {
	activityOptions := workflow.ActivityOptions{
		ScheduleToCloseTimeout: 30 * time.Second,
	}
      ctx = workflow.WithActivityOptions(ctx, activityOptions)
      var greeting string
      err := workflow.ExecuteActivity(ctx, Greet, param).Get(ctx, &greeting)
      return greeting, err
}
```

#### TypeScript

```typescript
const activities = proxyActivities<Activities>({
  scheduleToCloseTimeout: "30 seconds",
});

interface GreetingParam {
  name: string;
}

export async function greet(param: GreetingParam): Promise<string> {
  return await activities.greet(param);
}
```

#### PHP

```php
use Temporal\Workflow\YourWorkflowInterface;
use Temporal\Workflow\WorkflowMethod;

#[WorkflowInterface]
interface FileProcessingWorkflow
{
    #[WorkflowMethod]
    public function processFile(Argument $args);
}
```

## Incorporate human interactions

Use external sources – including human actions – that interact seamlessly with Workflows.

### Human integration

```go
func Accept(ctx workflow.Context, input *AcceptWorkflowInput) (*AcceptWorkflowResult, error) {
	err := emailCandidate(ctx, input)
	if err != nil {
		return nil, err
	}
	submission, err := waitForSubmission(ctx)
	if err != nil {
		return nil, err
	}
	return &AcceptWorkflowResult{Submission: submission},
		nil
}
```

## Never guess what's going on

Temporal allows you to inspect, replay, and rewind every Workflow execution, step by step.

- [Documentation](https://docs.temporal.io/visibility)

## Develop locally, deploy globally

Write code in your preferred language locally, then deploy your workflows and activities using the same software delivery mechanisms you have today.

- [Learn About Temporal Cloud](https://temporal.io/cloud.md)

## Trusted by enterprise engineers and experienced developers

> Netflix engineers spend less time writing logic to maintain application consistency or guard against failures because Temporal does it for them. The Temporal platform is easy to operate and fits naturally in our development workflow.
>
> — Rob Zienert, Staff Software Engineer, Netflix

> Durable execution is a core requirement for modern AI systems, and Temporal offers a compelling platform to help build it in from the start. As AI systems become more complex and long-running, durability is as important as performance. Temporal plays a role in how we think about reliable execution at scale, supporting teams in focusing on product development.
>
> — Venkat Venkataramani, VP of App Infrastructure, OpenAI • Former CEO & Co-founder of Rockset

## Don't fight dev patterns, ship code.

### Event-Driven Architectures

Event-driven architectures and queue-driven design promise ease of deployment and scale, but are a development nightmare.

[Read now: Event-Driven Architectures - A better way forward ›](https://pages.temporal.io/whitepaper-event-driven-architectures)

**Without Temporal**
Event-driven applications are loosely coupled at runtime, but highly coupled at build time. This creates great complexity for error handling and propagation of state across disparate services.

**With Temporal**
Application state, retries, and error handling are abstracted away so that you no longer have to code for them. System testing is a breeze because Temporal eliminates common failure scenarios.

### SAGA & Distributed Transactions

The saga pattern ensures safe and consistent state across distributed services so that the failure of one operation within a sequence results in prior operations being reversed using compensating transactions.

[Read now: Automating the Saga Pattern with Temporal ›](https://pages.temporal.io/download-saga-pattern-made-easy)

**Without Temporal**
Saga typically requires significant forethought as there is no central system to manage coordination and visibility. Debugging unexpected failure modes can be treacherous.

**With Temporal**
Workflow definitions allow you to more easily understand, debug, and modify sagas. Tighter coupling for  compensations increases and your application code remains clean.

### Batch Processing

Batch Processes are created to execute a well-defined function across large or even small sets of data.

**Without Temporal**
Often, batch processes can be quite large and when they fail, you have limited or no insight into where they failed, what completed and what hasn't.

**With Temporal**
Each execution within the batch process becomes a Workflow Execution with state captured, so that upon failure, you have insight into what completed and where to restart the process.

### Scheduled Jobs & Cron

For years, we have relied on Cron to schedule jobs to be executed at a certain time or regular interval.

**Without Temporal**
Cron is a largely manual process that can be unreliable and provides limited to no controls over execution.

**With Temporal**
You can replace Cron with Scheduled Workflows to be reliably executed.  You can start and pause them and even set up signals to start them on command for a Workflow.

### State Machines

State machines are often used to define and manage valid state and transitions for entities within your application and depending on your application, they can be quite complex.

[Read now: State Machines Simplified ›](https://pages.temporal.io/download-state-machines-simplified)

**Without Temporal**
State machine code grows in complexity and length with the addition of each new state and maintenance and testing of them can be a challenge.

**With Temporal**
Complete state of your function and workflow is captured, so you no longer need to automate, track and validate state so you can eliminate or avoid state machines.

## Reliable, scalable, serverless Temporal in 11+ regions

Run the Temporal Service today, without hassle, and with peace of mind. Pay for only what you use with our managed service, built, managed, and supported by the creators of the Temporal project.

- [Learn more](https://temporal.io/cloud.md)
- [Get Started For Free](https://temporal.io/get-cloud)

## Build Invincible Apps

Give your apps and services durable execution.

- [Get started](https://docs.temporal.io/quickstarts)
- [Code Base](https://github.com/temporalio)
- [Samples](https://learn.temporal.io/examples/)
