Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】异步程序编程范式workflow #2446

Open
Barenboim opened this issue Jun 12, 2022 · 0 comments
Open

【开源自荐】异步程序编程范式workflow #2446

Barenboim opened this issue Jun 12, 2022 · 0 comments

Comments

@Barenboim
Copy link

Barenboim commented Jun 12, 2022

项目地址https://github.com/sogou/workflow

项目描述

这是一个基于C++语言的异步程序编程范式。范式内容包括这几个方面:

  • 程序 = 协议 + 算法 + 任务流
    • 协议与算法对称性。协议的调用是一次rpc,算法调用是一次apc(asynchronous procedure call)。
    • 任务流是业务逻辑。将各种rpc,apc任务组织成串并联或DAG结构。
    • 实现完全独立的分工。项目本身提供丰富的协议库和一些算法库。
  • 结构化并发与任务隐藏
    • 通过任务工厂产生任务,以简单的调用接口,构建串并联或DAG逻辑。
    • 任务本身可能隐藏多个异步任务,但用户无感知。例如一次http抓取就隐藏多个异步过程。
    • 如果把业务逻辑想象成用设计好的电子元件搭建电路,那么每个电子元件内部可能又是一个复杂电路。
  • 内存管理机制
    • 不使用智能指针,而采用独创任务生命周期机制。让异步编程非常简单,框架产生对象无内存泄漏风险。
    • 一切任务生命周期从创建开始到callback结束,简单清晰符合自然思维。

推荐理由

  • 天生解决计算与通信相结合难题。
  • 大规模应用实践。且开箱即用,快速产出。
  • Debian Linux和ubuntu Linux 22.04版自带安装包:https://tracker.debian.org/pkg/workflow
  • CNCF云原生全景图PaaS项目。
  • 开源不到两年,GitHub 8200+ stars。社区活跃。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants