<div align="center">
<img src="https://github.com/hhxsv5/laravel-s/raw/master/logo.svg" alt="LaravelS Logo" height="80">
<p>
<a href="https://github.com/hhxsv5/laravel-s/blob/master/README.md">English Docs</a> |
<a href="https://github.com/hhxsv5/laravel-s/blob/master/README-CN.md">ä¸æææ¡£</a>
</p>
<p>ð LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole</p>
<p>
<a href="https://github.com/hhxsv5/laravel-s/releases">
<img src="https://img.shields.io/github/release/hhxsv5/laravel-s.svg" alt="Latest Version">
</a>
<a href="https://www.php.net/">
<img src="https://img.shields.io/packagist/php-v/hhxsv5/laravel-s" alt="PHP Version">
</a>
<a href="https://github.com/swoole/swoole-src">
<img src="https://img.shields.io/badge/swoole-%3E=1.7.19-flat.svg" alt="Swoole Version">
</a>
<a href="https://packagist.org/packages/hhxsv5/laravel-s/stats">
<img src="https://img.shields.io/packagist/dt/hhxsv5/laravel-s" alt="Total Downloads">
</a>
<a href="https://travis-ci.com/hhxsv5/laravel-s">
<img src="https://travis-ci.com/hhxsv5/laravel-s.svg?branch=master" alt="Build Status">
</a>
<a href="https://scrutinizer-ci.com/g/hhxsv5/laravel-s/">
<img src="https://scrutinizer-ci.com/g/hhxsv5/laravel-s/badges/code-intelligence.svg?b=master" alt="Code Intelligence Status">
</a>
<a href="https://github.com/hhxsv5/laravel-s/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/hhxsv5/laravel-s" alt="License">
</a>
</p>
</div>
---
## Continuous Updates
- *Please `Watch` this repository to get the latest updates.*
Table of Contents
=================
* [Features](#features)
* [Benchmark](#benchmark)
* [Requirements](#requirements)
* [Install](#install)
* [Run](#run)
* [Deploy](#deploy)
* [Cooperate with Nginx (Recommended)](#cooperate-with-nginx-recommended)
* [Cooperate with Apache](#cooperate-with-apache)
* [Enable WebSocket server](#enable-websocket-server)
* [Listen events](#listen-events)
* [System events](#system-events)
* [Customized asynchronous events](#customized-asynchronous-events)
* [Asynchronous task queue](#asynchronous-task-queue)
* [Millisecond cron job](#millisecond-cron-job)
* [Automatically reload after modifying code](#automatically-reload-after-modifying-code)
* [Get the instance of SwooleServer in your project](#get-the-instance-of-swooleserver-in-your-project)
* [Use SwooleTable](#use-swooletable)
* [Multi-port mixed protocol](#multi-port-mixed-protocol)
* [Coroutine](#coroutine)
* [Custom process](#custom-process)
* [Common components](#common-components)
* [Apollo](#apollo)
* [Prometheus](#prometheus)
* [Other features](#other-features)
* [Configure Swoole events](#configure-swoole-events)
* [Serverless](#serverless)
* [Important notices](#important-notices)
* [Users and cases](https://github.com/hhxsv5/laravel-s/blob/master/README-CN.md#%E7%94%A8%E6%88%B7%E4%B8%8E%E6%A1%88%E4%BE%8B)
* [Alternatives](#alternatives)
* [Sponsor](#sponsor)
* [License](#license)
## Features
- Built-in Http/[WebSocket](https://github.com/hhxsv5/laravel-s/blob/master/README.md#enable-websocket-server) server
- [Multi-port mixed protocol](https://github.com/hhxsv5/laravel-s/blob/master/README.md#multi-port-mixed-protocol)
- [Custom process](https://github.com/hhxsv5/laravel-s/blob/master/README.md#custom-process)
- Memory resident
- [Asynchronous event listening](https://github.com/hhxsv5/laravel-s/blob/master/README.md#customized-asynchronous-events)
- [Asynchronous task queue](https://github.com/hhxsv5/laravel-s/blob/master/README.md#asynchronous-task-queue)
- [Millisecond cron job](https://github.com/hhxsv5/laravel-s/blob/master/README.md#millisecond-cron-job)
- [Common Components](https://github.com/hhxsv5/laravel-s/blob/master/README.md#common-components)
- Gracefully reload
- [Automatically reload after modifying code](https://github.com/hhxsv5/laravel-s/blob/master/README.md#automatically-reload-after-modifying-code)
- Support Laravel/Lumen both, good compatibility
- Simple & Out of the box
## Benchmark
- [Which is the fastest web framework?](https://github.com/the-benchmarker/web-frameworks)
- [TechEmpower Framework Benchmarks](https://www.techempower.com/benchmarks/)
## Requirements
| Dependency | Requirement |
| -------- | -------- |
| [PHP](https://secure.php.net/) | `>= 5.5.9` `Recommend PHP7+` |
| [Swoole](https://www.swoole.co.uk/) | `>= 1.7.19` `No longer support PHP5 since 2.0.12` `Recommend 4.5.0+` |
| [Laravel](https://laravel.com/)/[Lumen](https://lumen.laravel.com/) | `>= 5.1` `Recommend 8.0+` |
## Install
1.Require package via [Composer](https://getcomposer.org/)([packagist](https://packagist.org/packages/hhxsv5/laravel-s)).
```bash
composer require "hhxsv5/laravel-s:~3.7.0" -vvv
# Make sure that your composer.lock file is under the VCS
```
2.Register service provider(pick one of two).
- `Laravel`: in `config/app.php` file, `Laravel 5.5+ supports package discovery automatically, you should skip this step`
```php
'providers' => [
//...
Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class,
],
```
- `Lumen`: in `bootstrap/app.php` file
```php
$app->register(Hhxsv5\LaravelS\Illuminate\LaravelSServiceProvider::class);
```
3.Publish configuration and binaries.
> *After upgrading LaravelS, you need to republish; click [here](https://github.com/hhxsv5/laravel-s/releases) to see the change notes of each version.*
```bash
php artisan laravels publish
# Configuration: config/laravels.php
# Binary: bin/laravels bin/fswatch bin/inotify
```
4.Change `config/laravels.php`: listen_ip, listen_port, refer [Settings](https://github.com/hhxsv5/laravel-s/blob/master/Settings.md).
5.Performance tuning
- [Adjust kernel parameters](https://wiki.swoole.com/#/other/sysctl?id=%e5%86%85%e6%a0%b8%e5%8f%82%e6%95%b0%e8%b0%83%e6%95%b4)
- [Number of Workers](https://www.swoole.co.uk/docs/modules/swoole-server/configuration#worker_num): LaravelS uses Swoole's `Synchronous IO` mode, the larger the `worker_num` setting, the better the concurrency performance, but it will cause more memory usage and process switching overhead. If one request takes 100ms, in order to provide 1000QPS concurrency, at least 100 Worker processes need to be configured. The calculation method is: worker_num = 1000QPS/(1s/1ms) = 100, so incremental pressure testing is needed to calculate the best` worker_num`.
- [Number of Task Workers](https://www.swoole.co.uk/docs/modules/swoole-server/configuration#task_worker_num)
## Run
> `Please read the notices carefully before running`, [Important notices](https://github.com/hhxsv5/laravel-s#important-notices)(IMPORTANT).
- Commands: `php bin/laravels {start|stop|restart|reload|info|help}`.
| Command | Description |
| --------- | --------- |
| start | Start LaravelS, list the processes by "*ps -ef|grep laravels*" |
| stop | Stop LaravelS, and trigger the method `onStop` of Custom process |
| restart | Restart LaravelS: Stop gracefully before starting; The service is `unavailable` until startup is complete |
| reload | Reload all Task/Worker/Timer processes which contain your business codes, and trigger the method `onReload` of Custom process, CANNOT reload Master/Manger processes. After modifying `config/laravels.php`, you `only` have to call `restart` to restart |
| info | Display component version information |
| help | Display help information |
- Boot options for the commands `start` and `restart`.
| Option | Description |
| --------- | --------- |
| -d|--daemonize | Run as a daemon, this option will override the `swoole.daemonize` setting in `laravels.php` |
| -e|--env | The environment the command should run under, such as `--env=testing` will use the configuration file `
没有合适的资源?快使用搜索试试~ 我知道了~
linux下wookteam内网环境搭建教程及环境依赖包
共9232个文件
php:8121个
md:270个
json:164个
需积分: 0 9 下载量 101 浏览量
2023-02-04
17:49:26
上传
评论 2
收藏 706.64MB RAR 举报
温馨提示
wookteam内网环境搭建 含教程 含环境包 含依赖包 有了此包,从0到搭建完成wookteam。无需再找资源
资源推荐
资源详情
资源评论
收起资源包目录
linux下wookteam内网环境搭建教程及环境依赖包 (9232个子文件)
favicon.png.base64 1KB
completion.bash 3KB
fswatch.bat 159B
patch-type-declarations.bat 150B
var-dump-server.bat 142B
doctrine-dbal.bat 140B
commonmark.bat 137B
php-parse.bat 136B
phpunit.bat 134B
carbon.bat 133B
psysh.bat 132B
carbon.bat 93B
.php-cs-fixer.cache 5KB
carbon 3KB
carbon 391B
CHANGES 12KB
commonmark 4KB
commonmark 3KB
nginx.conf 3KB
config 374B
config 354B
config 349B
config 345B
config 337B
config 336B
config 335B
config 334B
config 332B
config 330B
config 315B
config 311B
config 307B
config 304B
config 301B
config 298B
config 280B
config 71B
create-command-test 8KB
create-pear 7KB
create-phar 2KB
create-single-file 18KB
CREDITS 341B
bootstrap.min.css 158KB
exception.css 14KB
whoops.base.css 10KB
nv.d3.min.css 9KB
default.css 5KB
prism.css 4KB
htmlDescriptor.css 3KB
exception_full.css 3KB
style.css 2KB
ConfigForm.css 301B
error.css 275B
octicons.css 88B
custom.css 0B
.php_cs.dist 11KB
dashboard_branch.html.dist 7KB
dashboard.html.dist 7KB
.php-cs-fixer.dist 4KB
file_branch.html.dist 2KB
file.html.dist 2KB
directory_branch.html.dist 2KB
directory.html.dist 2KB
file_item_branch.html.dist 1KB
directory_item_branch.html.dist 1KB
method_item_branch.html.dist 1KB
phpstan.neon.dist 1KB
file_item.html.dist 882B
directory_item.html.dist 833B
.php_cs.dist 831B
.phpcs.xml.dist 752B
method_item.html.dist 683B
phpunit.xml.dist 619B
branches.html.dist 500B
paths.html.dist 498B
phpunit.xml.dist 439B
infection.json.dist 371B
.php_cs.dist 342B
phpstan.neon.dist 308B
coverage_bar.html.dist 295B
coverage_bar_branch.html.dist 295B
line.html.dist 197B
lines.html.dist 101B
doctrine-dbal 3KB
doctrine-dbal 66B
Wookteam内网搭建.docx 319KB
.editorconfig 311B
.editorconfig 302B
.editorconfig 271B
.editorconfig 220B
hiddeninput.exe 9KB
fake_file 0B
fswatch 951B
fswatch 510B
functions 52KB
functions 14KB
functions 11KB
functions 11KB
functions 11KB
functions 11KB
共 9232 条
- 1
- 2
- 3
- 4
- 5
- 6
- 93
资源评论
惊喜1129
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功