Skip to content

Latest commit

 

History

History

python

Python Example Catalog

Basics

Learn the key concepts of Restate:

  • Services - Durable Execution: Making code resilient to failures via automatic retries and recovery of previously finished actions.
  • Durable Building Blocks: Restate turns familiar programming constructs into recoverable, distributed building blocks. Discover what you can do with the SDK.
  • Virtual Objects: Stateful services with access to long-lasting, consistent K/V state.
  • Workflows: Durable sequences of steps that can be queried, signaled and awaited.

Use Cases and Patterns

Communication

Orchestration patterns

  • Sagas: Preserve consistency by tracking undo actions and running them when code fails halfway through.
  • Stateful Actors and State Machines: State machine with a set of transitions, built as a Restate Virtual Object for automatic state persistence.
  • Payment State Machines (Advanced): State machine example that tracks a payment process, ensuring consistent processing and cancellations.

Scheduling

Event processing

End-to-End Applications

Complete applications built with Restate:

  • Food Ordering App: A food delivery service (like DoorDash) that manages orders, restaurants, payments, and delivery drivers. The example mixes workflows (ordering) and stateful microservices (driver management), and uses Kafka as an event source for updates from delivery drivers.
  • RAG Ingestion: Durably process webhook events when new files get uploaded to a bucket, and trigger workflows to process them, compute embeddings and put them in a vector database.

Templates

Starter templates for new projects:

Tutorials

Step-by-step guides to learn Restate: