Code Monkey home page Code Monkey logo

go-x's Introduction

go-x

本库不再维护,请移步:https://github.com/fananchong/go-xserver

编译

  • Linux

    ./build.sh
  • Windows

    build.bat

    (build.bat中GOPATH是特殊路径,需要根据自己本地实际路径做修改)

服务器运行

  • Linux

    1. 安装 Kubernetes
    2. 执行 ./build.sh
  • Windows

    1. 本地安装redis
    2. hosts文件增加 127.0.0.1 redis.go-x
    3. 执行 go-x\example1_iogame\bin\start.bat

H5Client 测试客户端

  1. 更新代码

    git.exe submodule update --init -- "tools/h5client"
  2. 在 go-x\tools\h5client 目录下执行 (只需一次)

    cnpm install
  3. 在 go-x\tools\h5client 目录下执行

    run.bat
  4. 登录界面服务器 IP 、 Port

  • Windows

    127.0.0.1 8080

  • Linux

    你服务器IP 30100

完成的功能

  • Login 服务器

    • 帐号验证、登录
  • Gateway 服务器

    • 消息中继
  • Hub 服务器

    • 服务器组内消息广播
  • Lobby 服务器

    • 创建角色信息
    • 查询角色信息

支持 kubernetes 部署

  • Linux 完整支持 kubernetes 部署
  • Windows 仅做单节点开发调试用

TODO

  • example1_iogame 从 go-x 中分离, go-x 将作为 example1_iogame 的 第三方库方式来使用

  • Hub 重命名为 Center

  • 实现 Gateway 的 session affinity 处理

  • 实现 Lobby 的 session affinity 处理

  • 实现连接管理服务,使之可以不依赖 K8S ,来服务发现

  • match匹配逻辑

  • room实现一个简单的场景

  • 其他

    • session发送缓冲区[]byte不必频繁创建(gotcp优化)
    • 增加服务器间相互ping操作
    • 待续

go-x's People

Contributors

fananchong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.