swoole,easyswoole,swoole framework

Overview

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads

EasySwoole - A High Performance Swoole Framework

EasySwoole is a distributed, persistent memory PHP framework based on the Swoole extension. It was created specifically for APIs to get rid of the performance penalties associated with process calls and file loading. EasySwoole highly encapsulates the Swoole Server and still maintains the original features of the Swoole server, supports simultaneous monitoring of HTTP, custom TCP, and UDP protocols, allowing developers to write multi-process, asynchronous, and highly available applications with minimal learning cost and effort.

  • Base on Swoole extension
  • Built-in HTTP, TCP, WebSocket,Udp Coroutine Server
  • Global dependency injection container
  • PSR-7 based HTTP message implementation
  • HTTP,TCP, WebSocket, Udp middleware support
  • Scalable high performance RPC
  • Database ORM
  • Mysql, Redis, RPC, HTTP Coroutine Clients
  • Coroutine and asynchronous task delivery
  • Custom user processes
  • RESTful supported
  • High performance router
  • Fast and flexible parameter validator
  • Powerful log component
  • Universal connection pools
  • Remote Console support
  • Crontab Rule Timer support

Doc

ab Test

<?php

namespace App\HttpController;

use EasySwoole\Http\AbstractInterface\Controller;


/**
 * Class Index
 * @package App\HttpController
 */
class Index extends Controller
{
    public function index()
    {
        $this->response()->write('Hello World');
    }
}

1 Core 1G RAM

command : ab -c 100 -n 10000 http://192.168.0.11:9501/

Server Software:        EasySwoole
Server Hostname:        192.168.0.11
Server Port:            9501

Document Path:          /
Document Length:        21 bytes

