Home > Article > PHP Framework > what php workerman can do
php workermanWhat can you do?
Workerman is an open source high-performance PHP socket service framework developed purely in PHP.
Workerman is not reinventing the wheel. It is not an MVC framework, but a lower-level and more general socket service framework. You can use it to develop tcp agents, ladder agents, game servers, mail servers, and 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 that PHP can only do WEB.
In fact, Workerman is similar to a PHP version of nginx, and the core is also multi-process Epoll non-blocking IO. Each Workerman process can maintain tens of thousands of concurrent connections. Because it resides in memory, it does not rely on containers such as Apache, nginx, and php-fpm, and has ultra-high performance. It also 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
Workerman is different from the traditional MVC framework. Workerman can not only be used for web development, but also has broader application fields, such as instant messaging. Classes, Internet of Things, games, service management, other servers or middleware, this undoubtedly greatly improves the vision of PHP developers. There is currently a shortage of PHP developers in these fields. If you want to have your own technical advantages in the PHP field, are not satisfied with the daily work of adding, deleting, modifying, and checking, or want to develop in the direction of an architect or a technical expert, Workerman is very worthwhile. A framework for learning. It is recommended that developers not only use it, but also develop their own open source projects based on Workerman to improve their skills and increase their influence. For example, the Beanbun multi-process web crawler framework is a good example, and it has received many praises shortly after it was launched.
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.
2, Internet of Things
For example, Workerman communicates with printers, communicates with microcontrollers, smart bracelets, smart homes, shared bicycles, etc.
3. Game server category
such as chess and card games, MMORPG games, etc.
4. SOA service
Use Workerman to encapsulate different functional units of the existing business and provide a unified interface to the outside world in the form of services to achieve system loose coupling, easy maintenance, high availability, Easy to stretch.
5. Other server software
For example, 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
For example, 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.
For more workerman related technical articles, please visit the workerman Getting Started Tutorial column!
The above is the detailed content of what php workerman can do. For more information, please follow other related articles on the PHP Chinese website!