[3] Server Structure Analysis of pomelo game Server programming sharing

Source: Internet
Author: User

Direct



The pomelo Server framework can be divided into two layers: the connection layer (connector, gate) and the service layer (logic, Master), also known as the frontend server) and backend server ).

The connection layer directly communicates with the client over the network. The client requests are forwarded to the logic at the service layer through the connection layer for processing. After the processing, the results are forwarded to the connector.

This structure allows us to expand servers, especially for balancing.

It must be noted that the gate and master are used. The first request sent by the client is sent to the gate server, and then the gate server assigns a connector server to the client. The specific allocation policy is controllable by the program. The master is mainly responsible for server management, such as new server activation and server shutdown.

Because there can be multiple logic servers, the client needs to tell connector which Logic Server the message needs to be sent to when sending a request. Therefore, pomelo introduces the routing mechanism, that is, the route information must be specified for all messages on the client, and the messages are correctly delivered.

Logic servers can be divided into different servers by function, such as scenario servers, chat servers, and user information management servers. Therefore, communication between different servers is inevitable. Therefore, pomelo introduces the RPC mechanism, that is, the communication between all logic servers can be completed through RPC, which is convenient.

References:

Pomelo framework overview https://github.com/NetEase/pomelo/wiki/pomelo%E6%A1%86%E6%9E%B6%E6%A6%82%E8%BF%B0

[3] Server Structure Analysis of pomelo game Server programming sharing

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.