GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vyag/brpc: Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called "baidu-rpc" inside Baidu.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

704 Commits
704 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bazel
bazel
 
 
cmake
cmake
 
 
docs
docs
 
 
example
example
 
 
java
java
 
 
python
python
 
 
src
src
 
 
test
test
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
BUILD
BUILD
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
README_cn.md
README_cn.md
 
 
WORKSPACE
WORKSPACE
 
 
build_in_travis_ci.sh
build_in_travis_ci.sh
 
 
config.h.in
config.h.in
 
 
config_brpc.sh
config_brpc.sh
 
 
glog.BUILD
glog.BUILD
 
 
leveldb.BUILD
leveldb.BUILD
 
 

Repository files navigation

中文版

Build Status

brpc

A industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services, called "baidu-rpc" inside Baidu. Only C++ implementation is opensourced right now.

You can use it to:

  • Build a server that can talk in multiple protocols (on same port), or access all sorts of services
    • restful http/https, h2/h2c (compatible with grpc, will be opensourced). using http in brpc is much more friendly than libcurl.
    • redis and memcached, thread-safe, more friendly and performant than the official clients
    • rtmp/flv/hls, for building live-streaming services.
    • hadoop_rpc (may be opensourced)
    • rdma support (will be opensourced)
    • all sorts of protocols used in Baidu: baidu_std, streaming_rpc, hulu_pbrpc, sofa_pbrpc, nova_pbrpc, public_pbrpc, ubrpc, and nshead-based ones.
    • Access protobuf-based protocols with HTTP+json, probably from another language.
    • Build HA distributed services using an industrial-grade implementation of RAFT consensus algorithm which is opensourced at braft
  • Servers can handle requests synchronously or asynchronously.
  • Clients can access servers synchronously, asynchronously, semi-synchronously, or use combo channels to simplify sharded or parallel accesses declaratively.
  • Debug services via http, and run cpu, heap and contention profilers.
  • Get better latency and throughput.
  • Extend brpc with the protocols used in your organization quickly, or customize components, including naming services (dns, zk, etcd), load balancers (rr, random, consistent hashing)

Try it!

  • Read overview to know where brpc can be used and its advantages.
  • Read building steps to get started and play with examples.
  • Docs:
    • Performance benchmark
    • bvar
      • bvar_c++
    • bthread
      • bthread or not
      • thread-local
      • Execution Queue
    • Client
      • Basics
      • Error code
      • Combo channels
      • Access HTTP
      • Access UB
      • Streaming RPC
      • Access redis
      • Access memcached
      • Backup request
      • Dummy server
    • Server
      • Basics
      • Build HTTP service
      • Build Nshead service
      • Debug server issues
      • Server push
      • Avalanche
      • Live streaming
      • json2pb
    • Builtin Services
      • status
      • vars
      • connections
      • flags
      • rpcz
      • cpu_profiler
      • heap_profiler
      • contention_profiler
    • Tools
      • rpc_press
      • rpc_replay
      • rpc_view
      • benchmark_http
      • parallel_http
    • Others
      • IOBuf
      • Streaming Log
      • FlatMap
      • brpc外功修炼宝典(training material)
      • A tutorial on building large-scale services(training material)
    • RPC in depth
      • New Protocol
      • Atomic instructions
      • IO
      • Threading Overview
      • Load Balancing
      • Locality-aware
      • Consistent Hashing
      • Memory Management
      • Timer keeping
      • bthread_id
    • Use cases inside Baidu
      • 百度地图api入口
      • 联盟DSP
      • ELF学习框架
      • 云平台代理服务

Contribute code

If you can fix any of the issues or add new features, you're welcome to send the PR to us. If the PR is accepted, your contribution will be scored from 0 to 5 points according to the difficulty and quality (higher is better). If you accumulate 10 points, you can contact us for interviewing opportunities or recommendation letter for your future jobs.

Make sure your code meets following requirements before submitting the PR:

  • The code conforms to google C++ coding style and is indented by 4 spaces.
  • The code appears where it should be. For example the code to support an extra protocol should not be put in general classes like server.cpp, channel.cpp, while a general modification would better not be hidden inside a very specific protocol.
  • Has unittests.

Check following items after submitting the PR:

  • Compilations and unittests in travis-ci are passed.

About

Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called "baidu-rpc" inside Baidu.

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.