GithubHelp home page GithubHelp logo

banyarrescue / swooledistributed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swooledistributed/swooledistributed

0.0 3.0 0.0 104 KB

swoole 分布式通讯框架

License: Apache License 2.0

PHP 100.00%

swooledistributed's Introduction

SwooleDistributed

swoole 分布式通讯框架 更多信息及联系方式见wiki

安装须知

1.php 7.0
2.需要使用最新版的swoole,请通过github下载编译swoole,1.8.7在php7.0下存在bug不建议使用
3.需要redis支持,安装redis扩展 swoole编译时选择异步redis选项
4.需要composer支持,安装composer,运行composer install安装依赖
5.如需集群自行搭建LVS

运行

1.php start_swoole_server.php start
启动swoole server服务器
2.php start_swoole_dispatch.php start
启动swoole dispatch服务器
3.单独启动swoole server不具备分布式特性,一台物理机只允许启动一个swoole server
4.swoole dispatch服务器可以和swoole server放在一个物理机上,一台物理机只允许启动一个swoole dispatch
5.可以启动多台swoole server和多台swoole dispatch搭建分布式系统(至少1台LVS,2台swoole server,1台swoole dispatch,1个redis)
6.单独启动swoole server可作为单机服务器。
7.修改config目录下配置,改为你自己的配置。
8.swoole server与swoole dispatch 必须在同一个网段。swoole dispatch无需配置,swoole server会自动发现
9.swoole server与swoole dispatch 都支持动态弹性部署,随时热插拔。swoole dispatch上线后30秒内被swoole server发现并建立连接
10.内置controller,model,task 3大模块
11.swoole server与swoole dispatch都被设计成无状态服务器,所有的信息共享都通过redis
12.最新版采用了异步redis进行数据存储,通过开启一个新的redis连接池进程,利用addProcess和sendMessage技术进行结果分发,优雅解决异步问题。
13.注意taskproxy为单例,不要变成成员变量使用,用到时load

拓扑图

image

文档(待完善)

swooledistributed's People

Contributors

tmtbe avatar

Watchers

James Cloos avatar yafangmaster avatar BanYarTeam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.