KBEngine research report (rpm)

Transfer: https: //my.oschina.net/u/3599144/blog/1305452


This document is a research and analysis of new hand travel server architecture, due to the self-development framework is difficult to extend directly to the future of different projects, to provide a reference solution for several companies under section hand travel server development. The main reference point is the data persistence, concurrency efficiency, distributed, sandbox mechanism, hot update mechanism, research and development and maintenance costs. If the scratch according to the needs of the development of a new server architecture, requires a lot of time and may be more harm than good, a new framework of stability will take time. We should try to use open source, mature, active high open-source framework. The body will start to consider factors server design requirements analysis, as well as specific server architecture prototype we need, then analyze existing open source framework program.

 

Able to stand on the shoulders of giants, using the results of previous studies, it is the quickest and most effective way. There are many open source game server, according to our own factors, choose the right. Such a server engine is currently more active there: KBEngine (c ++ + python), scut (c # / python), pomelo (nodejs).

From the ease of use and cost into account, we have chosen to adopt two projects to develop KBEngine, IO is a game, is a MMORPG.

 

KBEngine comprehensive survey parameters:

Published in June 2012,

Open Source Address: https://github.com/kbengine/kbengine

Fork number 1300

Issues  22

Pull requests 12

Star:2000

The latest release version: V0.9.17

Code number of commits:> 5000

The number of community concern: Forum 4000 (http://bbs.kbengine.org/) + QQ group 5000, more active exchanges

Ongoing maintenance: As of now still lasting maintenance

Collected from the network to the community and success stories: Creation Online (MMORPG end large-scale tour), cool running Fuzion (2D horizontal version), pinball Wars (VR room in real-time battle), Neurowake (VR fps Battle), reversing card brand, tanks hero, and so on.

http://bbs.kbengine.org/forum.php?mod=viewthread&tid=4233&extra=page%3D1

Recruitment study: Baidu search for the keyword "familiar kbengine priority", you can find dozens of companies as their assessment bonus items, indicating that the technology has a certain influence.

 

Various Demo: 

Unity3d : https://github.com/kbengine/kbengine_unity3d_demo/releases/latest
Unity3d : https://github.com/kbengine/kbengine_unity3d_warring/releases/latest
UE4 : https://github.com/kbengine/kbengine_ue4_demo/releases/latest
Ogre : https://github.com/kbengine/kbengine_ogre_demo/releases/latest
Cocos2d_js : https://github.com/kbengine/kbengine_cocos2d_js_demo/releases/latest

other:

http://bbs.kbengine.org/forum.php?mod=viewthread&tid=1940&extra=page%3D1
http://bbs.kbengine.org/forum.php?mod=viewthread&tid=4187&extra=page%3D1


Various documents:
http://bbs.kbengine.org/forum.php?mod=viewthread&tid=1&extra=page%3D1
http://kbengine.org/cn/docs
https://github.com/kbengine/kbengine/ tree / master / docs

 

 

Composition server

		      |----------|
		      |  client  | x N
		      |----------|

------------------------|-----|-------------------------------

|----------|	     |----------|         |----------|
| loginsrv | x N     |  basesrv | x N     |basesrvmgr| x 1
|----------|         |----------|         |----------|

------------------------|-----|-------------------------------


	|----------|            |----------|
	|  cellsrv | x N	    |cellsrvmgr| x 1
	|----------|            |----------|

------------------------|-----|-------------------------------


	|----------|            |----------|
	|  dbmgr   | x 1	    |interfaces| x 1
	|----------|            |----------|

------------------------|-----|-------------------------------

         |-------------------------|
            | mysql | redis | mongodb | x N
         |-------------------------|

Stability Test:

https://www.youtube.com/watch?v=sWtk3CfxyGY
http://v.youku.com/v_show/id_XMjgyMjM0MTYwNA==.html?spm=a2h3j.8428770.3416059.1

Server-side component description

· loginapp:
登录验证、注册、接入口。
可在多台机器部署多个loginapp进程来负载。 


· dbmgr:
高性能多线程的数据存取。
默认使用Mysql作为数据库。


· baseappmgr:
协调所有baseapp的工作,包括baseapp负载均衡处理等。


· baseapp:
客户端与服务端的交互只能通过loginapp分配的baseapp来完成。
定时写entity的数据到数据库、baseapp数据相互备份、灾难恢复。
可在多台机器部署多个baseapp进程来均衡负载。
脚本层通常会选择在baseapp上实现如:社交系统、广播聊天、排行、游戏大厅、等等逻辑系统。


· cellappmgr:
负责协调所有cellapp的工作,包括负载均衡处理等。


· cellapp:
处理游戏与空间和位置有关的逻辑,如:AOI、Navigate、AI、战斗等等。
可在多台机器部署多个cellapp进程来动态均衡负载。 


· client:
客户端我们将提供基础框架,这个框架不包括渲染部分和输入输出部分的具体实现, 
我们将提供一个lib文件和一套API接口,开发者可以选择使用自己比较适合的图形渲染引擎与输入输出控制部分。
Unity3D, HTML5, Cocos2d等技术我们提供了相关插件,能够快速的和服务端对接。


· machine:
抽象出一个服务端硬件节点(一台硬件服务器只能存在一个这样的进程)。主要用途是接收远程指令处理本机上的组件启动与关闭, 
提供本机上运行组件的接入口以及收集当前机器上的一些信息, 
如:CPU、内存等。 这些信息会提供给一些对此比较感兴趣的组件。 


· interfaces: 
支持快速接入第三方计费、第三方账号、第三方数据, 快速与运营系统耦合。


· guiconsole: 
这是一个可视化的图形界面控制台工具,可以实时的观察服务端运行状态,实时观测不同Space中Entity的动态,
并支持动态调试服务端Python逻辑层以及查看各个组件的日志,启动服务端与关闭等。 


· logger: 
收集和备份各个组件的运行日志。

Brief introduction

一款开源的MMOG游戏服务端引擎,
仅Python脚本即可简单高效的完成任何游戏逻辑(支持热更新),
使用配套客户端插件能够快速与(Unity3D、UE4、OGRE、HTML5、等等)结合形成一个完整的客户端。

引擎使用C++编写,开发者无需重复的实现游戏服务端通用的底层技术,
将精力真正集中到游戏开发层面上来,稳定可靠并且快速的打造各种网络游戏。

(经常被问到承载上限,KBEngine底层架构被设计为多进程分布式动态负载均衡方案,
理论上只需要不断扩展硬件就能够不断增加承载上限,单台机器的承载上限取决于游戏逻辑本身的复杂度。)

Published 13 original articles · won praise 0 · Views 2309

Guess you like

Origin blog.csdn.net/kbengine/article/details/78327439