2 Star 0 Fork 0

shykoe / danmu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Project README

Components

GameServer

游戏服务器是项目的核心,实现了游戏的主要业务逻辑。它通过RPC服务接收来自MessageProxy的消息。当用户与GameServer建立连接时,GameServer会将用户ID(作为key)和自己的服务地址(作为value)存储到Redis中,以便MessageProxy能够找到并将消息推送到正确的GameServer。

MessageServer

消息服务器是对外的服务接口,负责接收外部消息并将它们推送到消息队列(MQ)。

MessageProxy

消息代理负责消费MQ中的消息。它根据消息所属的用户,从Redis中检索与该用户建立连接的GameServer地址,并将消息推送到相应的GameServer。

MockServer

模拟服务器用于测试和模拟环境,它也通过RPC服务接收来自MessageProxy的消息。

Architecture Diagram

+---------------+       +------------------+       +--------------+
|               |       |                  |       |              |
| MessageServer +------>+ Message Queue(MQ)+------>+ MessageProxy |
|               |       |                  |       |              |
+---------------+       +---------+--------+       +------+-------+
                                                        |
                                                        | RPC
                                                        |
                                                        v
+--------------+                                +------v------+
|              |                                |             |
|    Redis     <--------------------------------+ GameServer  |
|              |                                |             |
+--------------+                                +-------------+

Building the Project

To build all components of the project, use the following command:

make all

This will build the gameserver, messageserver, and messageproxy, as well as compile the necessary protobuf files.

空文件

简介

game server 展开 收起
Go 等 4 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/shykoe/danmu.git
git@gitee.com:shykoe/danmu.git
shykoe
danmu
danmu
master

搜索帮助