- JDK >= 17
- 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.
- Durable RPC, Idempotency & Concurrency: Restate persists requests and makes sure they execute exactly-once.
- (Delayed) Message Queue: Use Restate as a queue. Schedule tasks for now or later and ensure the task is only executed once.
- Convert Sync Tasks to Async: Kick off a synchronous task (e.g. data upload) and turn it into an asynchronous one if it takes too long.
- 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 Tasks: Restate as scheduler: Schedule tasks for later and ensure the task is triggered and executed.
- Parallelizing Work: Execute a list of tasks in parallel and then gather their result.
- Payments: Async Signals: Handling async payment callbacks for slow payments, with Stripe.
- Transactional Event Processing: Processing events (from Kafka) to update various downstream systems in a transactional way.
- Event Enrichment / Joins: Stateful functions/actors connected to Kafka and callable over RPC.
Examples integrating Restate with other tools and frameworks:
- Spring Boot + Spring JPA: Reading and writing to Postgres with Spring JPA.
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.
- Subway Fare Calculator: A fare calculator for a subway system that calculates the fare based on distances traveled by customers. Implemented as Stateful Actors.
- Image Workflow Parser & Executor: A dynamic workflow interpreter (Spring Boot) that parses a JSON list of image processing commands and runs them through image processing libraries.
Starter templates for new projects:
- Java - Gradle Template
- Java - Maven Template
- Java - Maven - Quarkus Workers Template
- Java - Maven - Spring Boot
Step-by-step guides to learn Restate:
- Tour of Restate: An introduction to the SDK features as described in the documentation.