Repolode
sogou

sogou/workflow

A C++11 parallel computing and asynchronous networking framework used in Sogou's back-end services, for building DAG-based task workflows.

Stars
14,423
Forks
2,551
Open issues
27
Last commit
2 days ago

What is it?

Sogou C++ Workflow is a C++ engine for back-end services that combines asynchronous networking with parallel computing. Users compose tasks into series, parallel and arbitrary DAG structures, so network requests, computing jobs and file IO can all run in the same flow.

The framework includes built-in asynchronous clients for HTTP, Redis, MySQL (including MariaDB and TiDB) and Kafka, and an HTTP server API that can be started in a few lines. It also supports user-defined protocols for building custom clients, servers and RPC systems, along with service governance and load balancing for micro service setups.

The project targets Linux, macOS, Windows (via a separate branch using IOCP) and Android. It requires C++11 and OpenSSL 1.1 or later on the master branch, with no dependency on boost or asio. The Kafka protocol additionally needs lz4, zstd and snappy.

Key features

  • 01Builds series, parallel and arbitrary DAG task graphs.
  • 02Includes asynchronous clients for HTTP, Redis, MySQL and Kafka.
  • 03Lets you build HTTP servers with a short piece of code.
  • 04Supports user-defined protocols for custom clients, servers and RPC.
  • 05Runs network, computing and file IO tasks in the same workflow.
  • 06Provides service governance and load balancing features.

Use cases

  • Building high-concurrency back-end services that mix network calls and CPU-bound work.
  • Orchestrating multiple asynchronous API or database calls with dependencies between them.
  • Creating custom RPC systems on top of a user-defined protocol.
  • Developing micro service components in C++ with built-in load balancing.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/sogou/workflow
  2. 2

    Enter the project directory and build the library

    cd workflow make
  3. 3

    Build the tutorial examples

    cd tutorial make

Things to know

  • Master branch requires OpenSSL 1.1 or above, unless you use the nossl branch.
  • Kafka support needs extra compression libraries (lz4, zstd, snappy) installed.
  • Windows support lives in a separate branch rather than the main codebase.

In collections

Topics

FAQ

What is workflow?
A C++11 parallel computing and asynchronous networking framework used in Sogou's back-end services, for building DAG-based task workflows. Sogou C++ Workflow is a C++ engine for back-end services that combines asynchronous networking with parallel computing. Users compose tasks into series, parallel and arbitrary DAG structures, so network requests, computing jobs and file IO can all run in the same flow.
Is workflow free to use? What license does it have?
workflow is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is workflow still maintained?
Actively maintained. The last commit to workflow was on Oct 22, 2026.
What can I use workflow for?
Building high-concurrency back-end services that mix network calls and CPU-bound work. Orchestrating multiple asynchronous API or database calls with dependencies between them. Creating custom RPC systems on top of a user-defined protocol. Developing micro service components in C++ with built-in load balancing.
How do I install workflow?
Clone the repository: git clone https://github.com/sogou/workflow Enter the project directory and build the library: cd workflow make Build the tutorial examples: cd tutorial make
Where can I get workflow?
The source code and installation instructions are on GitHub: https://github.com/sogou/workflow

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects