PHP parallel and asynchronous extended coroutine C Swoole (attached link)

PHP asynchronous, parallel, high performance network communications engine, using pure C language, there is provided an asynchronous PHP language multithreaded servers , asynchronous TCP / UDP network client , asynchronously the MySQL , asynchronous the Redis , database connection pooling , the AsyncTask , message queue , ms timers , asynchronous file read and write , asynchronous DNS queries . Swoole built Http / WebSocket server / client , Http2.0 server .

Swoole underlying built-in non-blocking asynchronous, multi-threaded server IO network. PHP programmers can only handle event callbacks, you do not care about the underlying. And Nginx/ Tornado/ Node.jsframeworks whole different asynchronous, Swoole both support full asynchronous, synchronous support also.

In addition to the support asynchronous IO, Swoole designed multiple concurrent data structures and IPC communication mechanism for multi-process mode PHP can greatly simplify the more complicated process of programming work. These include the concurrent atomic counter , complicated by the HashTable , Channel , Lock , inter-process communication IPC feature-rich characteristics.

Swoole start from version 2.0 supports built-coroutine , you can use the code fully synchronous asynchronous program. PHP code without any additional keyword, automatically scheduling the underlying coroutine, asynchronous.

Swoole can be widely used in the Internet, mobile communications, enterprise software, online games, networking, car networking, smart home and other areas. Use PHP+Swooleas a network communications framework, so that the efficiency of enterprise IT can greatly enhance the R & D team, more focused on the development of innovative products.

Swoole is a free open source free software license agreement is Apache2.0. Businesses and individual developers are free to use Swoole code, modified and made over Swoole be used for commercial products, without having to open source

Server

 

 Client

 

 Http Server

 

 WebSocket server

 

 

 That's all for the article, thank you for your hard work to read. You can help focus this column regularly updated articles, here also prepared some documentation for everyone!

Guess you like

Origin www.cnblogs.com/heyue0117/p/11982958.html