Php rpc framework: DoraRPC Dora RPC is the most streamlined RPC based on Swoole's fixed-length Baotou communication protocol.
-
This RPC is based on the most streamlined RPC of the Swoole fixed-length packet header communication protocol.
-
Supports concurrency, monotonic, asynchronous, and synchronization.
-
Currently, only the PHP language version is available, and will be gradually iterated in the future based on the recommendations
-
You can easily and quickly build backend application servers.
-
This open-source interface is used to quickly implement RPC. it is deployed as needed and used for RPC between frontend and backend servers of PHP.
-
Downgrade supporting middleware and services in the future
-
Basic swoole, good performance for large and medium-sized websites
Client code:
$obj = new DoraRPCClient();for ($i = 0; $i < 100000; $i++) { #single $ret = $obj->singleAPI("abc", array(234, $i), true); var_dump($ret); #multi $data = array( "oak" => array("name" => "oakdf", "param" => array("dsaf" => "321321")), "cd" => array("name" => "oakdfff", "param" => array("codo" => "fds")), ); $ret = $obj->multiAPI($data, false); var_dump($ret);}
Server:
$ Server = new DoraRPCServer (); // This must be a class inherited by DoraRPCServer and dowork can work.
Project homepage:Http://www.open-open.com/lib/view/home/1434011480176