Giter VIP home page Giter VIP logo

goserver's Introduction

goserver

基于消息队列(nats)的游戏服务器框架

架构

1,gate服

和客户端通信使用websocket,仅支持protobuf,数据结构:

-------------------------
| id | protobuf message |
-------------------------

id是消息名的Hash值,用于标记消息名,反解析数据
因为websocket协议已经支持iframe分帧处理,不需要处理粘包,故包结构中无需包长度字段

2,多服rpc通信

使用nats(消息队列)构建服务器间通信,支持send,request,call请求

示例

1,启动消息队列服务(https://github.com/nats-io/nats-streaming-server)
2,见example目录,依次启动user/main.go,gate/main.go,client/main.go

基于goserver的游戏服务器

avatar-fight-server https://github.com/0990/avatar-fight-server

goserver's People

Contributors

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