RedRabbit classic online game server architecture
This figure omits the Special Purpose
- L LoginGate
- L because
- L GameServer
Disadvantages:
- L passing between nodes
- L each node often needs to interact with each other. In this case, the problem of who is connected to whom is involved. It is not easy to understand and design the network topology of the architecture, and the corresponding configuration will also be cumbersome, troubleshooting is also difficult.
- L GameServer
- L because the architecture must correctly configure the connection relationship, otherwise it will not work properly and it is not easy for O & M.
After discussing the server architecture of classic online games, today's theme is coming soon. But before that, let's talk about the core idea of this architecture, if you have read model-oriented software architecture, you may have thought of it.
- L LookUp
- L Route
- L registration service,
BrokerPattern
So today's theme is how to use
RedRabbit
Objectives:
- L asynchronous message and callback modes are used for communication between nodes
- L Server
- L C ++/EPOOL
- L this framework can easily build a single block Architecture
- L this framework supports cross-zone group communication, which is also
The framework name is
FFRPC
First, we will introduce
- L BrokerMaster
- L BrokerSlave
- L Client
- L Service
- L BrokerBridge
Roles:
Use
Http://www.cnblogs.com/zhiranok/archive/2013/06/06/ffrpc.html
RedRabbitGate
Internet access
- L Client
- L Scene @ 0
- L Client
- L Gate
In particular,
- L./app_redrabbit-gate @ 0-broker tcp: // 127.0.0.1: 10241-gate_listen tcp: // 121.199.21.238: 10242
- L-gate
Scene
In
- L Verification
- L Processing
- L Processing
- L Scene
- L Scene
- L Scene
- L Scene
Use
Http://ffown.sinaapp.com/flash/
Modify the name and click
The parameters for enabling the chat room server are
./App_redrabbit-gate @ 0-broker tcp: // 127.0.0.1: 10241-gate_listen tcp: // 121.199.21.238: 10242-python_path./-scene @ 0
In this example
Corresponding
time.strftime( == =@ffext.session_call(1= content == = ffext.reload() ffext.broadcast_msg_session(1, % (%= %1 [session_key] = %11, 1 ffext.send_msg_session(session_id, 1, = %1=1, 1()
- L Ffrpc
- L use
- L RedRabbit
- L RedRabbit
Start
./App_redrabbit-broker tcp: // 127.0.0.1: 10241
Start
./App_redrabbit-broker tcp: // 127.0.0.1: 10242-bridge_broker GroupA @ tcp: // 127.0.0.1: 10241
Start
./App_redrabbit-broker tcp: // 127.0.0.1: 10242-bridge_broker GroupB @ tcp: // 127.0.0.1: 10241
In
Ffext. bridge_call ('groupb', cmd, msg, callback)
Project source code:
Https://github.com/fanchy/RedRabbit
TODO:
Build cross-Server