Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
751efb36
Commit
751efb36
authored
7 years ago
by
gejun
Committed by
iCode
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Merge contents of overview.md into README.md"
parents
21992915
94e2ca49
master
0.9.8-rc01
0.9.7
0.9.7-rc03
0.9.7-rc02
0.9.7-rc01
0.9.6
0.9.6-rc03
0.9.6-rc02
0.9.6-rc01
0.9.5
v0.9.0
No related merge requests found
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
README.md
README.md
+0
-0
benchmark.md
docs/cn/benchmark.md
+13
-7
overview.md
docs/cn/overview.md
+0
-0
rpc.png
docs/images/rpc.png
+0
-0
No files found.
README.md
View file @
751efb36
This diff is collapsed.
Click to expand it.
docs/cn/benchmark.md
View file @
751efb36
...
...
@@ -14,25 +14,31 @@
## UB
com组(INF前身)在08年开发的RPC框架,目前仍在百度广泛使用,已被baidu-rpc代替。UB本身不支持protobuf,因此我们以基于UB的nova pb-rpc为代表,这个框架在网盟广泛使用。测试时其代码为:
<https://svn.baidu.com/app/ecom/cm/trunk/pb-rpc>
(r10500)。早期的UB支持CPOOL和XPOOL,分别使用
[
select
](
http://linux.die.net/man/2/select
)
和
[
leader-follower模型
](
http://kircher-schwanninger.de/michael/publications/lf.pdf
)
,后来提供了EPOOL,使用
[
epoll
](
http://man7.org/linux/man-pages/man7/epoll.7.html
)
处理多路连接。鉴于产品线大都是用EPOOL模型,我们的UB配置也使用EPOOL。UB只支持
[
连接池
](
client.md#连接方式
)
,结果用“
**ubrpc_mc**
"指代(mc代表"multiple
connection")。虽然这个名称不太准确(ubrpc是INF在10年使用UB和idlcompiler开发的一个框架),但在本文的语境下,请默认ubrpc = UB。
com组(INF前身)在08年开发的RPC框架,在百度产品线广泛使用,已被baidu-rpc代替。UB的每个请求独占一个连接(连接池),在大规模服务中每台机器都需要保持大量的连接,限制了其使用场景,像百度的分布式系统都不用UB。UB只支持nshead+mcpack协议,也没怎么考虑扩展性,所以增加新协议和新功能往往要调整大段代码,在实践中大部分人“知难而退”了。UB缺乏调试和运维接口,服务的运行状态对用户基本是黑盒,只能靠低效地打日志来追踪问题,服务出现问题时常要拉上维护者一起排查,效率很低。UB有多个变种:
*
ubrpc:INF在10年基于UB开发的RPC框架,用.idl文件(类似.proto)描述数据的schema,而不是手动打包。这个RPC有被使用,但不广泛。
-
nova_pbrpc:网盟在12年基于UB开发的RPC框架,用protobuf代替mcpack作为序列化方法,协议是nshead + user's protobuf。
-
public_pbrpc:INF在13年初基于UB开发的RPC框架,用protobuf代替mcpack作为序列化方法,但协议与nova_pbrpc不同,大致是nshead + meta protobuf。meta protobuf中有个string字段包含user's protobuf。由于用户数据要序列化两次,这个RPC的性能很差,没有被推广开来。
我们以在网盟广泛使用的nova_pbrpc为UB的代表。测试时其代码为
[
r10500
](
https://svn.baidu.com/app/ecom/cm/trunk/pb-rpc
)
。早期的UB支持CPOOL和XPOOL,分别使用
[
select
](
http://linux.die.net/man/2/select
)
和
[
leader-follower模型
](
http://kircher-schwanninger.de/michael/publications/lf.pdf
)
,后来提供了EPOOL,使用
[
epoll
](
http://man7.org/linux/man-pages/man7/epoll.7.html
)
处理多路连接。鉴于产品线大都是用EPOOL模型,我们的UB配置也使用EPOOL。UB只支持
[
连接池
](
client.md#连接方式
)
,结果用“
**ubrpc_mc**
"指代(mc代表"multiple
connection")。虽然这个名称不太准确(见上文对ubrpc的介绍),但在本文的语境下,请默认ubrpc = UB。
## hulu-pbrpc
INF在
2013年开发的pbrpc产品,目前
被baidu-rpc代替,测试时其代码为:
<https://svn.baidu.com/public/tags/hulu/pbrpc/pbrpc_2-0-15-27959_PD_BL>
。hulu-pbrpc只支持单连接,结果用“
**hulu-pbrpc**
"指代。
INF在
13年基于saber(kylin变种)和protobuf实现的RPC框架,hulu在实现上有较多问题:未封装的引用计数,混乱的生命周期,充斥的race conditions和ABA problems,运行质量不可靠,比如短链接从来没有能正常运行过。之后迅速
被baidu-rpc代替,测试时其代码为:
<https://svn.baidu.com/public/tags/hulu/pbrpc/pbrpc_2-0-15-27959_PD_BL>
。hulu-pbrpc只支持单连接,结果用“
**hulu-pbrpc**
"指代。
## baidu-rpc
INF在2014年底开发至今的rpc产品,支持百度内所有协议(不限于protobuf),测试时其代码为:
<https://svn.baidu.com/public/tags/baidu-rpc/baidu-rpc_1-0-199-31906_PD_BL>
(开发请使用@ci-base保持更新)。baidu-rpc既支持单连接也支持连接池,前者的结果用"
**baidu-rpc**
"指代,后者用“
**baidu-rpc_mc**
"指代。
INF在2014年底开发至今的rpc产品,支持百度内所有协议(不限于protobuf),并第一次统一了百度内主要分布式系统的RPC框架。测试时其代码为
[
r31906
](
https://svn.baidu.com/public/tags/baidu-rpc/baidu-rpc_1-0-199-31906_PD_BL
)
(开发请使用@ci-base保持更新)。baidu-rpc既支持单连接也支持连接池,前者的结果用"
**baidu-rpc**
"指代,后者用“
**baidu-rpc_mc**
"指代。
## sofa-pbrpc
PS内部广泛使用的pbrpc产品,在public/sofa-pbrpc和github.com上还有两个sofa-pbrpc版本,咨询sofa-pbrpc的
同学后,确认ps/opensource下的和github上的较新,且会定期同步。故测试使用使用ps/opensource下的版本。测试时其代码为:
<https://svn.baidu.com/ps/opensource/branches/sofa-pbrpc/sofa-pbrpc_1-0-2_BRANCH/>
。sofa-pbrpc只支持单连接,结果用“
**sofa-pbrpc**
”指代。
大搜在13年基于boost::asio和protobuf实现的RPC框架,有多个版本,咨询相关
同学后,确认ps/opensource下的和github上的较新,且会定期同步。故测试使用使用ps/opensource下的版本。测试时其代码为:
<https://svn.baidu.com/ps/opensource/branches/sofa-pbrpc/sofa-pbrpc_1-0-2_BRANCH/>
。sofa-pbrpc只支持单连接,结果用“
**sofa-pbrpc**
”指代。
## apache thrift
thrift是由f
b开发的序列化方法和rpc框架,开源后改名apache thrift,fb自己有一个
[
fbthrift分支
](
https://github.com/facebook/fbthrift
)
,我们使用的是apache thrift。测试时其代码为:
<https://svn.baidu.com/third-64/tags/thrift/thrift_0-9-1-400_PD_BL/>
。thrift没有线程安全的client,所以每个线程中都得建立一个client,使用独立的连接。在测试中thrift其实是占了其他实现的便宜:它的client不需要处理多线程问题。但在真实环境中,thrift的client不方便
。thrift的结果用"
**thrift_mc**
"指代。
thrift是由f
acebook最早在07年开发的序列化方法和rpc框架,包含独特的序列化格式和IDL,支持很多编程语言。开源后改名
[
apache thrift
](
https://thrift.apache.org/
)
,fb自己有一个
[
fbthrift分支
](
https://github.com/facebook/fbthrift
)
,我们使用的是apache thrift。测试时其代码为
[
0.9
](
https://svn.baidu.com/third-64/tags/thrift/thrift_0-9-1-400_PD_BL
)
。thrift的缺点是:代码看似分层清晰,client和server选择很多,但没有一个足够通用,每个server实现都只能解决很小一块场景,每个client都线程不安全,实际使用很麻烦。由于thrift没有线程安全的client,所以每个线程中都得建立一个client,使用独立的连接。在测试中thrift其实是占了其他实现的便宜:它的client不需要处理多线程问题
。thrift的结果用"
**thrift_mc**
"指代。
## grpc
...
...
This diff is collapsed.
Click to expand it.
docs/cn/overview.md
deleted
100644 → 0
View file @
21992915
This diff is collapsed.
Click to expand it.
docs/images/rpc.png
0 → 100644
View file @
751efb36
13.3 KB
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment