easyswoole / easyswoole
An efficient swoole framework
Installs: 172 203
Dependents: 49
Suggesters: 0
Security: 0
Stars: 4 744
Watchers: 142
Forks: 510
Open Issues: 37
Requires
- php: ^8.0
- ext-json: *
- ext-swoole: >=4.4.4
- easyswoole/bridge: ^1.0
- easyswoole/command: ^1.1
- easyswoole/component: ^2.0
- easyswoole/config: ^1.0
- easyswoole/crontab: ^1.0
- easyswoole/http-annotation: 3.x
- easyswoole/phpunit: ^1.1
- easyswoole/socket: ^1.2
- easyswoole/spl: ^2.0
- easyswoole/task: ^2.0
- easyswoole/trigger: ^1.0
- easyswoole/utility: ^1.0
Requires (Dev)
- 3.x-dev
- 3.7.1
- 3.6.3
- 3.6.2
- 3.6.1
- 3.5.1
- 3.4.6
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.7
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.6
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.1.19
- 3.1.18
- 3.1.17
- 3.1.16
- 3.1.15
- 3.1.14
- 3.1.13
- 3.1.12
- 3.1.11
- 3.1.10
- 3.1.9
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.9-beta2
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1-stable
- 3.0.1-RC3
- 3.0.1-RC2
- 3.0.1-RC
- 2.x-dev
- v2.1.5
- v2.1.4
- v2.1.3-stable
- v2.1.2
- v2.1.1
- v2.0.2
- v2.0.1
This package is auto-updated.
Last update: 2024-11-26 08:27:03 UTC
README
English | 中文
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
-
QQ交流群
- VIP群 579434607 (本群需要付费599元)
- EasySwoole官方一群 633921431(已满)
- EasySwoole官方二群 709134628(已满)
- EasySwoole官方三群 932625047(已满)
- EasySwoole官方四群 779897753(已满)
- EasySwoole官方五群 853946743(已满)
- EasySwoole官方六群 524475224
-
商业支持:
- QQ 291323003
- EMAIL admin@fosuss.com