workflow
C++ Parallel Computing and Asynchronous Networking Framework
High-performance C++ server framework from Sogou that models all server operations as async tasks, HTTP, Redis, MySQL, Kafka, that can be chained or run in parallel as directed graphs.
Sogou C++ Workflow is a programming framework for building high-performance server software in C++. It was developed by Sogou, a major Chinese technology company, and powers all of their back-end online services, including search, cloud input methods, and online advertising. According to the README, these services collectively handle more than 10 billion requests every day.
The core idea of the framework is that almost every operation a server needs to perform, whether it is sending an HTTP request, querying a database, reading a file from disk, or running a heavy calculation, can be expressed as a "task." Tasks can be chained together in sequences or run in parallel. The framework supports arbitrary graph-shaped flows of tasks, known as DAGs (directed acyclic graphs), where one task's result feeds into the next in a precise order. All tasks run asynchronously, meaning the program does not sit idle waiting for one thing to finish before starting the next.
Out of the box, the framework supports networking with HTTP, Redis (a fast data store), MySQL, and Kafka (a message streaming system) without requiring additional libraries for those protocols. It also includes built-in load balancing and service governance tools, which are features that help distribute traffic across multiple servers and keep services running reliably. File operations on Linux systems are also handled as asynchronous tasks.
The framework is built to run on Linux, macOS, and Windows, and works on a range of processor types. It requires a C++11-capable compiler (C++11 is a widely used version of the C++ language standard from 2011) and has no major external dependencies beyond an SSL library for encrypted connections. Packages are available through standard Linux package managers on Debian-based and Fedora-based distributions.
Where it fits
- Build a high-throughput HTTP server that handles millions of daily requests using non-blocking async task chains.
- Chain Redis, MySQL, and HTTP calls into a single async workflow so no step blocks the others while waiting for a response.
- Run parallel data-processing pipelines using directed acyclic graphs of tasks inside a C++ backend service.
- Add built-in load balancing to a backend service without integrating any additional libraries.