后台小程序开发的全方位指南
797
2022-10-18
百度开源C++ RPC框架
sofa-pbrpc
A light-weight RPC implementation of Google's protobuf RPC framework.
Wiki: https://github.com/baidu/sofa-pbrpc/wiki
Features
High performace.Easy to use. Refer to sample code in './sample'.Supports sync call and async call. Refer to './sample/echo'.Supports three level (service/method/request) timeout. Refer to './sample/timeout_sample'.Supports transparent compression. Refer to './sample/compress_sample'.Supports mock test. Refer to './sample/mock_sample'.Supports network flow control.Supports auto connecting and reconnecting.Supports keep alive time of idle connections.Supports statistics for profiling.Supports multi-server load balance and fault tolerance.Supports http protocol.Provides web monitor.Provides python client library.
Dependencies
This lib depends on boost-1.53.0 (only need header), protobuf-2.4.1, snappy and zlib:
boost - http://boost.org/protobuf - http://code.google.com/p/protobuf/snappy - http://code.google.com/p/snappy/zlib - http://zlib-/
ATTENTION: boost header is only needed when compiling the lib, but is not needed for user code.
Extrally, './unit-test' and './sample/mock_sample' also depends on gtest:
gtest - http://code.google.com/p/googletest/
Build
Modify the file './depends.mk' to specify depending libs. The necessary libs are boost, protobuf, snappy, and zlib.Run 'make' to build sofa-pbrpc. The default optimization level is 'O2'. To change it, modify the 'OPT' variable in file './Makefile'.Run 'make install' to install sofa-pbrpc. The default install directory is './output'. To change it, modify the 'PREFIX' variable in file './Makefile'.
For more details, please refer to the wiki Build Guide.
Sample
For sample code, please refer to './sample' and the wiki Quick Start.
Profiling
For Profiling feature, please refer to the wiki Profiling.
Performance
For performace details, please refer to the wiki Performance.
Implementation
For implementation details, please refer to the wiki and file doc/sofa-pbrpc-document.md.
Support
opensearch@baidu.com
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~