Use Nodejs to build a server background similar to C + +. Similar to NetEase pomelo

Source: Internet
Author: User

The actual situation, with Nodejs run the business, very fast, as long as the use of its non-blocking and callback this two points, the processing speed is really the leverage. From the beginning of the year, I used Nodejs to build a similar C + + server backstage, but also want to do the same thing with friends to share, the service platform because it has been actually commercial, so the structure is relatively simple, please understand ~

First talk about the framework: 1. NET or WebSocket as the basis of communication protocol; 2. Multi-process, with parent process as daemon, child process as business process; 3. Database with MySQL, master and slave; 4. Use JSON as the primary data format.

In this way, complex business processing can be modularized, for tight coupling is put together to deal with, for loose coupling is placed in different server groups for processing. In fact, there are a lot of Java or C + + development of code, its logical structure is the same, and for many people say the efficiency problem, is actually very simple thing. How many so-called scientific operations can be found in the normal business process logic? Most of them are run logic code.

The schema diagram resembles the following:

Use Nodejs to build a server background similar to C + +. Similar to NetEase 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.