README.md 6.58 KB
Newer Older
gejun's avatar
gejun committed
1 2
[中文版](README_cn.md)

3
[![Build Status](https://travis-ci.org/apache/incubator-brpc.svg?branch=master)](https://travis-ci.org/apache/incubator-brpc)
gejun's avatar
gejun committed
4

5
# ![brpc](docs/images/logo.png)
6

Ge Jun's avatar
Ge Jun committed
7
An industrial-grade RPC framework used throughout [Baidu](http://ir.baidu.com/phoenix.zhtml?c=188488&p=irol-irhome), 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.
8

9
You can use it to:
gejun's avatar
gejun committed
10
* Build a server that can talk in multiple protocols (**on same port**), or access all sorts of services
Ge Jun's avatar
Ge Jun committed
11
  * restful http/https, [h2](https://http2.github.io/http2-spec)/[gRPC](https://grpc.io). using http/h2 in brpc is much more friendly than [libcurl](https://curl.haxx.se/libcurl/). Access protobuf-based protocols with HTTP/h2+json, probably from another language.
wangxuefeng's avatar
wangxuefeng committed
12
  * [redis](docs/en/redis_client.md) and [memcached](docs/en/memcache_client.md), thread-safe, more friendly and performant than the official clients.
13
  * [rtmp](https://github.com/brpc/brpc/blob/master/src/brpc/rtmp.h)/[flv](https://en.wikipedia.org/wiki/Flash_Video)/[hls](https://en.wikipedia.org/wiki/HTTP_Live_Streaming), for building [streaming services](https://github.com/brpc/media-server).
gejun's avatar
gejun committed
14 15
  * hadoop_rpc (may be opensourced)
  * [rdma](https://en.wikipedia.org/wiki/Remote_direct_memory_access) support (will be opensourced)
wangxuefeng's avatar
wangxuefeng committed
16 17
  * [thrift](docs/en/thrift.md) support,  thread-safe, more friendly and performant than the official clients.
  * all sorts of protocols used in Baidu: [baidu_std](docs/cn/baidu_std.md), [streaming_rpc](docs/en/streaming_rpc.md), hulu_pbrpc, [sofa_pbrpc](https://github.com/baidu/sofa-pbrpc), nova_pbrpc, public_pbrpc, ubrpc and nshead-based ones.
gejun's avatar
gejun committed
18
  * Build [HA](https://en.wikipedia.org/wiki/High_availability) distributed services using an industrial-grade implementation of [RAFT consensus algorithm](https://raft.github.io) which is opensourced at [braft](https://github.com/brpc/braft)
gejun's avatar
gejun committed
19 20
* Servers can handle requests [synchronously](docs/en/server.md) or [asynchronously](docs/en/server.md#asynchronous-service).
* Clients can access servers [synchronously](docs/en/client.md#synchronus-call), [asynchronously](docs/en/client.md#asynchronous-call), [semi-synchronously](docs/en/client.md#semi-synchronous-call), or use [combo channels](docs/en/combo_channel.md) to simplify sharded or parallel accesses declaratively.
gejun's avatar
gejun committed
21
* Debug services [via http](docs/en/builtin_service.md), and run  [cpu](docs/cn/cpu_profiler.md), [heap](docs/cn/heap_profiler.md) and [contention](docs/cn/contention_profiler.md) profilers.
22
* Get [better latency and throughput](docs/en/overview.md#better-latency-and-throughput).
23
* [Extend brpc](docs/en/new_protocol.md) with the protocols used in your organization quickly, or customize components, including [naming services](docs/cn/load_balancing.md#命名服务) (dns, zk, etcd), [load balancers](docs/cn/load_balancing.md#负载均衡) (rr, random, consistent hashing)
24

gejun's avatar
gejun committed
25 26
# Try it!

27
* Read [overview](docs/en/overview.md) to know where brpc can be used and its advantages.
28
* Read [getting started](docs/cn/getting_started.md) for building steps and play with [examples](https://github.com/brpc/brpc/tree/master/example/).
gejun's avatar
gejun committed
29
* Docs:
gejun's avatar
gejun committed
30 31
  * [Performance benchmark](docs/cn/benchmark.md)
  * [bvar](docs/en/bvar.md)
gejun's avatar
gejun committed
32 33 34 35 36 37
    * [bvar_c++](docs/cn/bvar_c++.md)
  * [bthread](docs/cn/bthread.md)
    * [bthread or not](docs/cn/bthread_or_not.md)
    * [thread-local](docs/cn/thread_local.md)
    * [Execution Queue](docs/cn/execution_queue.md)
  * Client
gejun's avatar
gejun committed
38 39 40
    * [Basics](docs/en/client.md)
    * [Error code](docs/en/error_code.md)
    * [Combo channels](docs/en/combo_channel.md)
Ge Jun's avatar
Ge Jun committed
41
    * [Access http/h2](docs/en/http_client.md)
Ge Jun's avatar
Ge Jun committed
42
    * [Access gRPC](docs/en/http_derivatives.md#h2grpc)
43
    * [Access thrift](docs/en/thrift.md#client-accesses-thrift-server) 
gejun's avatar
gejun committed
44
    * [Access UB](docs/cn/ub_client.md)
gejun's avatar
gejun committed
45 46 47 48 49
    * [Streaming RPC](docs/en/streaming_rpc.md)
    * [Access redis](docs/en/redis_client.md)
    * [Access memcached](docs/en/memcache_client.md)
    * [Backup request](docs/en/backup_request.md)
    * [Dummy server](docs/en/dummy_server.md)
gejun's avatar
gejun committed
50
  * Server
gejun's avatar
gejun committed
51
    * [Basics](docs/en/server.md)
Ge Jun's avatar
Ge Jun committed
52
    * [Serve http/h2](docs/en/http_service.md)
Ge Jun's avatar
Ge Jun committed
53
    * [Serve gRPC](docs/en/http_derivatives.md#h2grpc)
Ge Jun's avatar
Ge Jun committed
54
    * [Serve thrift](docs/en/thrift.md#server-processes-thrift-requests)
55
    * [Serve Nshead](docs/cn/nshead_service.md)
gejun's avatar
gejun committed
56
    * [Debug server issues](docs/cn/server_debugging.md)
gejun's avatar
gejun committed
57
    * [Server push](docs/en/server_push.md)
gejun's avatar
gejun committed
58
    * [Avalanche](docs/cn/avalanche.md)
59
    * [Auto ConcurrencyLimiter](docs/cn/auto_concurrency_limiter.md)
60
    * [Media Server](https://github.com/brpc/media-server)
gejun's avatar
gejun committed
61
    * [json2pb](docs/cn/json2pb.md)
gejun's avatar
gejun committed
62 63 64
  * [Builtin Services](docs/en/builtin_service.md)
    * [status](docs/en/status.md)
    * [vars](docs/en/vars.md)
gejun's avatar
gejun committed
65 66 67 68 69 70 71 72 73 74 75 76
    * [connections](docs/cn/connections.md)
    * [flags](docs/cn/flags.md)
    * [rpcz](docs/cn/rpcz.md)
    * [cpu_profiler](docs/cn/cpu_profiler.md)
    * [heap_profiler](docs/cn/heap_profiler.md)
    * [contention_profiler](docs/cn/contention_profiler.md)
  * Tools
    * [rpc_press](docs/cn/rpc_press.md)
    * [rpc_replay](docs/cn/rpc_replay.md)
    * [rpc_view](docs/cn/rpc_view.md)
    * [benchmark_http](docs/cn/benchmark_http.md)
    * [parallel_http](docs/cn/parallel_http.md)
gejun's avatar
gejun committed
77
  * Others
gejun's avatar
gejun committed
78 79
    * [IOBuf](docs/en/iobuf.md)
    * [Streaming Log](docs/en/streaming_log.md)
gejun's avatar
gejun committed
80
    * [FlatMap](docs/cn/flatmap.md)
81 82
    * [brpc外功修炼宝典](docs/cn/brpc_intro.pptx)(training material)
    * [A tutorial on building large-scale services](docs/en/tutorial_on_building_services.pptx)(training material)
old-bear's avatar
old-bear committed
83
    * [brpc internal](docs/en/brpc_internal.pptx)(training material)
gejun's avatar
gejun committed
84
  * RPC in depth
gejun's avatar
gejun committed
85 86 87 88
    * [New Protocol](docs/en/new_protocol.md)
    * [Atomic instructions](docs/en/atomic_instructions.md)
    * [IO](docs/en/io.md)
    * [Threading Overview](docs/en/threading_overview.md)
gejun's avatar
gejun committed
89 90 91 92 93 94 95 96 97 98 99
    * [Load Balancing](docs/cn/load_balancing.md)
    * [Locality-aware](docs/cn/lalb.md)
    * [Consistent Hashing](docs/cn/consistent_hashing.md)
    * [Memory Management](docs/cn/memory_management.md)
    * [Timer keeping](docs/cn/timer_keeping.md)
    * [bthread_id](docs/cn/bthread_id.md)
  * Use cases inside Baidu
    * [百度地图api入口](docs/cn/case_apicontrol.md)
    * [联盟DSP](docs/cn/case_baidu_dsp.md)
    * [ELF学习框架](docs/cn/case_elf.md)
    * [云平台代理服务](docs/cn/case_ubrpc.md)
100 101

# Contribute code
102
Please refer to [here](CONTRIBUTING.md).
103

zhujiashun's avatar
zhujiashun committed
104 105 106
# Feedback and Getting involved
* Report bugs, ask questions or give suggestions by [Github Issues](https://github.com/apache/incubator-brpc/issues)
* Subscribe mailing list(dev-subscribe@brpc.apache.org) to get updated with the project