ランキングに戻る

easy-swoole/easyswoole

PHPeasyswoole.com

swoole,easyswoole,swoole framework

swooleeasyswoolecoroutinetcp-serverwebsocket-serverswoole-framework
スター成長
スター
4.8k
フォーク
503
週間成長
Issue
35
2k4k
2023年1月2024年3月2025年5月2026年7月
成果物Packagistcomposer require easy-swoole/easyswoole
README

English | 中文

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.7.x
php vendor/bin/easyswoole.php install
php easyswoole.php server start

Docker

Get Docker Image

docker pull easyswoolexuesi2021/easyswoole:php8.1.22-alpine3.16-swoole4.8.13

More Docker images can be viewed:Docker Hub or Git for Dockerfile

Run

docker run --name easyswoole \
-v /workspace/project:/var/www/project \
-p 9501:9501 -it \
--privileged -u root \
--entrypoint /bin/sh \
easyswoolexuesi2021/easyswoole:php8.1.22-alpine3.16-swoole4.8.13
  • WorkerDir: /var/www
  • Run Easyswoole :
composer require easyswoole/easyswoole=3.7.x
php vendor/bin/easyswoole.php install
php easyswoole.php server start

Others

  • Git For Demo

  • QQ交流群

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

関連リポジトリ
swoole/swoole-src

🚀 Coroutine-based concurrency library for PHP

C++Apache License 2.0swoolecoroutines
swoole.com
18.9k3.1k
hyperf/hyperf

🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

PHPPackagistMIT Licenseswoolecoroutine
hyperf.io
6.9k1.3k
swoft-cloud/swoft

🚀 PHP Microservice Full Coroutine Framework

PHPPackagistApache License 2.0swoolecoroutine
swoft.org
5.5k765
swooletw/laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.

PHPPackagistMIT Licenseswooleswoole-server
4k383
laravel/octane

Supercharge your Laravel application's performance.

PHPPackagistMIT Licenselaraveloctane
laravel.com/docs/octane
4k343
hhxsv5/laravel-s

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

PHPPackagistMIT Licenseswoolelaravel
3.9k465
colinlet/PHP-Interview-QA

系统性的 PHP 技术面试问答大全(面经)。涵盖 PHP8、MySQL、Redis、Nginx、系统设计、算法、Laravel 源码及高并发架构原理,助你斩获后端研发 Offer。PHP Interview Questions & Answers.

TypeScriptnpmApache License 2.0algorithmarchitecture
colinlet.github.io/PHP-Interview-QA/
3k564
viest/php-ext-xlswriter

🚀 PHP Extension for creating and reader XLSX files.

CBSD 2-Clause "Simplified" Licensephpexcel
xlswriter.viest.me
2.4k236
viest/php-ext-xlsxwriter

🚀 PHP Extension for creating and reader XLSX files.

CBSD 2-Clause "Simplified" Licensephpexcel
xlswriter.viest.me
2.3k234
Tencent/tsf

coroutine and Swoole based php server framework in tencent

PHPPackagistOtherphpswoole
2.1k474
mix-php/mix

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

PHPPackagistApache License 2.0swoolecoroutine
1.9k213
crazywhalecc/static-php-cli

Build standalone portable PHP binaries on Linux, macOS, Windows, with PHP project together, with popular extensions included.

PHPPackagistMIT Licenseswoolephp
static-php.dev
1.9k395