The principle of mobile phone push service is very simple, is through the establishment of a mobile phone and server connection link, when the message needs to be sent to the phone, through this link to send. The use of push services is slightly different but roughly the same as iOS APNs
1, the first is the application registration message push.
2, iOS and APNs server to Devicetoken. The application accepts Devicetoken.
3. The application sends the Devicetoken to the push service-side program.
4. The service-side program sends messages to the APNS service.
5. APNs service sends messages to iphone app
The accepted evaluation of the push scheme adopts the 4s standard: 1. Safe (Safety) 2. Stable (Stable) 3.Save (save Power Province cost) 4.Slim (small size)
1.Safe (SAFE)
The push scheme should support the transmission and various encryption schemes to ensure the security of information transmission.
The ID system of the push scheme should be independent of the ID system of the existing website or service, so as to protect the accuracy of information delivery after the user has logged on on different mobile phones, and avoid the mis-delivery of the information caused by the failure of the binding event due to the network transmission.
2. Stable (Stable)
Stability consists of two parts one is server-side stability, and the other is the stability of the mobile phone side.
Service-side stability, because the use of long-connection scheme, the cost and requirements of the server is very large, the push scheme for server development requirements are high, mass line thread attached server stability is very challenging. The general criteria for evaluation include:
-Simultaneous on-line peak (typically evaluated for server stability in millions of concurrent connections)
-Average message latency at high concurrency (typically measured in 1 minutes with 1 million messages)
-Service stability (general requirements 99.9% or more available throughout the year, backup, load balancing, etc.)
In view of the difficult development of server stability, small teams do not recommend their own development, the proposed use of stable third-party push programs, such as a push, butterflies and so on.
The stability of the mobile phone, mainly because of the complex network conditions in China and the mobile phone model adaptation situation caused the mobile phone long-time stable networking more difficult, so stability is very important, the general criteria include:
-23.5 + hours of daily Internet user ratio (characterizing networking stability)
-Receipt rate within 9 hours after message is sent (representational arrival rate)
In general, the push program to do network sub-operators, sub-provincial, sub-model adaptation, the development of their own large amount of work
3.Save (Save)
Save power should pay attention to CPU hibernation, general use of services to shorten the standby time percentage evaluation
Save traffic should pay attention to protocol modification and redundant data packet processing, general use no-load standby monthly flow evaluation
Cost-saving should consider a single server hosting simultaneous connections, can host simultaneous connections, the lower the cost, the industry's top level of a push single server 500,000 connection
4.Slim (small size)
Push service should be as small as possible, do not affect the size and complexity of the main program, generally less than 300K appropriate.
Introduction to push