Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
add the examle
  • Loading branch information
kuaikuaikim authored Feb 21, 2017
1 parent 72be233 commit 0bee559
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ $HelloService = $dubboCli->getService("com.dubbo.demo.HelloService","1.0.0",null
$ret = $HelloService->hello("dubbo php client");
echo $ret;
```


###example
```bash
php -f example.php
```

###dubbo-php-client 中文版说明
[DUBBO](https://github.com/alibaba/dubbo)是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,是阿里巴巴SOA服务化治理方案的核心框架
这是dubbo的唯一php客户端,目前只支持jsonRPC协议,将来会支持多种协议。你可以查看我之前写的[dubbo-jsonRPC-demo](https://github.com/quickj/dubbo_jsonrpc_demo)例子。
#####注意:
使用之前你必须安装和启动dubbo,zookeeper,注册服务者。
#####建议:
如果你想设置zookeeper watcher(zookeeper会主动通知消费者)来监听zookeeper node节点地变化,你必须得有一个一直运行地容器(java nodejs python等原生支持).但lamp,lnmp这种模式,PHP不是守护进程。
我们发现了一个不错的PHP容器[Swoole](http://www.swoole.com/)。Swoole:PHP语言的异步、并行、高性能网络通信框架,使用纯C语言编写,提供了PHP语言的异步多线程服务器.

###安装
如果你还没安装php的[zookeeper扩展](http://pecl.php.net/package/zookeeper),需要
Expand Down Expand Up @@ -89,4 +89,8 @@ $dubboCli = new dubboClient($options);
$HelloService = $dubboCli->getService("com.dubbo.demo.HelloService","1.0.0",null);
$ret = $HelloService->hello("dubbo php client");
echo $ret;
```
```
###例子
```bash
php -f example.php
```

0 comments on commit 0bee559

Please sign in to comment.