restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.49k stars 34 forks source link
async-await cli consistent-state distributed-systems durable-execution event-driven microservices reliable-communication serverless workflow-engine

Documentation Examples Discord Twitter

Restate - Building resilient applications made easy!

Restate overview

Easily build workflows, event-driven applications, and distributed services in a fault-tolerant manner with durable async/await. [Restate](https://restate.dev) is great at building: * [Lambda Workflows as Code](https://restate.dev/blog/we-replaced-400-lines-of-stepfunctions-asl-with-40-lines-of-typescript-by-making-lambdas-suspendable/) * [Transactional RPC Handlers](https://github.com/restatedev/examples/tree/main/end-to-end-applications/typescript/food-ordering) * [Event Processing with Kafka](https://restate.dev/blog/restate--kafka-event-driven-apps-where-event-driven-is-an-implementation-detail/) * [Much more](https://github.com/restatedev/examples) ## Get started with Restate 1. 🏎 [Check out our quickstart](https://docs.restate.dev/get_started/quickstart) to get up and running with Restate in 2 minutes! 1. πŸ’‘ [The tour of Restate](https://docs.restate.dev/get_started/tour) walks you through all features of Restate. ## SDKs Restate supports the following SDKs: * [Typescript](https://github.com/restatedev/sdk-typescript) * [Java and Kotlin](https://github.com/restatedev/sdk-java) * [Python](https://github.com/restatedev/sdk-python) * [Go](https://github.com/restatedev/sdk-go) * [Rust](https://github.com/restatedev/sdk-rust) ## Install We offer pre-built binaries of the CLI and the server for MacOS and Linux. ### Install the server Install via Homebrew: ```bash brew install restatedev/tap/restate-server ``` Run via npx: ```bash npx @restatedev/restate-server ``` Run via docker: ```bash docker run --rm -it --network=host docker.io/restatedev/restate:latest ``` ### Install the CLI Install via Homebrew: ```bash brew install restatedev/tap/restate ``` Install via npm: ```bash npm install --global @restatedev/restate ``` Run via npx: ```bash npx @restatedev/restate ``` You can also download the binaries from the [release page](https://github.com/restatedev/restate/releases) or our [download page](https://restate.dev/get-restate/). ## Community * πŸ€—οΈ [Join our online community](https://discord.gg/skW3AZ6uGd) for help, sharing feedback and talking to the community. * πŸ“– [Check out our documentation](https://docs.restate.dev) to get quickly started! * πŸ“£ [Follow us on Twitter](https://twitter.com/restatedev) for staying up to date. * πŸ™‹ [Create a GitHub issue](https://github.com/restatedev/restate/issues) for requesting a new feature or reporting a problem. * 🏠 [Visit our GitHub org](https://github.com/restatedev) for exploring other repositories. ## Core primitives The basic primitives Restate offers to simplify application development are the following: * **Reliable Execution**: user code will always run to completion. Intermediate failures result in re-tries that use the durable execution mechanism to recover partial progress and not duplicate already executed steps. * **Suspending User Code**: long-running user code suspends when awaiting on a promise and resume when that promise is resolved. * **Reliable Communication**: user code communicates with exactly-once semantics. Restate reliably delivers messages and anchors both sender and receiver in the durable execution to ensure no losses or duplicates can happen. * **Durable Timers**: user code can sleep (and suspend) or schedule calls for later. * **Isolation**: user code can be keyed, which makes Restate scheduled them to obey single-writer-per-key semantics. * **Consistent State**: keyed user code can attach key/value state, which is eagerly pushed into handlers during invocation, and written back upon completion. This is particularly efficient for FaaS deployments (stateful serverless, yay!). * **Observability & Introspection**: Restate automatically generates Open Telemetry traces for the interactions between handlers and gives you a SQL shell to query the distributed state of the application. ## Contributing We’re excited if you join the Restate community and start contributing! Whether it is feature requests, bug reports, ideas & feedback or PRs, we appreciate any and all contributions. We know that your time is precious and, therefore, deeply value any effort to contribute! Check out our [development guidelines](/docs/dev/development-guidelines.md) and [tips for local development](/docs/dev/local-development.md) to get started. ## Versions Restate follows [Semantic Versioning](https://semver.org/). You can safely upgrade from a Restate `x.y` to `x.(y+1)` release without performing any manual data migration, as Restate performs an automatic data migration for you. For SDK compatibility, refer to the supported version matrix in the respective READMEs: * [Restate Java SDK](https://github.com/restatedev/sdk-java#versions) * [Restate TypeScript SDK](https://github.com/restatedev/sdk-typescript#versions) * [Restate Go SDK](https://github.com/restatedev/sdk-go#versions) * [Restate Python SDK](https://github.com/restatedev/sdk-python#versions) * [Restate Rust SDK](https://github.com/restatedev/sdk-rust#versions) ### Building Restate locally In order to build Restate locally [follow the build instructions](https://github.com/restatedev/restate/blob/main/docs/dev/local-development.md#building-restate).