2017 © Pedro Peláez
 

library apiswoole

PHP 常驻内存型PHP框架

image

apiswoole/apiswoole

PHP 常驻内存型PHP框架

  • Thursday, March 29, 2018
  • by Wonghzx
  • Repository
  • 0 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ApiSwoole Api 框架 ++++开发中++++

简介

ApiSwoole 是一款基于Swoole Server 原生协程 开发的常驻内存型PHP框架,摆脱PHP 传统的 PHP-FPM 运行模式在进程唤起和文件加载上带来的性能损失。而依旧维持Swoole Server 原有特性,支持HTTP、TCP、UDP、WebSocket协议,可异步,高可用的应用服务。, (*1)

  • 基于 Swoole 扩展
  • 内置 HTTP 协程服务器
  • 内置 WebSocket 协程服务器
  • 内置 RPC 协程服务器
  • VC 分层设计 (目前没 M 模式)
  • 高性能路由
  • 全局容器注入
  • 数据库 ORM (数据库迁移Laravel的ORM)
  • 自定义用户进程
  • Inotify 自动 Reload

环境要求

  1. PHP 7.X
  2. Swoole 2.x, 需开启协程和异步Redis
  3. Composer
  4. Inotify (自动 Reload 服务 可选 )在开发过程中经常需要更新文件,由于Swoole常驻内存的特性,文件在框架启动时已经载入了内存,当文件被修改时需要手动重启服务

配置

复制项目根目录的 .env.example 并命名为 .env, (*2)

运行安装

  1. composer update

启动

HTTP启动, (*3)

// 启动服务,根据 .env 配置决定是否是守护进程
php apiswoole start

// 重载服务
php apiswoole reload

// 关闭服务
php apiswoole stop

RPC 启动, (*4)

php apiswoole rpc:start

WebSocket 启动, (*5)

php apiswoole socket:start

启动服务成功, (*6)


/\ .-. .; _ / | .-. .;;;.`-' .;' ( / | .`..:. `-';; (_)`; .-.-. .-. .; .-. `/.__|_.' ;; : ;' `;;;. ; ; ;; ;'; ;':: .;.-' .:' / | ;;_.`_.;:._._ `: `.' `.' `;;' `;;'_;;_.-`:::' (__.' `-' .;' (_.;;;' ApiSwoole Version 1.0.0 2018-01-12 17:06:51 Information Panel: HttpServer version: 2.0.10 Listen Address: 0.0.0.0 Listen Port: 9501 Worker Num: 8 Task Worker Num: 8

The Versions

29/03 2018

dev-master

9999999-dev

PHP 常驻内存型PHP框架

  Sources   Download

MIT

The Requires

 

by Wongzx

message queue message queue swoole api