Sogou C++ Workflow is an enterprise-style C++ engine for HTTP servers, async clients, DAG workflows, and parallel compute used in Sogou’s online backends.
Overview
Sogou C++ Workflow is a C++ programming engine for back-end services that combines asynchronous networking with parallel computing. Sogou uses it across search, input method, and advertising workloads. It targets typical C++ server development with a relatively lightweight design.
You can stand up an HTTP server with a few lines, run asynchronous clients for HTTP, Redis, MySQL, and Kafka, define custom RPC-style protocols, and compose series, parallel, and arbitrary DAG task graphs. Computing tasks can share the same flow as network and file IO tasks, and Linux file IO is treated as high-performance asynchronous work.
Built-in pieces include service governance and load balancing, timers, counters, resource pools, modules, and connection context helpers. Tasks cover communication, computation, file IO, timers, and counters, organized through factories into series, parallel, or DAG structures with shared series context between steps.
The design emphasizes explicit callbacks, minimal thread blocking, and lifecycle rules where tasks live until callbacks finish. It supports Linux, macOS, Windows, Android, many CPU architectures, OpenSSL or BoringSSL, optional Kafka compression dependencies, and C++11 without Boost or Asio.
Key features
- HTTP server and async HTTP client
- Redis, MySQL, and Kafka clients
- User-defined protocol RPC
- Series, parallel, and DAG flows
- Parallel compute task scheduling
- Async Linux file IO tasks
- Built-in service governance
- Algorithm factory for sort and reduce
Use cases
- High-concurrency HTTP microservices
- Complex mixed compute and network flows
- Custom RPC client and server stacks
- Parallel wget-style fan-out downloads