Tag:swoole

  • PHP uses spool to write a simple echo server example

    Time:2021-4-22

    This article describes a simple echo server written by PHP using spool. The details are as follows: server.php The code is as follows: <?php class EchoServer { protected $serv = null; public function __construct() { $this->serv = new swoole_server(‘0.0.0.0’, 8888); //Configuration parameters $this->serv->set(array( ‘worker_num’ => 4, ‘daemonize’ => 0, )); //Register callback function $this->serv->on(‘start’, array($this, […]

  • Case study on asynchronous processing of time-consuming tasks using task process in PHP spool

    Time:2021-4-21

    This paper introduces the asynchronous processing of time-consuming tasks using task process in PHP spool. The details are as follows: As we know, there are two major processes in spool, namely, master master process and manager management process. In the master main process, there will be a main reactor thread and multiple reactor threads, which […]

  • HTTP in PHP spool_ Case analysis of server configuration and usage

    Time:2021-4-20

    In this paper, an example is given to show how to use HTTP in PHP spool_ The configuration and usage of server. The details are as follows: A spool is provided for us in spool_ http_ Server class, convenient for us to handle HTTP requests. However, its support for HTTP protocol is not complete, so […]

  • Example of creating and using subprocess in process module of PHP spool

    Time:2021-4-19

    This paper introduces the creation and operation of sub process in the process module of PHP spool. The details are as follows: Swoole provides us with a process management module process to replace the pcntl extension of PHP, which is convenient for us to create processes, manage processes, and communicate between processes. Spool provides two […]

  • Official release of Swoft 2.0.6

    Time:2020-5-19

    What is soft? Swoft is a PHP microservice collaboration framework based on swoole extension. Like go, swoft has built-in co process network server and common co process clients, which are memory resident and do not rely on traditional php-fpm. There are cooperative operation modes similar to go language, flexible annotation similar to spring cloud framework, […]

  • Thinkphp5.0 framework combined with swoole development to realize websocket online chat case explanation

    Time:2020-4-25

    In this paper, an example is given to illustrate the implementation of websocket online chat case based on thinkphp5.0 framework and swoole. To share with you for your reference, as follows: To use swoole in ThinkPHP, you need to install the think swoole composer package, provided that the system has installed the swoole PECL extension […]

  • Detailed explanation of swoole’s task case of asynchronous delivery

    Time:2020-4-24

    An example of this paper describes the implementation of asynchronous delivery task in swoole. To share with you for your reference, as follows: [usage scenario] Swoolle’s task module can be used to do some asynchronous slow tasks and time-consuming scenarios. For example, webim sends broadcast and email. After these tasks are left to the task […]

  • Example of implementing real-time asynchronous task queue with PHP extended swoole

    Time:2020-2-24

    The example of this paper describes how to extend swoole in PHP to realize real-time asynchronous task queue. To share with you for your reference, as follows: If want to send 100 mail, for circulates 100 times, the user rises directly, what break a website! But in fact, we are likely to have more than […]

  • PHP process: go + Chan + defer

    Time:2020-2-24

    Swoole4byPHPLanguage provides powerfulCSPCo programming mode. The bottom layer provides3Key words, can easily achieve all kinds of functions. Swoole4ProvidedPHP AssociationGrammar fromGolangIn this directionGODevelopment team Tribute PHP+SwooleThe process can work withGolangWell complemented.GolangStatic language, rigorous and powerful, with good performance,PHP+Swoole: dynamic language, flexible and easy to use This article is based onSwoole-4.2.9andPHP-7.2.9Edition Key word go: create a process […]

  • Using docker / docker compose to deploy software applications

    Time:2020-2-23

    Swoft The first high-performance PHP full stack framework based on swoole native orchestration in the new era, built-in orchestration network server and commonly used orchestration client, resident in memory, independent of traditional php-fpm, fully asynchronous non blocking IO implementation, similar to synchronous client writing to achieve asynchronous client use, no complex asynchronous callback, no tedious […]

  • Using swoole for system monitoring

    Time:2020-2-22

    In general, we need to monitor a certain service of the server to make sure that the service is running normally. In general, we can use Linux to plan tasks, but the minimum execution time interval of the planned tasks is seconds, which often can not meet our requirements. At this time, the MS timer […]

  • Light PHP high performance PHP framework based on swoole

    Time:2020-2-20

    ?Light-phpIt is a high-performance PHP framework based on swoole, with lightweight encapsulation and ease of use, which makes it perform well in small and medium-sized high-performance projects. directory Environmental requirements Installation tutorial configuration file Route middleware Controller hook Task task WebSocket data base Pressure test Environmental requirements rely on Explain PHP >= 7.2 Recommendation 7.2 […]