phpple / php-dubbo-proxy
A dubbo's proxy for php developer, based on dubbo's telnet protocol.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 1
Type:n
Requires
- php: >=5.5
- ext-zookeeper: *
This package is not auto-updated.
Last update: 2024-11-03 10:58:48 UTC
README
This project is designed for call java service based on dubbo.The transport protocol is telnet.
Process
-
Find the provider from zookeeper.
-
Build socket connect to the provider's host and port.
-
Call the telnet command invoke, such as
invoke com.phpple.service.FooService.bar('hello,world')\n
. -
Read from the socket's response, and parse it.
Requirement
Install
composer require phpple/php-dubbo-proxy
Example
use \phpple\php_dubbo_proxy\Proxy; $service = Proxy::getService('com.phpple.service.FooService', array( 'registry' => '127.0.0.1:2181', 'version' => '1.0.0' )); $ret = $service->bar('hello,world'); var_dump($ret);