Concurrency Level:      100
Time taken for tests:   0.652 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      1690000 bytes
HTML transferred:       210000 bytes
Requests per second:    15325.16 [#/sec] (mean)
Time per request:       9.685 [ms] (mean)
Time per request:       0.097 [ms] (mean, across all concurrent requests)
Transfer rate:          2592.05 [Kbytes/sec] received

8 Core 16G RAM

command : ab -c 100 -n 10000 http://192.168.0.4:9501/

Server Software:        EasySwoole
Server Hostname:        192.168.0.4
Server Port:            9501

Document Path:          /
Document Length:        21 bytes

Concurrency Level:      100
Time taken for tests:   0.746 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      1690000 bytes
HTML transferred:       210000 bytes
Requests per second:    66935.97 [#/sec] (mean)
Time per request:       1.149 [ms] (mean)
Time per request:       0.015 [ms] (mean, across all concurrent requests)
Transfer rate:          2265.40 [Kbytes/sec] received

Quick Start

composer require easyswoole/easyswoole=3.4.x
php vendor/bin/easyswoole install
php easyswoole server start

Docker

Get Docker Image

docker pull easyswoole/easyswoole3

Run

docker run -ti -p 9501:9501 easyswoole/easyswoole3
  • WorkerDir: /easyswoole
  • Run Easyswoole : php easyswoole server start

Others

  • Git For Demo

  • QQ交流群

    • VIP群 579434607 (本群需要付费599元)
    • EasySwoole官方一群 633921431(已满)
    • EasySwoole官方二群 709134628(已满)
    • EasySwoole官方三群 932625047(已满)
    • EasySwoole官方四群 779897753(已满)
    • EasySwoole官方五群 853946743
  • 商业支持:

Comments
  • RedisCluster 部署,在获取get的时候卡住不动

    RedisCluster 部署,在获取get的时候卡住不动

    redis主要存储图片的base64值。 业务是循环发送群(群,文字等)。图片存储redis读取redis。 public function hander(){ try { $redis = new \EasySwoole\Redis\RedisCluster(new \EasySwoole\Redis\Config\RedisClusterConfig([ ['172.16.0.36', 6379], ['172.16.0.36', 6380], ['172.16.0.36', 6381], ['172.16.0.37', 6379], ['172.16.0.37', 6380], ['172.16.0.37', 6381], ['172.16.0.38', 6379], ['172.16.0.38', 6380], ['172.16.0.38', 6381], ], [ 'auth' => '', 'serialize' => $this->serialize ? \EasySwoole\Redis\Config\RedisConfig::SERIALIZE_JSON : \EasySwoole\Redis\Config\RedisConfig::SERIALIZE_NONE, 'timeout'=>1 ])); }catch (\Throwable $e) { $extra = [ 'code' => $e->getCode(), 'msg' => $e->getMessage(), 'line' => $e->getLine(), 'file' => $e->getFile() ]; echo "Exception:".json_encode($extra)."\n"; return false; } return $redis; }

    直接在发送的时候获取redis hander,get ,循环的时候有时候卡住了,有时候正常,一般前两个正常,第三个就卡住。

    什么情况?设置redis的超时时间了。

    opened by caption1 10
  • redis连接池

    redis连接池

    EasySwoole版本为:3.3.4 1、在EasySwooleEvent设置redis pool的最小和最大连接数 $redis_pool_config->setMinObjectNum(5); $redis_pool_config->setMaxObjectNum(20);

    2、EasySwoole启动情况如下: root 10189 0.0 0.0 614168 7484 ? Ssl 05:28 0:00 EasySwoole root 10190 0.0 0.1 321360 9004 ? S 05:28 0:00 EasySwoole root 10196 0.2 0.1 330552 10052 ? Sl 05:28 0:04 EasySwoole.Worker.0 root 10197 0.2 0.1 330552 10052 ? Sl 05:28 0:04 EasySwoole.Worker.1 root 10198 0.2 0.1 330552 10052 ? Sl 05:28 0:04 EasySwoole.Worker.2 root 10199 0.3 0.2 636516 19312 ? Sl 05:28 0:07 EasySwoole.Worker.3 root 10201 0.2 0.2 634404 16388 ? Sl 05:28 0:04 EasySwoole.Worker.4 root 10203 0.2 0.2 634136 16120 ? Sl 05:28 0:04 EasySwoole.Worker.5 root 10204 0.2 0.2 634200 16116 ? Sl 05:28 0:04 EasySwoole.Worker.6 root 10206 0.2 0.1 330552 10052 ? Sl 05:28 0:04 EasySwoole.Worker.7 root 10208 0.2 0.1 333660 10576 ? Sl 05:28 0:04 EasySwoole.TaskWorker.0 root 10210 0.2 0.1 333660 10572 ? Sl 05:28 0:04 EasySwoole.TaskWorker.1 root 10211 0.2 0.1 333660 10588 ? Sl 05:28 0:04 EasySwoole.TaskWorker.2 root 10213 0.2 0.1 333660 10580 ? Sl 05:28 0:04 EasySwoole.TaskWorker.3

    3、通过redis cli查看redis的连接情况,如下: # Clients connected_clients:434 client_recent_max_input_buffer:4 client_recent_max_output_buffer:0 blocked_clients:0

    4、通过netstat监控redis端口,发现将近400个连接,都是由一个EasySwoole进程连接的,进程id为:10199,具体如下: tcp 0 0 127.0.0.1:32940 127.0.0.1:6379 ESTABLISHED 10199/EasySwoole.Worker tcp 0 0 127.0.0.1:33280 127.0.0.1:6379 ESTABLISHED 10199/EasySwoole.Worker ............

    5、日志记录的redis连接池使用情况: [2020-02-28 14:20:44][DEBUG][INFO] : [Redis Pool: ``{"created":5,"inuse":0,"max":20,"min":5}] [2020-02-28 14:20:44][DEBUG][INFO] : [Redis Pool: {"created":5,"inuse":0,"max":20,"min":5}] [2020-02-28 14:20:49][DEBUG][INFO] : [Redis Pool: {"created":5,"inuse":0,"max":20,"min":5}] [2020-02-28 14:20:49][DEBUG][INFO] : [Redis Pool: {"created":5,"inuse":0,"max":20,"min":5}] [2020-02-28 14:20:49][DEBUG][INFO] : [Redis Pool: {"created":5,"inuse":0,"max":20,"min":5}] [2020-02-28 14:20:49][DEBUG][INFO] : [Redis Pool: {"created":5,"inuse":0,"max":20,"min":5}]

    问题: (1) 按第一步配置情况应该是一个worker最多开20个连接,8个worker也就是160个连接,但实际却是一个worker就开了将近400个连接,其它worker几乎没有创建redis连接,想请教下为什么是这样的? (2) 第五步获取的redis连接池使用情况为什么跟实际不一样?实际有400个连接

    opened by maxinliang007 9
  • ES USES the PDO to cause service exceptions

    ES USES the PDO to cause service exceptions

    swoole for win版本:https://www.swoole.com/static/swoole-4.2.1.zip es版本:1.1.1

    问题:在直接运行php和使用swoole运行pdo均正常。但是在es中使用出现了502错误(无法访问此网站)。同样的es代码在linux可以正常运行,但在win版本无法运行。

    <?php
    //php-cli Version(正常)
    $dbhost = '127.0.0.1:3306';  // mysql服务器主机地址
    $dbuser = 'admin';            // mysql用户名
    $dbpass = 'admin';          // mysql用户名密码
    $conn = new PDO('mysql:host=127.0.0.1;dbname=yiban;port=3306', $dbuser, $dbpass );
    $query = $conn->query('select * from yiban_college_data');
    $data =[];
    print_r( $query->fetchAll() );
    
    <?php
    //php-swoole Version(正常)
    $http = new swoole_http_server("127.0.0.1", 9501);
    $http->on('request', function ($request, $response) {
    	$dbhost = '127.0.0.1:3306';  // mysql服务器主机地址
    	$dbuser = 'admin';            // mysql用户名
    	$dbpass = 'admin';          // mysql用户名密码
    	$conn = new PDO('mysql:host=127.0.0.1;dbname=yiban;port=3306', $dbuser, $dbpass );
    	$query = $conn->query('select * from yiban_college_data');
    	$data =[];
    	print_r( $query->fetchAll() );
        $response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
    });
    $http->start();
    
    <?php
    //ES Version(win异常,linux正常)
        function test(){
            $dbhost = '127.0.0.1:3306';  // mysql服务器主机地址
            $dbuser = 'admin';            // mysql用户名
            $dbpass = 'admin';          // mysql用户名密码
            $conn = new \PDO('mysql:host=127.0.0.1;dbname=yiban;port=3306', $dbuser, $dbpass );
            $query = $conn->query('select * from yiban_college_data');
            $data =[];
            print_r( $query->fetchAll() );
        }
    
    opened by kajweb 9
  • crontab文档可能存在错误 请确认下

    crontab文档可能存在错误 请确认下

    https://www.easyswoole.com/BaseUsage/crontab.html 完整使用示例代码 在 EasySwoole 中使用 第2点

    最后一行 $crontab->attachToServer(ServerManager::getInstance()->getSwooleServer());

    如果添加这一行 任务到时间后会重复运行 但是用指令执行正常 image

    代码直接取示例的代码即可验证

    #533 之前按照这个任务改了 \EasySwoole\Crontab\Crontab 类 替换为 \EasySwoole\EasySwoole\Crontab\Crontab 类 这个问题才显现出来

    opened by LOVE2CMOL 8
  • 如何在一次请求周期内保存/访问一个针对请求的全局变量

    如何在一次请求周期内保存/访问一个针对请求的全局变量

    目前有一个参数,我需要在一次请求的完整周期内(包括由当前请求内创建的异步任务)使用一个变量

    在创建Saas项目时,通常会有一些数据库字段用于表示客户来源,比如client id,现在问题是我想在用户登录后,每次请求都会通过权限控制获取到这个client id,然后这个client id 在整个请求周期内,不管是控制器内,还是模型,服务,异步任务等地方,都能获取到这个client id,我尝试看过文档里关于全局变量的描述,全局变量在框架内是不可用的,而且框架也不依赖session,所以通过session也不能,就算是让这个数据缓存在客户端,每次通过请求发送到后端,这任然之后控制器内能获取,而不能在其他类/变量里面拿到这个变量

    opened by afraidjpg 8
  • 在单条和批量插入elasticsearch 时提示Specifying types in urls has been deprecated

    在单条和批量插入elasticsearch 时提示Specifying types in urls has been deprecated

    使用: easyswoole-3.4.4和elasticsearch 7.10.1,单条和批量插入时,提示错误如下: [2021-06-02 09:11:35][debug][notice]:[Specifying types in urls has been deprecated at file:/easyswoole/vendor/easyswoole/elasticsearch/src/Endpoints/Bulk.php line:22]。

    部分源代码: $config = new \EasySwoole\ElasticSearch\Config([ 'host' => 'es01', 'port' => 9200, 'username' => 'elastic', 'password' => '*********', 'scheme' => 'https' ]);

        $elasticsearch = new \EasySwoole\ElasticSearch\ElasticSearch($config);
    
        go(function () use ($elasticsearch, $body) {
            $bean = new \EasySwoole\ElasticSearch\RequestBean\Bulk();
            $bean->setIndex('log_web');
            $bean->setType('tms_lbs_receive');
            /*     $body = [];
                 for ($i = 1; $i <= 5; $i++) {
                     $body[] = [
                         'create' => [
                             '_index' => 'my-index',
                             '_type' => 'my-type',
                             '_id' => $i * 1000
                         ]
                     ];
                     $body[] = [
                         'test-field' => 'test-data',
                     ];
                 }*/
            $bean->setBody($body);
            $response = $elasticsearch->client()->bulk($bean)->getBody();
            $response = json_decode($response, true);
            var_dump($response);
    

    可能原因: es6时,官方就提到了es7会删除type,并且es6时已经规定每一个index只能有一个type。在es7中使用默认的_doc作为type,官方说在8.x版本会彻底移除type。

    opened by 54554980 7
  • User sessions in multiple servers

    User sessions in multiple servers

    Hi everyone, a question can Easyswoole handle user sessions through multiple servers (front end ) connected to one database server ?

    I am thinking of that Laravel can handle it since one can store sessions in the database, is this possible to do the same with Easyswoole ?

    If not, is ther any other way to share the user sessions in multiple servers ?

    Regards

    opened by zilveer 7
  • php easyswoole server start

    php easyswoole server start

    按照文档: 启动框架 中途没有报错的话,执行:

    启动框架

    php easyswoole server start 此时可以访问 http://localhost:9501 就看到框架的欢迎页面,表示框架已经安装成功

    实际: yun@kube-slave1:/data/www/dev/easyswoole-3.x$ php easyswoole server start


    | | / | | | | | __ _ ___ _ _ | ( __ __ ___ ___ | | ___ | | / ` | / | | | | | _ \ \ \ /\ / / / _ \ / _ \ | | / _
    | |
    | (| | _ \ | || | __) | \ V V / | () | | () | | | | / |
    | _,| |/ __, | |/ _/_/ _/ ___/ || ___| / | |_/ Operation: php easyswoole start [arg1] [arg2] Intro: to start current easyswoole server Arg: daemonize run in daemonize produce load produce.php

    文档能否写的仔细点, 如此这般, 怎么敢用于生产环境

    opened by szxiaokang 6
  • rayswoole\core 注册的register_shutdown_function应该移动到EventRegister::onRequest里面

    rayswoole\core 注册的register_shutdown_function应该移动到EventRegister::onRequest里面

    opened by longx1001 6
  • websocket 下 dispatch 在分发之后 instanceof Controller 出现问题 导致报错 controller pool empty

    websocket 下 dispatch 在分发之后 instanceof Controller 出现问题 导致报错 controller pool empty

    版本信息
    sw:4.2.11 es:3.1.14

    分发器 public function decode($raw, $client): ?Caller { $caller = new Caller; public function decode($raw, $client): ?Caller { $caller = new Caller; $caller->setControllerClass("\App\WebSocket\Controller\Index"); $caller->setAction('heartbeat'); return $caller; }

    注册事件 // 注册WS事件回调 $conf = new \EasySwoole\Socket\Config(); $conf->setType($conf::WEB_SOCKET); $conf->setParser(new WebSocketParser); $dispatch = new Dispatcher($conf); // 收到客户端消息时的处理 $register->set(EventRegister::onMessage, function (\swoole_server $server, \swoole_websocket_frame $frame) use ($dispatch) { $dispatch->dispatch($server, $frame->data, $frame); });

    报错信息 PHP Fatal error: Uncaught EasySwoole\Socket\Exception\ControllerPoolEmpty: controller pool empty for \App\WebSocket\Controller\Index in /usr/share/nginx/html/chengzi/vendor/easyswoole/socket/src/Dispatcher.php:89 Stack trace: #0 /usr/share/nginx/html/chengzi/EasySwooleEvent.php(49): EasySwoole\Socket\Dispatcher->dispatch(Object(Swoole\WebSocket\Server), 'PING', Object(Swoole\WebSocket\Frame)) #1 [internal function]: EasySwoole\EasySwoole\EasySwooleEvent::EasySwoole\EasySwoole{closure}(Object(Swoole\WebSocket\Server), Object(Swoole\WebSocket\Frame)) #2 /usr/share/nginx/html/chengzi/vendor/easyswoole/easyswoole/src/ServerManager.php(99): call_user_func(Object(Closure), Object(Swoole\WebSocket\Server), Object(Swoole\WebSocket\Frame)) #3 {main} thrown in /usr/share/nginx/html/chengzi/vendor/easyswoole/socket/src/Dispatcher.php on line 89

    Fatal error: Uncaught EasySwoole\Socket\Exception\ControllerPoolEmpty: controller pool empty for \App\WebSocket\Controller\Index in /usr/share/nginx/html/chengzi/vendor/easyswoole/socket/src/Dispatcher.php:89 Stack trace: #0 /usr/share/nginx/html/chengzi/EasySwooleEvent.php(49): EasySwoole\Socket\Dispatcher->dispatch(Object(Swoole\WebSocket\Server), 'PING', Object(Swoole\WebSocket\Frame)) #1 [internal function]: EasySwoole\EasySwoole\EasySwooleEvent::EasySwoole\EasySwoole{closure}(Object(Swoole\WebSocket\Server), Object(Swoole\WebSocket\Frame)) #2 /usr/share/nginx/html/chengzi/vendor/easyswoole/easyswoole/src/ServerManager.php(99): call_user_func(Object(Closure), Object(Swoole\WebSocket\Server), Object(Swoole\WebSocket\Frame)) #3 {main} thrown in /usr/share/nginx/html/chengzi/vendor/easyswoole/socket/src/Dispatcher.php on line 89

    opened by Kbody 6
  • Scalable Datascraper

    Scalable Datascraper

    Hello, i'm trying to understand how easyswoole can help me upgrading my distributed datascraper achitecture which i built on top of zeromq (majordomo pattern + optional titanic queue persistence on redis), msgpack for network packet compression and mongodb for schema-less storage.

    With zeromq i can setup a main majordomo broker that maintain a list of available workers identified by names and distributed across multiple machines, creating a pool of each worker type. Using a vent-sink pattern i push the tasks that need to be performed and these are distributed across the workers as they become available (these are single thread workers, so while working they don't respond to heartbeat and from the broker point of view they become unavailable, and return available after the task is done and the heartbeat is restored). The tasks distribution is not following the round robin approach, since the workers internal zmq queue is limited to 1 task and the broker recieve a "task done" aknowledge , so the fastest workers got more tasks todo.

    What i love of this approach is that is resilent and consistent, broker down ? no problem, it restart (as it is supervisor monitored) and process the "eventually" persisted titanic queue. Need more processing power? No problem, spin-up a new node with 100 workers and they immediatly starts working.

    What i hate is the memory consumption, each worker requires between 15 to 30 mb, and also the relevant quantity of php code distributed on each worker (the majordomo pattern, titanic and majordomo worker code is written in php, same as the redis queue and few other stuff).

    I'd like to hear your opinion about the benefits rewriting this kind of architecture using easyswoole/swoole. Some examples will be very appreciated.

    Beg my pardon for my bad english, hope can help me better understand. thank you!

    opened by goddanao 6
  • HttpClient的Download方法出现图片下载不完整问题

    HttpClient的Download方法出现图片下载不完整问题

    //需要开启协程数、判断需要处理的图片数与协程数,取较小值 $loopSize = $size < ($imageLength-$start) ? $size : ($imageLength-$start); for ($j = 0; $j < $loopSize; $j++){ //保存图片 $wg->add(); go (function () use($wg, $redis, $j, $start, $imageLocalPath, $channel, $imageUrl, $imagePath, $exportId){ $imageIndex = $j + $start; $image_url = $imageUrl[$imageIndex]; if (empty($image_url) || $image_url == "") { $imageData = [$imageIndex=>""]; $channel->push($imageData); }else { $client = new HttpClient(); $endWith = pathinfo($image_url); $endType = "jpg"; if (isset($endWith['extension'])) { $endType = $endWith['extension']; } $client->setUrl($image_url); $client->setTimeout(15); $filename = "{$imagePath}/{$imageIndex}.{$endType}"; $imageLocalFullPath = "{$imageLocalPath}/{$imageIndex}.{$endType}"; $imageData = [$imageIndex=>$imageLocalFullPath]; $channel->push($imageData); try { $res = $client->download($filename, 0, HttpClient::METHOD_GET, $client->get()->getBody()); Manager::getInstance()->get("ssc_capture")->invoke(function (Redis $redis) use ($exportId) { $redis->hIncrBy($this->taskId, "handle_num", 1); }); $client->getClient()->close(); } catch (\Exception $e) { echo CLASS."".FUNCTION.""."下载图片异常_".$e->getMessage().PHP_EOL; } } $wg->done(); }); } $wg->wait(); }

    opened by supperbro 0
  • 内存table 问题(框架Core.php文件)

    内存table 问题(框架Core.php文件)

    [2022-08-18 15:22:17][trigger][warning]:[Swoole\Table::set(): failed to set('9205'), unable to allocate memory at file:/home/share/v3.api.easyswole/vendor/easyswoole/easyswoole/src/Core.php line:302]

    opened by migrant-work 1
  • 队列里数据库问题

    队列里数据库问题

    在redis 的队列了经常会出现

    message":"SQLSTATE[HY000] [2002] Connection reset by peer or Transport endpoint is not connected [show full columns from out_order_bill_log]

    SQLSTATE[HY000] [4031] The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior

    数据库配置如下:

    'host' => '', 'port' => 3306, 'user' => 'xxxx', 'password' => 'xxxx', 'database' => 'xxxx', 'timeout' => 9, 'charset' => 'utf8mb4', 'fetchModel' => true, 'returnCollection' => true, 'strictType' => true, 'minObjectNum' => 15, 'intervalCheckTime' => 3580, 'maxObjectNum' => 120, 'maxIdleTime' => 15, 'autoPing' => 5,

    msyql8.3

    wait_timeout配置为 28800

    eayswoole版本为 3.4.4 swoole版本为 4.6.7

    请问这是什么原因呢

    opened by laumin 1
  • orm2.x的文档部分是不是还没有齐全?

    orm2.x的文档部分是不是还没有齐全?

    opened by LOVE2CMOL 6
Releases(3.6.1)
Multi-process coroutine edition Swoole spider !! Learn about Swoole's network programming and the use of its related APIs

swoole_spider php bin/spider // Just do it !! Cache use Swoole\Table; use App\Table\Cache; $table = new Table(1<<20); // capacity size $table->column

null 3 Apr 22, 2021
A easy way to install your basic yii projetc, we have encrypt database password in phpfile, my class with alot funtions to help you encrypt and decrypt and our swoole server install just run ./yii swoole/start and be happy!

Yii 2 Basic Project Template with swoole and Modules Yii 2 Basic Project Template is a skeleton Yii 2 application best for rapidly creating small proj

null 3 Apr 11, 2022
swoole and golang ipc, use goroutine complete swoole coroutine

swoole and golang ipc demo swoole process module exec go excutable file as sider car, use goroutine complete swoole coroutine hub.php <?php require '

null 2 Apr 17, 2022
Hyperf instant messaging program based on swoole framework

Hyperf instant messaging program based on swoole framework

null 20 Aug 12, 2022
☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Serve

☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、WorkerMan、FPM、CLI-Server

Mix PHP 1.8k Dec 29, 2022
一个极简高性能php框架,支持[swoole | php-fpm ]环境

One - 一个极简高性能php框架,支持[swoole | php-fpm ]环境 快 - 即使在php-fpm下也能1ms内响应请求 简单 - 让你重点关心用one做什么,而不是怎么用one 灵活 - 各个组件松耦合,可以灵活搭配使用,使用方法保持一致 原生sql可以和模型关系with搭配使用,

vic 862 Jan 1, 2023
球球大作战(PHP+Swoole)

球球大作战 在线多人H5游戏(H5客户端, 服务端) W A S D 控制 技术栈: PHP7.4+ Swoole4.6(多进程, WebSocket, 共享内存) SpriteJS v3(2D Canvas渲染) 演示Demo 安装: 环境要求:Linux,PHP7.4+(启用Swoole拓展)

Vacant 15 May 9, 2022
基于 swoole 的多进程队列系统,低延时(最低毫秒级)、低资源占用, 支持一键化协程、超时控制、失败重试。可与 laravel thinkphp 等框架配合使用

multi-process-queue 基于swoole的多进程队列系统,manage进程管理子进程,master进程监听队列分发任务,worker进程执行任务, 多进程、低延时(最低毫秒级)、低资源占用。可与 laravel thinkphp 等框架配合使用 版本要求: php>=7.1 swoo

yuntian 55 Dec 12, 2022
swoole worker

SwooleWorker SwooleWorker is a distributed long connection development framework based on Swoole4. 【Github】 【HomePage】 Manual 【ENGLISH】 【简体中文】 Usage s

null 123 Jan 9, 2023
🚀 Developing Rocketseat's Next Level Week (NLW#05) Application using PHP/Swoole + Hyperf

Inmana PHP ?? Developing Rocketseat 's Next Level Week (NLW#05) Application using Swoole + Hyperf. This is the app of the Elixir track. I know PHP/Swo

Leo Cavalcante 18 Jun 1, 2022
Simple live support server with PHP Swoole Websocket and Telegram API

Telgraf Simple live support server with PHP Swoole Websocket and Telegram API. Usage Server Setup Clone repository with following command. git clone h

Adem Ali Durmuş 6 Dec 30, 2022
Library for Open Swoole extension

Open Swoole Library This library works with Open Swoole since release version v4.7.1. WIP Table of Contents How to Contribute Code Requirements Develo

Open Swoole 3 Dec 22, 2022
Redis watcher for PHP-Casbin in Swoole.

Redis watcher for PHP-Casbin in Swoole Redis watcher for PHP-Casbin in Swoole , Casbin is a powerful and efficient open-source access control library.

PHP-Casbin 1 Nov 22, 2021
Socks5 proxy server written in Swoole PHP

php-socks This is a Socks5 proxy server implementation built with PHP & Swoole. To start the proxy server, clone this repo, run composer install to in

Nazmul Alam 3 Jan 23, 2022
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.

?? LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.

Biao Xie 3.7k Dec 29, 2022
DoraRPC is an RPC For the PHP MicroService by The Swoole

Dora RPC 简介(Introduction) Dora RPC 是一款基础于Swoole定长包头通讯协议的最精简的RPC, 用于复杂项目前后端分离,分离后项目都通过API工作可更好的跟踪、升级、维护及管理。 问题提交: Issue For complex projects separation

Chang Long Xu 468 Jan 5, 2023
Hprose asynchronous client & standalone server based on swoole

Hprose for Swoole Introduction Hprose is a High Performance Remote Object Service Engine. It is a modern, lightweight, cross-language, cross-platform,

Hprose 186 Sep 9, 2022
PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.

longlang/phpkafka Introduction English | 简体中文 PHP Kafka client is used in PHP-FPM and Swoole. The communication protocol is based on the JSON file in

Swoole Project 235 Dec 31, 2022
This package provides a high performance HTTP server to speed up your Laravel/Lumen application based on Swoole.

This package provides a high performance HTTP server to speed up your Laravel/Lumen application based on Swoole.

Swoole Taiwan 3.9k Jan 8, 2023