Skip to content

Commit

Permalink
🐳 17.1.34
Browse files Browse the repository at this point in the history
[#47] 增加拒绝外部直接访问 action 的路由权限
[#45] 游戏对外服独立 UserSession 管理部份逻辑,做成单独的 Handler
[#54] 动态属性接口增加消费操作
  • Loading branch information
iohao committed Mar 2, 2023
1 parent 5c4b03a commit 6722c07
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 36 deletions.
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ ioGame 是轻量级的网络游戏服务器框架,ioGame 没有中间件的强
<dependency>
<groupId>com.iohao.game</groupId>
<artifactId>bolt-run-one</artifactId>
<version>17.1.33</version>
<version>17.1.34</version>
</dependency>
```

Expand Down Expand Up @@ -350,7 +350,23 @@ ioGame 的星球是纯原创性的内容,不是知识点资料收集类型的

## 网络游戏服务器框架简介

你是否想要开发一个高性能、稳定、易用、自带负载均衡、避免类爆炸设计、可跨进程跨机器通信、集群无中心节点、集群自动化、有状态多进程的分步式的网络游戏服务器呢?如果是的话,这里向你推荐一个由 java 语言编写的网络游戏服务器框架 ioGame,下面将会从多个方面来对框架做一些简单的介绍。
你是否想要开发一个**高性能、稳定、易用、自带负载均衡、避免类爆炸设计、可跨进程跨机器通信、集群无中心节点、集群自动化、有状态多进程的分步式的**网络游戏服务器呢?如果是的话,这里向你推荐一个由 java 语言编写的网络游戏服务器框架 ioGame。下面将会从多个方面来对框架做一些简单的介绍。



ioGame 是一个 java 网络游戏服务器框架,有以下特点:

- 无锁异步化、事件驱动的架构设计
- 支持 websocket 和 socket 两种通信协议
- 支持 protobuf、json 等不同的通信协议
- 集群无中心节点、自动化、分布式的设计
- 轻量级,不依赖第三方中间件或数据库
- 与 spring 和其他框架融合方便
- 学习成本低,开发体验好
- 支持多服单进程、多服多进程的启动和部署方式
- 提供游戏文档生成的辅助功能
- 包体小、启动快、内存占用少
- 提供优雅的路由访问权限控制



Expand Down Expand Up @@ -382,7 +398,7 @@ ioGame 在打包、内存占用、启动速度等方面也是优秀的。打 jar



在分布式方面,ioGame 的逻辑服使用了分步式设计思想,将服务器分为游戏对外服、游戏逻辑服等不同层次,并且每一层都有明确的职责和接口。这样可以提高代码可读性和可维护性,并且方便进行水平扩展。
在分布式方面,ioGame 的逻辑服使用了分布式设计思想,将服务器分为游戏对外服、游戏逻辑服等不同层次,并且每一层都有明确的职责和接口。这样可以提高代码可读性和可维护性,并且方便进行水平扩展。



Expand All @@ -398,7 +414,7 @@ ioGame 在打包、内存占用、启动速度等方面也是优秀的。打 jar



在与前端对接方面,ioGame 提供了[游戏文档生成](https://www.yuque.com/iohao/game/irth38)的辅助功能,可以做到**代码即对接文档**。简单地说,当业务代码编写完后,框架会自动生成最新的文档。如果没有游戏文档的生成,那么你将要抽出一些时间来编写、维护对接文档的工作,而且当团队人数多了之后,文档就会很乱、不同步、不是最新的、忘记更新等情况就会出现。
与前端对接联调方面,ioGame 提供了[游戏文档生成](https://www.yuque.com/iohao/game/irth38)的辅助功能,可以做到**代码即对接文档**。简单地说,当业务代码编写完后,框架会自动生成最新的文档。如果没有游戏文档的生成,那么你将要抽出一些时间来编写、维护对接文档的工作,而且当团队人数多了之后,文档就会很乱、不同步、不是最新的、忘记更新等情况就会出现。



Expand Down Expand Up @@ -990,15 +1006,19 @@ ioGame游戏框架由 [网络通信框架] 和 [业务框架] 组成。所以我

### 对接方面

日常中,我们编写完成业务需求后,就会与游戏前端的同学进行联调对接的环节。在对接前需要提供相应的对接文档,如:如何访问该需求的业务方法、访问该业务方法需要什么参数、会得的响应是什么、对于该业务方法的描述等等。


**ioGame 的游戏文档生成功能**

在游戏开发中,编写业务需求后,需要与前端同学进行联调对接。为了方便对接,需要提供相应的文档,包括业务方法、参数、响应和描述等。


对于这方面 ioGame 也提供了一些辅助 [游戏文档生成](https://www.yuque.com/iohao/game/irth38) ,通过该辅助可以做到代码即文档,就是说当你的业务编写完成后,不需要额外的编写业务对接文档了,框架会自动的生成最新的文档。

对于这方面 ioGame 提供了一些辅助[游戏文档生成](https://www.yuque.com/iohao/game/irth38),通过该辅助来自动生成最新的对接文档,做到了代码即文档。这样就不需要额外的编写和维护文档了,可以节省时间和避免错误。


如果没有游戏文档生成,那么你将要抽出一些时间来维护文档的工作,而且当团队人数多了,就会很乱(文档不同步、不是最新的、或是忘记更新等等情况就会出现)。

ioGame 的游戏文档生成功能可以让开发者专注于业务逻辑,而不是文档编写。它也可以提高团队协作的效率和质量,保证文档的同步和准确。如果没有游戏文档的生成,那么你将要抽出一些时间来编写、维护对接文档的工作,而且当团队人数多了之后,文档就会很乱、不同步、不是最新的、忘记更新等情况就会出现。



Expand Down Expand Up @@ -1038,19 +1058,15 @@ ioGame游戏框架由 [网络通信框架] 和 [业务框架] 组成。所以我

### 代码泄漏机率更小

传统的游戏项目通常是单机结构的,即项目在代码都在一个目录中,这样代码是很容易泄漏的,且一但泄漏将会是全部泄漏,因为这些代码都在一个项目中;



这种情况在 ioGame 中是可以做到一些防范与避免的;现在我们知道了,游戏逻辑服可以支持分布式开发方式的,如果项目有多个模块,我们可以将这些模块分配给团队中不同的开发人员,开发人员只能看到自己所负责的模块,而看不到其他成员的模块代码;


传统的游戏项目通常采用单机结构,把所有的代码放在一个目录中。这样做有很大的风险,因为如果代码泄漏了,就会泄漏整个项目的内容。

在这期间,团队管理员可以在公司的内网服务器中,部署一个游戏网关和游戏对外服,因为这两个是不需要经常重启的和变更的。通常情况下,我们更多的是在游戏逻辑服上进行业务编码,所以可以将游戏逻辑服在我们自己的本机进行编码工作;这样做的好处有:1. 游戏客户端(游戏前端)不会因为游戏逻辑服的业务逻辑变更、重启,而与游戏服务器断开连接;2. 开发人员在自己开发机上只需要启动自己负责的游戏逻辑服;


ioGame 可以支持分布式开发方式,让不同的开发人员只负责自己的游戏逻辑服模块,而不会看到其他人的代码。这样可以降低代码泄漏的风险和影响。团队管理员只需要部署一个游戏网关和游戏对外服在内网服务器上,而开发人员可以在本机上编码和测试自己的游戏逻辑服模块。这样还有以下好处:

在涉及到与其他游戏逻辑服的联调时,我们可以查看其他模块提供的对接文档(这些文档是由 ioGame 自动生成的),由于是分工合作的,所以我们可以把代码泄漏风险进一步的降低;
- 游戏客户端不会因为游戏逻辑服的变更或重启而断开连接。
- 开发人员不需要启动其他人的游戏逻辑服模块。
- 开发人员可以通过 ioGame 自动生成的文档来进行模块间的对接。



Expand Down
2 changes: 1 addition & 1 deletion common-net/common-net-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.iohao.game</groupId>
<artifactId>iogame</artifactId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion common/common-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class IoGameVersion {
public static final String VERSION;

static {
String internalVersion = "<version>17.1.33</version>";
String internalVersion = "<version>17.1.34</version>";

VERSION = internalVersion
.replace("<version>", "")
Expand Down
2 changes: 1 addition & 1 deletion common/common-kit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion common/common-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion net-bolt/bolt-broker-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion net-bolt/bolt-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion net-bolt/bolt-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion net-bolt/bolt-external/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion net-bolt/bolt-run-one/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.iohao.game</groupId>
<artifactId>iogame</artifactId>
<version>17.1.33</version>
<version>17.1.34</version>
<name>ioGame</name>
<description>ioGame 网络游戏服务器框架</description>
<url>http://game.iohao.com</url>
Expand Down
2 changes: 1 addition & 1 deletion widget-game/light-game-room/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/light-domain-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/light-jprotobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/light-log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.iohao.game</groupId>
<artifactId>iogame</artifactId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion widget/light-profile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/light-redis-lock-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion widget/light-redis-lock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/light-timer-task/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iogame</artifactId>
<groupId>com.iohao.game</groupId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion widget/other-tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.iohao.game</groupId>
<artifactId>iogame</artifactId>
<version>17.1.33</version>
<version>17.1.34</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit 6722c07

Please sign in to comment.