Home > Article > PHP Framework > What is the use of workerman?
Workerman is an open source, high-performance PHP socket service framework developed purely in PHP. (Recommended study: workerman tutorial)
Workerman is not reinventing the wheel. It is not an MVC framework, but a lower-level and more general socket service framework. You You can use it to develop tcp agents, ladder agents, game servers, mail servers, ftp servers, and even develop a php version of redis, php version of database, php version of nginx, php version of php-fpm, etc.
Workerman can be said to be an innovation in the field of PHP, allowing developers to completely get rid of the constraints of PHP only being able to do WEB.
In fact, Workerman is similar to a PHP version of nginx, and the core is also multi-process Epoll non-blocking IO.
Workerman can maintain tens of thousands of concurrent connections per process. Because it resides in memory, it does not rely on containers such as Apache, nginx, and php-fpm, and has ultra-high performance.
Supports TCP, UDP, UNIXSOCKET, long connections, Websocket, HTTP, WSS, HTTPS and other communication protocols as well as various custom protocols. It has many high-performance components such as timers, asynchronous socket clients, asynchronous Mysql, asynchronous Redis, asynchronous HTTP, and asynchronous message queues.
Some application directions of Workerman are as follows:
1. Instant messaging such as web page instant chat, instant message push, WeChat applet, mobile app message push, PC software Message push, etc. [Examples workerman-chat chat room, web message push, tadpole chat room]
2. Internet of Things categories such as Workerman communicating with printers, communicating with microcontrollers, smart bracelets, smart homes, and sharing Bicycles and so on. [Customer cases such as Yilian Cloud, Yibo Times, etc.]
3. Game server categories such as chess and card games, MMORPG games, etc. [Example browserquest-php]
4. SOA service uses Workerman to encapsulate different functional units of existing business and provide a unified interface in the form of services to achieve system loose coupling, easy maintenance, high availability, Easy to stretch. [Example workerman-json-rpc, workerman-thrift]
5. Other server software such as GatewayWorker, PHPSocket.IO, http proxy, sock5 proxy, distributed communication component, distributed variable sharing component, message queue, DNS server, WebServer, CDN server, FTP server, etc.
6. Middleware such as asynchronous MySQL component, asynchronous redis component, asynchronous http component, asynchronous message queue component, asynchronous dns component, file monitoring component, and Many component frameworks developed by third parties, etc.
Obviously it is difficult for the traditional mvc framework to achieve the above functions, so that is why Workerman was born.
The above is the detailed content of What is the use of workerman?. For more information, please follow other related articles on the PHP Chinese website!