RedRabbit-based on the BrokerPattern Server framework

Source: Internet
Author: User

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
  • L-gate_listen
  • L-brkoker
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.