Skip to content
Permalink
Browse files
修改readme,增加version参数
  • Loading branch information
JoeCao committed Apr 10, 2015
1 parent 8b97a14 commit 561aeeba59ee1a8bb8e36f4618d57188c7c5fd0a
Showing 1 changed file with 9 additions and 2 deletions.
@@ -6,16 +6,18 @@ Python Dubbo Client

### Python调用Dubbo接口的jsonrpc协议
请使用dubbo-rpc-jsonrpc 并在dubbo中配置protocol为jsonrpc协议
参考 https://github.com/ofpay/dubbo-rpc-jsonrpc

### 在客户端实现负载均衡,服务发现
通过注册中心的zookeeper,获取服务的注册信息
然后通过代理实现负载均衡算法,调用服务端
支持Version、Group设置

### Example
```python
service_interface = 'com.ofpay.demo.api.UserProvider'
registry = ZookeeperRegistry('172.19.65.33:2181')
user_provider = DubboClient(service_interface, registry)
user_provider = DubboClient(service_interface, registry, version='1.0')
for i in range(1000):
try:
print user_provider.getUser('A003')
@@ -28,4 +30,9 @@ Python Dubbo Client
except DubboClientError, client_error:
print client_error
time.sleep(5)
```
```

### TODO
优化性能
支持Retry参数
支持RoundRobin的调用

0 comments on commit 561aeeb

Please sign in to comment.