A Go framework for distributed systems covering RPC, service discovery, messaging, storage, config, plus agents, tools and workflows.
sogou/srpc
C++ RPC framework built on Sogou's Workflow engine, supporting SRPC, bRPC, Thrift and tRPC protocols on Linux, macOS and Windows.
- Stars
- 2,142
- Forks
- 411
- Open issues
- 34
- Last commit
- 7 hours ago
What is it?
SRPC is an RPC framework written in C++ on top of Sogou's Workflow library. It serves multiple wire protocols (SRPC, bRPC, Thrift and tRPC) and accepts Protobuf or Thrift IDL definitions, with code generated for both client and server stubs.
Beyond basic calls, it supports JSON, Protobuf and Thrift binary data formats, gzip, zlib, snappy and lz4 compression, and tcp, udp, sctp and TLS transports. HTTP+JSON access lets clients in any language call a service over plain HTTP. Requests can be combined with Workflow's series and parallel primitives, and the framework includes AOP modules that report tracing to OpenTelemetry and metrics to OpenTelemetry or Prometheus.
Key features
- 01Supports SRPC, bRPC, Thrift and tRPC protocols.
- 02Accepts Protobuf and Thrift IDL with generated stubs.
- 03Serves HTTP+JSON so any language can call services.
- 04Compresses payloads with gzip, zlib, snappy or lz4.
- 05Reports tracing to OpenTelemetry and metrics to Prometheus.
Use cases
- Building high-throughput internal microservices in C++.
- Letting bRPC or tRPC services interoperate with a Workflow-based codebase.
- Exposing an RPC service over HTTP+JSON for clients in other languages.
- Adding OpenTelemetry tracing and Prometheus metrics to C++ services.
Quick start
- 1
Install srpc from source or the system package, following the installation guide
- 2
Generate C++ code from example.proto
protoc example.proto --cpp_out=./ --proto_path=./ - 3
Compile the server (Linux)
g++ -o server server.cc example.pb.cc -std=c++11 -lsrpc - 4
Start the server and run the client in another terminal
./server
Things to know
- The quick start compile commands only cover Linux; other systems need the cmake setup from the tutorial.
- The README gives no package-manager install command, so you must build from source or use a system package.
In collections
Topics
FAQ
- What is srpc?
- C++ RPC framework built on Sogou's Workflow engine, supporting SRPC, bRPC, Thrift and tRPC protocols on Linux, macOS and Windows. SRPC is an RPC framework written in C++ on top of Sogou's Workflow library. It serves multiple wire protocols (SRPC, bRPC, Thrift and tRPC) and accepts Protobuf or Thrift IDL definitions, with code generated for both client and server stubs.
- Is srpc free to use? What license does it have?
- srpc is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is srpc still maintained?
- Actively maintained. The last commit to srpc was on Nov 7, 2026.
- What can I use srpc for?
- Building high-throughput internal microservices in C++. Letting bRPC or tRPC services interoperate with a Workflow-based codebase. Exposing an RPC service over HTTP+JSON for clients in other languages. Adding OpenTelemetry tracing and Prometheus metrics to C++ services.
- How do I install srpc?
- Install srpc from source or the system package, following the installation guide Generate C++ code from example.proto: protoc example.proto --cpp_out=./ --proto_path=./ Compile the server (Linux): g++ -o server server.cc example.pb.cc -std=c++11 -lsrpc Start the server and run the client in another terminal: ./server
- Where can I get srpc?
- The source code and installation instructions are on GitHub: https://github.com/sogou/srpc
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A C++11 parallel computing and asynchronous networking framework used in Sogou's back-end services, for building DAG-based task workflows.
Google's language-neutral, platform-neutral format and toolchain for serializing structured data, with a protoc compiler and runtimes for many languages.
A declarative schema language that generates type-safe data models and RPC code for TypeScript, Python, Java, Go, C++ and more from one .skir file.
A lightweight Go framework for building cloud-native microservices with unified HTTP and gRPC transports, middleware, and Protobuf-based code generation.
Java implementation of Apache Dubbo, an RPC and microservice framework for building service communication, discovery and traffic management.