参考资料
本教程主要参考 Restate 的公开官方资料和仓库结构,并在教学实现中做了大幅简化。
官方资料
| 资料 | 用途 |
|---|---|
| Restate GitHub 仓库 | 仓库结构、核心 primitives、安装方式、workspace 模块 |
| Restate 官方文档首页 | Durable execution、state、communication、timer 的总体描述 |
| Key Concepts | Services、Server、Invocation、Durable Execution、Consistent State |
| Restate Architecture | Ingress、Bifrost、Partition Processor、Control Plane、failover |
| Services | Basic Service、Virtual Object、Workflow 的对比 |
| Handlers | handler 与 context 类型 |
| Actions | run、state、service calls、timers 等 context actions |
| Python Durable Steps | Python SDK 中 ctx.run / ctx.run_typed 的语义 |
| Python Scheduling & Timers | durable timers、sleep、delayed message 的语义 |
| Building a modern Durable Execution Engine from First Principles | 从 first principles 理解 log-based runtime |
重要声明
examples/durable-mini 是教学项目,不是 Restate 的兼容实现,也不提供 Restate 的生产级保证。它保留的核心思想是:
- 幂等入口把重复请求映射到同一个 invocation。
- durable step 的结果写入 Journal。
- 重放时跳过已完成步骤。
- timer 进入持久化状态而不是进程内存。
生产级 Restate 还包含复制日志、分区、leader epoch、metadata consensus、服务协议、状态物化、snapshot、observability、CLI/UI 等完整工程体系。