- Notifications
You must be signed in to change notification settings - Fork1
wangzz719/protobuf_http_rpc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
protobuf_tornado_rpc 是一个基于 protobuf 和 tornado 的 rpc 框架
- 框架使用 google protobuf rpc 协议
- 消息的传输位于 http 层,使用 tornado 作为服务器实现
proto 文件的编写规则参见:google protobuf
在使用PRC协议时,必须加上option py_generic_services = true;
可选项,要不然编译器不会生成包含 connect_server 函数的 Service 描述
protoc --python_out={output_dir} {proto_file}
- 在本项目目录下运行
buildout
(使用pip install zc.buildout
安装buildout
命令) - 启动 test server,运行命令:
bin/python examples/test_service.py
- 调用 test server 服务接口,运行命令:
bin/python examples/test_client.py