kbengine research report

 

This document is mainly to investigate and analyze the new mobile game server architecture. Since it is difficult to directly extend the self-developed framework to different projects in the future, it provides a reference solution for the company's next mobile game server development. The main reference points are data persistence, concurrency efficiency, distribution, sandbox mechanism, hot update mechanism, R&D and maintenance costs. If a new server architecture is developed from scratch according to requirements, it will take a lot of time, and it may not be worth the loss. It takes time for a new architecture to stabilize. We should try to use open source, mature, active open source frameworks. The main text will first analyze the requirements from the factors that need to be considered in server design, and even clarify the server architecture prototype we need, and then analyze the existing open source architecture solutions.

 

Being able to stand on the shoulders of giants and use the research results of our predecessors is the fastest and most effective way. There are many open source game servers, and we should choose the right one according to our own factors. Such server engines are currently active: KBEngine (c++ + python), scut (c#/python), pomelo (nodejs).

From the comprehensive consideration of ease of use and cost, we first used KBEngine to develop two projects, one is an IO game and the other is an MMORPG.

 

KBEngine comprehensive survey parameters:

Published in June 2012,

 

Open source address: https://github.com/kbengine/kbengine

Fork times 1300

Issues  22

Pull requests 12

Star:2000

Author: Ke Biao

Author QQ: 3603661

Author email: [email protected]

The latest release version: V0.9.17

Number of code submissions: > 5000

Community followers: 4,000 in the forum (http://bbs.kbengine.org/) + 5,000 in the QQ group, with active exchanges

Ongoing Maintenance: Up to now, ongoing maintenance

Successful cases collected from the community and the Internet: Genesis Online (large-scale MMORPG client game), Cool Run (2D horizontal version), Pinball Battle (VR real-time room battle), Reverse Card, Tank Hero, etc. .

Recruitment inspection: Baidu searched for the keyword "familiar with kbengine is preferred", and it can be found that dozens of companies use it as an assessment bonus item, indicating that the technology has a certain scope of influence.

 

Various Demos: 

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


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

 

Server composition

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

                     |  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 Component Description

login app:

Login verification, registration, access port.

Multiple loginapp processes can be deployed on multiple machines to load.

 

 

· dbmgr:

High-performance multi-threaded data access.

By default, Mysql is used as the database.

 

 

· baseappmgr:

Coordinates all baseapp work, including baseapp load balancing processing, etc.

 

 

· baseapp:

The interaction between the client and the server can only be done through the baseapp allocated by the loginapp.

Regularly write entity data to the database, back up baseapp data with each other, and perform disaster recovery.

Multiple baseapp processes can be deployed on multiple machines to balance the load.

The script layer usually chooses to implement logic systems such as social system, broadcast chat, ranking, game lobby, etc. on the baseapp.

 

 

· cellappmgr:

Responsible for coordinating all cellapp work, including load balancing processing.

 

 

· cellapp:

Handle game logic related to space and location, such as: AOI, Navigate, AI, combat, etc.

Multiple cellapp processes can be deployed on multiple machines to dynamically balance the load.

 

 

· client:

We will provide the basic framework on the client side, this framework does not include the specific implementation of the rendering part and the input and output parts,

We will provide a lib file and a set of API interfaces, and developers can choose to use their own more suitable graphics rendering engine and input and output control parts.

We provide related plug-ins for Unity3D, HTML5, Cocos2d and other technologies, which can quickly connect with the server.

 

 

· machine:

A server hardware node is abstracted (only one such process can exist on a hardware server). The main purpose is to receive remote commands to process the startup and shutdown of components on the machine,

Provide access to components running on this machine and collect some information on the current machine,

Such as: CPU, memory, etc. This information will be provided to some interested components.

 

 

· interfaces:

Supports quick access to third-party billing, third-party accounts, and third-party data, and quickly couples with the operating system.

 

 

· guiconsole:

This is a visual graphical interface console tool, which can observe the running status of the server in real time, and observe the dynamics of entities in different Spaces in real time.

It also supports dynamic debugging of the server-side Python logic layer, viewing the logs of each component, starting and closing the server, etc.

 

 

· logger:

Collect and backup operational logs of various components.

 

Introduction

An open source MMOG game server engine,

Only Python script can complete any game logic simply and efficiently (support hot update),

Use the companion client plugin to quickly combine with (Unity3D, UE4, OGRE, HTML5, etc.) to form a complete client.

 

The engine is written in C++, and developers do not need to repeatedly implement the underlying technology common to the game server.

Concentrate on the game development level and create various online games stably, reliably and quickly.

 

(It is often asked about the upper limit of the load, the underlying architecture of KBEngine is designed as a multi-process distributed dynamic load balancing scheme,

In theory, it is only necessary to continuously expand the hardware to continuously increase the load limit. The load limit of a single machine depends on the game logic itself.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324383544&siteId=291194637