klion26 commented on a change in pull request #176: URL: https://github.com/apache/flink-statefun/pull/176#discussion_r534106515
########## File path: README.zh.md ########## @@ -0,0 +1,214 @@ +<img alt="Stateful Functions" src="docs/fig/stateful_functions_logo.png" width=350px/> + +Stateful Functions(简称 StateFun)是一个 [Apache Flink](https://flink.apache.org/) 库, __可简化构建分布式有状态应用程序的过程__ 。它基于可持久化状态的函数,这些函数可以在强一致性保证下进行动态交互。 + +Stateful Functions 使我们能够将强大的状态管理与像 AWS Lambda 类似的 FaaS 实现和 Kubernetes 等现代资源编排框架的弹性、快速扩缩容和滚动升级功能相结合。通过这些特性,它解决了当今许多 FaaS 解决方案中 [最常被引用的两个缺点](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.pdf) :函数间的状态一致性和高效消息传递。 + +本文档旨在简要介绍 Stateful Functions 的核心概念以及如何开发一个 Stateful Functions 应用。 + +更多详细信息,可以参考 [官方文档](https://ci.apache.org/projects/flink/flink-statefun-docs-master) ,相关代码示例,请查看[这里](statefun-examples/) 。 + +[](https://travis-ci.org/apache/flink-statefun) + +## 目录 + +- [核心概念](#core-concepts) + * [摘要](#abstraction) + * [函数模块和可扩展性](#modules) + * [Runtime](#runtime) +- [入门](#getting-started) + * [运行一个完整的例子](#greeter) + * [创建项目](#project-setup) + * [构建项目](#build) + * [在 IDE 中运行](#ide-harness) +- [应用部署](#deploying) + * [使用 Docker 映像进行部署](#docker) + * [作为 Flink 作业部署](#flink) +- [参与贡献](#contributing) +- [开源软件许可](#license) + +## <a name="core-concepts"></a>核心概念 + +### <a name="abstraction"></a>摘要 + +Stateful Functions 应用程序由以下原语组成:有状态函数,入口(ingresses),路由(routers)和出口(egresses)。 + +<p align="center"> + <img src="docs/fig/stateful_functions_overview.png" width="650px"/> +</p> + +#### Stateful Functions + +* 一个 _stateful function_ 是通过消息调用的一小段逻辑/代码。每个 stateful function 都是作为 _函数类型_ 的唯一可 +调用 _虚拟实例_ 存在。每个实例都通过其 ``type`` 以及 type 中的唯一 ``ID``(字符串)来寻址。 + +* Stateful Functions 可以从 ingress 或任何其他的 stateful function(包括其自身)中调用,调用者只需要知道目标函数的逻辑地址即可。 + +* 函数实例是 _虚拟的_ ,因为它们不总是同时在内存中活跃。在任何一个时间点,只有一小部分函数及其状态作为实际对象存在。 +当一个虚拟实例接收到消息时,将配置一个对象并带着该虚拟实例的状态加载,然后处理该消息。与虚拟内存类似,许多函数的状态可能 +在任何时间点都被“交换出去”(swap out)。 + +* 函数的每个虚拟实例都有其自己的状态,可以通过局部变量访问, +并且该状态是私有的,对于该实例来说是本地的。 + +如果您知道 Apache Flink 的 DataStream API,则可以将 Stateful Functions 考虑为轻量级的 +`KeyedProcessFunction` 。函数 ``类型`` 等同于处理函数转换(process function transformation),而 `` ID `` 则是键值(key)。不同之处 +在于,函数不是在定义数据流(拓扑)的有向无环图(DAG)中组装, Review comment: nit: 中文来说,不建议这一行(`在于,函数不是在定义数据流(拓扑)的有向无环图(DAG)中组装`)和上一行分开。因为他们是连着的一句话,但是渲染之后这里会有空格,看上去会比较奇怪。 其他地方也类似 ########## File path: README.zh.md ########## @@ -0,0 +1,214 @@ +<img alt="Stateful Functions" src="docs/fig/stateful_functions_logo.png" width=350px/> + +Stateful Functions(简称 StateFun)是一个 [Apache Flink](https://flink.apache.org/) 库, __可简化构建分布式有状态应用程序的过程__ 。它基于可持久化状态的函数,这些函数可以在强一致性保证下进行动态交互。 + +Stateful Functions 使我们能够将强大的状态管理与像 AWS Lambda 类似的 FaaS 实现和 Kubernetes 等现代资源编排框架的弹性、快速扩缩容和滚动升级功能相结合。通过这些特性,它解决了当今许多 FaaS 解决方案中 [最常被引用的两个缺点](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.pdf) :函数间的状态一致性和高效消息传递。 + +本文档旨在简要介绍 Stateful Functions 的核心概念以及如何开发一个 Stateful Functions 应用。 + +更多详细信息,可以参考 [官方文档](https://ci.apache.org/projects/flink/flink-statefun-docs-master) ,相关代码示例,请查看[这里](statefun-examples/) 。 + +[](https://travis-ci.org/apache/flink-statefun) + +## 目录 + +- [核心概念](#core-concepts) + * [摘要](#abstraction) + * [函数模块和可扩展性](#modules) + * [Runtime](#runtime) +- [入门](#getting-started) + * [运行一个完整的例子](#greeter) + * [创建项目](#project-setup) + * [构建项目](#build) + * [在 IDE 中运行](#ide-harness) +- [应用部署](#deploying) + * [使用 Docker 映像进行部署](#docker) + * [作为 Flink 作业部署](#flink) +- [参与贡献](#contributing) +- [开源软件许可](#license) + +## <a name="core-concepts"></a>核心概念 + +### <a name="abstraction"></a>摘要 + +Stateful Functions 应用程序由以下原语组成:有状态函数,入口(ingresses),路由(routers)和出口(egresses)。 + +<p align="center"> + <img src="docs/fig/stateful_functions_overview.png" width="650px"/> +</p> + +#### Stateful Functions + +* 一个 _stateful function_ 是通过消息调用的一小段逻辑/代码。每个 stateful function 都是作为 _函数类型_ 的唯一可 +调用 _虚拟实例_ 存在。每个实例都通过其 ``type`` 以及 type 中的唯一 ``ID``(字符串)来寻址。 + +* Stateful Functions 可以从 ingress 或任何其他的 stateful function(包括其自身)中调用,调用者只需要知道目标函数的逻辑地址即可。 Review comment: ingress 这里是不是也翻译比较好呢? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
