restatedev/restate

GitHub: restatedev/restate

Restate 是一个帮助开发者以简单代码方式构建容错、弹性分布式应用的平台。

Stars: 3817 | Forks: 155

[![文档](https://img.shields.io/badge/doc-reference-blue)](https://docs.restate.dev) [![示例](https://img.shields.io/badge/view-examples-blue)](https://github.com/restatedev/examples) [![Discord](https://img.shields.io/discord/1128210118216007792?logo=discord)](https://discord.gg/skW3AZ6uGd) [![Slack](https://img.shields.io/badge/Slack-4A154B?logo=slack&logoColor=fff)](https://join.slack.com/t/restatecommunity/shared_invite/zt-2v9gl005c-WBpr167o5XJZI1l7HWKImA) [![Twitter](https://img.shields.io/twitter/follow/restatedev.svg?style=social&label=Follow)](https://x.com/intent/follow?screen_name=restatedev) # Restate - 轻松构建弹性应用!

Restate overview

[Restate](https://restate.dev) 是构建弹性应用最简单的方式。 Restate 为您常用的构建块提供了分布式的持久化版本,让您能够构建广泛的应用场景: * [持久化 AI Agents](https://github.com/restatedev/ai-examples) * [代码即工作流](https://docs.restate.dev/use-cases/workflows) * [微服务编排](https://docs.restate.dev/use-cases/microservice-orchestration) * [事件处理](https://docs.restate.dev/use-cases/event-processing) * [异步任务](https://docs.restate.dev/use-cases/async-tasks) * [Agents、有状态 Actors、状态机等](https://github.com/restatedev/examples) ## Restate 入门 1. 🏎 [跟随快速入门指南](https://docs.restate.dev/get_started/quickstart),只需 2 分钟即可启动并运行 Restate! 2. 💡 [Restate 之旅](https://docs.restate.dev/get_started/tour) 将引导您了解 Restate 最重要的功能。 ## SDK Restate 支持以下 SDK: * [Typescript](https://github.com/restatedev/sdk-typescript) * [Java 和 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) ## 安装 我们为 MacOS 和 Linux 提供了预构建的 CLI 和服务器二进制文件。 请查看 [快速入门](https://docs.restate.dev/get_started/quickstart) 或 [文档中的安装说明](https://docs.restate.dev/develop/local_dev)。 ### 安装服务器 通过 Homebrew 安装: ``` brew install restatedev/tap/restate-server ``` 通过 npx 运行: ``` npx @restatedev/restate-server ``` 通过 Docker 运行: ``` docker run --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 \ --add-host=host.docker.internal:host-gateway docker.restate.dev/restatedev/restate:latest ``` ### 安装 CLI 通过 Homebrew 安装: ``` brew install restatedev/tap/restate ``` 通过 npm 安装: ``` npm install --global @restatedev/restate ``` 通过 npx 运行: ``` npx @restatedev/restate ``` 您也可以从 [发布页面](https://github.com/restatedev/restate/releases) 或我们的 [下载页面](https://restate.dev/get-restate/) 下载二进制文件。 ## 核心原语 Restate 为简化应用开发提供的基础原语如下: * **可靠的执行**:Restate 保证代码运行至完成。故障会导致重试,重试会使用[持久化执行机制](https://docs.restate.dev/concepts/durable_execution)来恢复部分进度并防止重新执行已完成的步骤。 * **可靠的通信**:服务之间以精确一次的语义进行通信:无论是[请求-响应、单向消息还是计划任务](https://docs.restate.dev/concepts/invocations)。Restate 可靠地传递消息,并使用持久化执行来确保不会发生丢失或重复。 * **持久化的 Promises 和 Timers**:在 Restate 中注册 Promises/Futures 和 timers,使其能够抵御故障(例如休眠、webhooks、timers)。Restate 可以在跨故障、跨进程和跨时间的情况下恢复它们。 * **一致的状态**:实现具有独立 K/V 状态的[有状态实体](https://docs.restate.dev/concepts/services)。Restate 将 K/V 状态更新与执行进度一起持久化,以确保状态的一致性。Restate 在调用时将 K/V 状态附加到请求上,并在完成时将其写回。这对于 FaaS 部署特别高效(有状态的无服务器架构,太棒了!)。 * **挂起用户代码**:长时间运行的代码在等待 Promise/Future 时会挂起,并在该 Promise 被解析时恢复。这对于无服务器部署特别有用。 * **可观测性与自省**:Restate 包含一个 UI 和 CLI,用于跨服务和调用检查[您的应用状态](https://docs.restate.dev/operate/introspection)。Restate 会为处理程序之间的交互自动生成 Open Telemetry traces。 ## 版本 Restate 遵循[语义化版本控制](https://semver.org/)。 您可以安全地从 Restate `x.y` 版本升级到 `x.(y+1)` 版本,而无需执行任何手动数据迁移,因为 Restate 会为您执行自动数据迁移。 有关 SDK 的兼容性,请参阅相应 README 中支持的版本矩阵: * [Restate Java/Kotlin 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) ### 在本地构建 Restate 要在本地构建 Restate,请[遵循构建说明](https://github.com/restatedev/restate/blob/main/docs/dev/local-development.md#building-restate)。
标签:Durable Execution, JS文件枚举, 事件处理, 分布式系统, 分布式计算, 可视化界面, 后端开发, 响应大小分析, 基础设施, 容错中间件, 容错应用, 工作流引擎, 开发框架, 异常处理, 异步任务, 弹性应用程序, 微服务编排, 持久化执行, 无服务器, 日志审计, 暗色界面, 有状态Actor, 状态机, 系统架构, 请求拦截, 逆向工具