PHPackages                             esd/esd-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. esd/esd-server

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

esd/esd-server
==============

esd

0.37(6y ago)25280114[4 issues](https://github.com/esd-projects/esd-server/issues)4MITPHP

Since May 7Pushed 6y ago17 watchersCompare

[ Source](https://github.com/esd-projects/esd-server)[ Packagist](https://packagist.org/packages/esd/esd-server)[ RSS](/packages/esd-esd-server/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (22)Versions (38)Used By (4)

EasySwooleDistributed
=====================

[](#easyswooledistributed)

[![Latest Version](https://camo.githubusercontent.com/26613ac5cfbafc730edc7679e58dcdff86da0f42ca10885824063453088ed077/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6573642d70726f6a656374732f6573642d7365727665722e737667)](https://github.com/esd-projects/esd-server/releases)[![Php Version](https://camo.githubusercontent.com/c197ef1e57a32c886b2a54d02ead7dbc035f18b3f39a642703b9372eef7819f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://secure.php.net/)[![Swoole Version](https://camo.githubusercontent.com/e146aff9aa20e1be946bf555b7fde2c9546685769cab14990e69210b646c46ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73776f6f6c652d2533453d342e332e332d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://github.com/swoole/swoole-src)[![ESD Doc](https://camo.githubusercontent.com/ea1431167b522b88916c717b0bfe6348328a8662a684bb128f0b0bd6d22a20d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d70617373696e672d677265656e2e7376673f6d61784167653d32353932303030)](https://www.kancloud.cn/tmtbe/goswoole/1067764)[![ESD License](https://camo.githubusercontent.com/1c419f89412ea6c234c184ad6d85decb127c18584858d3707ae7d8e2131eccc4/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f6c2f706c75672e7376673f6d61784167653d32353932303030)](https://github.com/esd-projects/esd-server/blob/master/LICENSE)

**简单，易用，高性能，高扩展性，拥有强大的插件管理和丰富的插件系统，高颜值的PHP协程框架，简称ESD。**

由SwooleDistributed与EasySwoole合作打造最棒的swoole框架。

交流群：994811283

[![](./screenshots/start.jpg)](./screenshots/start.jpg)

✨ 文档地址
------

[](#-文档地址)

✨ 日志系统
------

[](#-日志系统)

[![](./screenshots/log.jpg)](./screenshots/log.jpg)类似SpringBoot的日志系统，更加清楚的日志展现。

⚡️ 插件系统
-------

[](#️-插件系统)

[![](./screenshots/run.jpg)](./screenshots/run.jpg)丰富插件库，目前收录了接近30个插件，通过加载组装不同的插件提供更强大的功能。

```
$this->addPlug(new EasyRoutePlugin());
$this->addPlug(new ScheduledPlugin());
$this->addPlug(new RedisPlugin());
$this->addPlug(new MysqlPlugin());
$this->addPlug(new AutoreloadPlugin());
$this->addPlug(new AopPlugin());
```

加载插件只需要一行代码

⚡️ DI与注解
--------

[](#️-di与注解)

支持注解，框架提供大量可使用的注解，比如注解路由，注解事务，注解缓存，注解验证等。 [![](./screenshots/rest.jpg)](./screenshots/rest.jpg)

```
/**
 * @RestController("user")
 * Class CUser
 * @package ESD\Examples\Controller
 */
class CUser extends Base
{
    /**
     * @Inject()
     * @var UserService
     */
    private $userService;

    /**
     * @GetMapping("login")
     * @return string
     */
    public function login()
    {
    }
}
```

注解不是强制使用的，完全可以不使用注解。框架均提供了常规使用方式。

⚡️ AOP
------

[](#️-aop)

完整支持面向切片编程。

```
$this->addAspect(new MyAspect);
```

[![](./screenshots/aspect.jpg)](./screenshots/aspect.jpg)

```
/**
 * @param MethodInvocation $invocation Invocation
 *
 * @Around("@execution(ESD\Plugins\Mysql\Annotation\Transactional)")
 * @return mixed
 * @throws \Throwable
 */
public function aroundTransactional(MethodInvocation $invocation)
```

⚡️ Tracing 链路追踪
---------------

[](#️-tracing-链路追踪)

通过加载Tracing插件可以实现服务链路性能的监控,支持微服务 [![](./screenshots/tracing.png)](./screenshots/tracing.png)

⚡️ 分布式与微服务
----------

[](#️-分布式与微服务)

提供分布式与微服务的插件组织：

目前收录的插件
-------

[](#目前收录的插件)

- console-plugin  控制台插件
- postgresql-plugin  postgreSQL插件（由bearlord提供）
- mqtt-plugin  MQTT服务器、MQTT客户端、MQTT路由
- redis-plugin  redis插件
- easyroute-plugin  最方便的注解路由插件
- pack-plugin  tcp，ws等自定义协议解析的pack插件
- tracing-plugin  链路监控插件
- aop-plugin  提供AOP支持的插件
- amqp-plugin  AMQP插件（由李丹阳提供）
- mysql-plugin  mysql插件
- annotations-scan-plugin  扫描注解插件
- whoops-plugin  whoops插件，http调试用
- session-plugin  session插件
- cache-plugin  cache插件,缓存
- actuator-plugin  actuator插件提供健康检查等框架默认端点服务
- security-plugin  鉴权插件
- saber-plugin  http客户端插件，Saber
- autoreload-plugin  自动reload插件，用于开发
- validate-plugin  验证插件，提供数据的验证
- uid-plugin  uid插件，长连接用于绑定fd与uid的关系
- topic-plugin  主题插件，长连接用于发送订阅主题，符合MQTT规范
- scheduled-plugin  定时任务插件
- phpunit-plugin  单元测试插件
- blade-plugin  blade渲染插件
- csvreader-plugin  读取解析csv的插件
- process-rpc-plugin  进程通讯插件
- actor-plugin  acotr插件
- wechat-plugin  wechat插件，由lphkxd提供
- ding-plugin  钉钉插件，由qiuapeng921提供
- saber-cloud-plugin  声明试Web客户端，提供微服务访问
- circuitbreaker-plugin  微服务的熔断器插件
- consul-plugin-plugin  consul插件，提供服务注册，选举
- hashed-wheel-timer-plugin  提供延迟队列，由anyhink提供

Docker运行环境(由anythink提供)
-----------------------

[](#docker运行环境由anythink提供)

```
➜ docker run -it --rm -p 8080:8080 -v $PWD:/data registry.cn-beijing.aliyuncs.com/anythink/esd:latest
 _____ ____  ____    ____              _   _
| ____/ ___||  _ \  |  _ \ _   _ _ __ | |_(_)_ __ ___   ___
|  _| \___ \| | | | | |_) | | | | '_ \| __| | '_ ` _ \ / _ \
| |___ ___) | |_| | |  _
