Select to learn pomelo

Source: Internet
Author: User

In my previous projects, network communication was implemented based on HTTP. However, for games where multiple gamers compete simultaneously, HTTP short connections do not support server push. In this way, the client cannot receive messages from the server.

The simplest method is to initiate a request to the server at a scheduled time. Obviously, efficiency and traffic are problems.There is also the comet method, that is, the server maintains a connection and returns only when data is available.

I searched for comet on the Internet and commented that this method is not very efficient.

After HTML5 supports websocket, it seems that socket connection is an efficient and simple method. The client uses Socket. io is relatively simple. The server needs to find an engine, which is easy to use. It is best to use a familiar node. JS, such as Erlang, although the introduction on the Internet is very powerful and easy to use, it is too inefficient to learn a new functional language.

Node. js bare socket Writing seems to be very troublesome, and the writing quality is certainly not good, so Netease's pomelo has become my choice. After reading the pomelo tutorial, the design of this item seems awesome, and it seems very simple to use. Some commercial programs are also in use. It should be more reliable.

Appendix:

In-depth introduction to node. js game server development 1-Introduction to the basic architecture and framework

It mainly promotes pomelo.

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.