Original URL: http://www.csdn.net/article/2015-12-22/2826542
1. System Architecture Design. The system architecture is logically divided into four layers, and the bottom one is to provide access to the Meizu phone. The second layer is the message distribution service, the main function is to provide the uplink message routing and user downlink message path, here is a user routing table. The third tier is subscription information, and the fourth tier is storage, including the storage of off-shore message stores, including subscription messages.
2. Mobile phone power consumption problem mainly involves two points, the first one is the flow, the second is the power . First look at the flow of the problem, how to solve the problem of traffic, through the choice of protocol, now the traditional internet, there is more typical use of communication protocol, is the two protocols, XMPP, SIP, the two protocols have many advantages, the first is the new century components very much, if you want to quickly build a system out, These two protocols are the better choice. The disadvantage is that the protocol is very complex, a single standard document has dozens of pages, if it is completely read, to understand, it is estimated to take a long time, because the two protocols are based on the Internet, not for the mobile Internet optimization, so the protocol is relatively heavy, like XMPP, there are a lot of useless tags, We simply don't have these tags, including the SIP protocol, and there are a lot of headers, similar to the XMPP protocol. The most important point is the very consumption of traffic, so we define the IDG protocol, lightweight, codec is fast, is the above two protocol 10 times times the codec speed, the most important point is to save traffic, using the discovery to save traffic to 50% to 70%.
3. Here is a delay push, system use process, we found that some users of real-time requirements are not particularly sensitive, such as system upgrades, application upgrades, a few minutes earlier, or a few minutes later, and will not affect the user experience. We do not require high-real-time information, can make the phone in the wake of the state to push the message down, how do we know that the phone is awake state? This server is can be perceived, the front of the phone to maintain a long connection, it will be a heartbeat, the heartbeat will wake up the phone, the service received the heartbeat packet, and then push the message down, so that you can relatively reduce the power of a point of the phone. Through the optimization of these three points, it is basically relatively perfect to solve the power consumption problem of the phone, but this is only one of the pits, we have not succeeded in the revolution.
4. Grayscale Publishing. Grayscale Publishing, the user is not aware of the release, there are users can smooth migration, after the user smooth migration, we do in grayscale, load balancing inside can also use this function, assuming a cluster inside, a node of a number of users more time, You can move a part of a user with a high load to a node with a lower load.
5. Author Introduction: Wavelets, 2011 joined Meizu, now in the mobile internet sector, mainly engaged in service-side background development work, focus on the system high concurrency, distributed and other solutions.
Read "Architect in wavelet: Meizu real-time message Push Architecture" summary