swoole:php language asynchronous, parallel, high-performance network communication framework, written in pure C, provides the PHP language of asynchronous multi-threaded server, asynchronous TCP/UDP network client, asynchronous MySQL, database connection pool, asynctask, Message Queuing, MS Timer, Asynchronous file read-write, asynchronous DNS query.
Swoole redefined PHP, the official website said. A bit difficult to understand, in fact, easy to use C extension itself is a major feature of PHP itself. The official website said, it may be to let people in a new way of thinking to see PHP, to use PHP. Swoole can give you a chance to get out of writing a web line and go to the end, and with C extension, performance is excellent. PHP can write services, the application will be more extensive. PHP is still the original PHP, just grow out on the wings. Redefined, PHP is not grassroots, there is no grassroots language only grassroots people.
Rango himself also said that Swoole may not be the ultimate solution to network programming, Swoole improves operational efficiency while preserving PHP's high development efficiency.
I temporarily can not skillfully use C language, here only to record their own in the use of swoole in some of the experience, with the foot to Swoole do a little advertising, good things to share.
Introduce two good things first.
1, Swoole_http_server,swoole in the swoole_server based on the implementation of the HTTP server. Some people will ask, there is nginx, what is the use of this. Sure, it's not a good thing to be static, but it makes PHP and HTTP very well fused, not through a variety of CGI, and is good for dynamic Web services.
2, Swoole_websocket_server,swoole in swoole_http_server based on the implementation of the WebSocket server, a good docking h5. The internal implementation of the WebSocket protocol, callback interface only need to write a handshake after the logic is OK, increase the development efficiency, running speed is certainly not bad. Long connections are not dreams, and they are easy.
Previously used Erlang for game server development, but PHP has not been left behind. So take Swoole_websocket_server first.
Also, be sure to use their own enough to like, do not like it is difficult to go deep, this is to see Rango blog sentiment. Swoole at the time of birth, often to contrast with node, which in itself is not a big mistake. Because likes, therefore cannot endure, therefore must diligently break through, then can progress. Open the Swoole tour, Swoole.