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

[自荐][开源] C++ Workflow异步调度编程范式 #1712

Open
holmes1412 opened this issue Apr 2, 2021 · 0 comments
Open

[自荐][开源] C++ Workflow异步调度编程范式 #1712

holmes1412 opened this issue Apr 2, 2021 · 0 comments

Comments

@holmes1412
Copy link

holmes1412 commented Apr 2, 2021

项目地址

https://github.com/sogou/workflow

项目描述

  • Workflow是C++服务器引擎,支撑搜狗几乎所有后端C++在线服务(搜索,云输入法,在线广告等),每日处理数百亿请求;
  • 包括通信计算文件IO定时器计数器等异步资源;
  • 创新性引入的任务流概念,提供串行并行使开发者得以把异步任务组装起来实现复杂的业务逻辑;
  • 复合性的任务模型,同等打通各种异步资源,计算、通信以统一的调度方式无缝结合;
  • 内部自带多种通用协议:HTTP, Redis, MySQL, Kafka,协议全部自解析无第三方依赖;
  • 跨平台、支持多种操作系统(Linux/MacOS/Windows/Android),自带服务治理与负载均衡;
  • 是一个高性能的并行计算异步通信融为一体的编程范式

示例代码

#include <stdio.h>
#include "workflow/WFHttpServer.h"

int main()
{
    WFHttpServer server([](WFHttpTask *task) {
        task->get_resp()->append_output_body("<html>Hello World!</html>");
    });

    if (server.start(8888) == 0) { // start server on port 8888
        getchar(); // press "Enter" to end.
        server.stop();
    }

    return 0;
}
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