Tag:swoole

  • 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 […]

  • Problems caused by installing swoole in multiple versions of PHP

    Time:2020-2-19

    problem First of all, on your computer, Ubuntu has installed many versions of PHP. Second, after your PHP reference is changed, there are many problems that cause multiple versions of extensions to coexistThat is to say, in my place/etc/php/7.1/cliDirectory Then in/usr/lib/phpThe directory will look like this: Use in this casepeclInstallation will occur Module compiled with […]

  • A simple memory resident framework based on swoole

    Time:2020-2-17

    background In uselaravelFramework, find itRouteandDatabase ORMIt’s really very easy to use, but it’s a bit slow overall. It takes about 60ms to execute the controller. So I plan to make a very simple framework with very easy to use routing and orm. So you ‘ll find the one boxRouteandORMThere’s a shadow of laravel. But it […]

  • Mental burden of programming language

    Time:2020-2-16

    Many programming language comparison articles always like to compare the performance, syntax and IO model of various programming languages. This article will compare different programming languages and technologies from the perspective of mental burden. Because I am good at programming language limited, if there is something wrong, welcome to correct. Out of memory For example: […]

  • An asynchronous mqtt client library based on swoole, which can be used to receive or send messages of mqtt protocol

    Time:2020-2-15

    An asynchronous mqtt client library based on swoole can be used to receive or send messages of mqtt protocol. Support QoS 0, QoS 1 and QoS 2. Mqtt version 3.1 and 3.1.1 are supported install composer require try-to/swoole_mqtt Example subscribe.php <?php use TrytoMqtt\Client; require_once __DIR__ . ‘/vendor/autoload.php’; $options = [ ‘clean_session’ => false, ‘client_id’ => […]

  • Get to know swoole first

    Time:2020-2-13

    All for survival If there is any harvest, pleaseAdd a little starIf there is no harvestOpposition No help ReportSanlian Code repository Initial swoole [up] 1、 What is swoole Swoole: PHP asynchronous network communication engine for production environment PHP developers can write high-performance asynchronous concurrent TCP, UDP, UNIX socket, HTTP, websocket services. Swoole can be widely […]

  • Get to know swoole [2]

    Time:2020-2-12

    Next, I’ll get to know swoole first, which is mainly about asynchrony If there is any harvest, pleaseAdd a little starIf there is no harvestOpposition No help ReportSanlian Code repository Get to know swoole [2] 6. Asynchronous task <?php // new $server = new swoole_server(HOST, “9505”,SWOOLE_PROCESS, SWOOLE_SOCK_TCP); //Set the number of worker processes for asynchronous […]

  • Practice swoole [chat room]

    Time:2020-2-11

    You should practice after you understand the concept, or you will be giant baby If there is any harvest, pleaseAdd a little starIf there is no harvestOpposition No help ReportSanlian Code repository Practice swoole [chat room] Online experience Preparation You need to first understand the swoole [1], and understand the basic use of websocket on […]