With the widespread coverage of 4G networks and wireless networks, and the rapid growth of mobile Internet, our communication methods have undergone tremendous changes. Mobile terminals have gradually replaced PC terminals and become the main communication carrier. Industry insiders believe that XMPP, as the standard for IM communication in the PC Internet era, can no longer adapt to the development of mobile Internet. As such, traditional IM products must also change to adapt to the development of mobile networks. What kind of IM product is most suitable for mobile Internet? Recently, Ronglian Cloud Communications announced that it will restructure its architecture and release IM5.0 to meet the needs of mobile Internet. 51CTO interviewed Zhang Jingyu, Product Director of Ronglian Cloud Communications, to interpret cloud communication IM products in the mobile Internet era. Reporter: What are the basic functions of Ronglian Cloud Communication IM? Zhang Jingyu: The cloud communication platform is a platform with full communication capabilities, and there are products around all aspects of communication. IM is just one of them. The basic functions are: single chat, which refers to the point-to-point function, supports the sending of text, voice, pictures, attachments, and emoticons, and supports receipts for sent messages. The concept of sending means that you send a message to the server, and the server will give you a confirmation that the message has been received by the server; group chat function, supports groups of 2,000 people, one group can join 2,000 people, and each person can join 500 groups. Support private groups and public groups; device push function; the server sends broadcast messages, and sends messages to fixed groups or all users on the server side; data statistics: statistics on how many users in the APP used the IM function within a period of time, how many messages were sent, and from what devices. Reporter: Ronglian Cloud Communications only released its first version in 2013, and now it has released version 5.0. What kind of evolution has it gone through? Zhang Jingyu: When we first started, our business model was to imitate a foreign company and make calls to landlines through a network interface. In the first version, VoIP was mainly integrated. Enterprises use VoIP to solve internal communication problems and reduce communication costs, so there is a demand for IM. We added IM functions in version 2.0; in version 3.0, the SDK capabilities are basically complete, including IM capabilities, video and audio capabilities, video conferencing capabilities, and telephone conferencing capabilities. These four versions were driven by user needs and we did not have our own top-level design. Our team used to be mainly engaged in communications, and we adopted the PC-side thinking. We did not consider usability too much, so there were many problems reported by users in the early stage. In version 4.0, we made some optimizations to usability, and users will be relatively easy to access. After this problem was solved, users also reported traffic, power consumption and other issues. We did a relatively comprehensive analysis and found that the original architecture was completely unsuitable for the mobile terminal, so we decided to overturn the previous architectures, reconstruct the architecture completely based on the mobile terminal, and launched version 5.0. Reporter: What specific things have you done to overthrow the original architecture and reconstruct the architecture based on the mobile terminal? Zhang Jingyu: First, we analyze the characteristics of mobile communications, such as unstable network, high packet loss rate, high latency, traffic sensitivity, high traffic charges, power consumption, etc. We mainly consider the following aspects: Network considerations: We have 2G, 3G, 4G, and WIFI, and different operators have different network conditions, so we need to respond differently; Message middleware: The main function of message middleware is decoupling. Consider whether to use message middleware; Database: What kind of database should I choose? Relational, non-relational, or a mixture? Non-relational databases are more efficient. IM protocol: XMPP is a text protocol. Its definition protocol is highly readable and extensible, but it is more suitable for PCs. The simple protocol consumes more traffic. The Redis protocol is not widely used in the industry. ***, we have determined the goals for the mobile terminal. The first is to log in quickly and send messages quickly; the second is to save power and data; the third is to be stable, without losing messages, and the stability must reach more than 99.99%. Reporter: Based on these goals, what solutions did Ronglian Cloud Communications adopt? Zhang Jingyu: We have adopted a DNS-free design to meet the demand for fast login. Mobile login is divided into several processes. The first is to establish a channel, the second is to do DNS resolution. If you have a domain name, it will connect to your domain name and there will be a domain name resolution. The third is to make a TCP connection. In DNS resolution, we think that the DNS step can be omitted, because DNS resolution usually consumes more time. Generally, it takes 100 to 200 milliseconds in the fastest case, and even 3 or 4 seconds in the slowest case. Therefore, we first adopted a DNS-free design. Remove the registration process. When using a third-party communication cloud, you will usually encounter such a situation. After the user registers on your platform, he must also register an account on the third-party communication cloud. Now users do not need to register on the third-party communication cloud when registering. When logging in, they can directly enter the account number. The third-party communication will directly verify whether the user is logged in legally. If not, it will be directly recorded in the background. In addition, some other application mechanisms are added to save the process of users registering and returning their accounts, because the account number cannot be recorded on the client. With the small packet protocol, the protocol of the business layer can be completely customized, but at the minimum, the message is a fixed format. For example, for text messages, which are the most sent, we remove the message type in the text message. When the server receives the message, it finds that there is no message type and thinks it is a text message. This can reduce a lot of traffic. At the same time, we adopted the "protobuffer+customization" protocol, which saves a lot of traffic. In terms of stability, we mainly adopt multi-segment ACK confirmation and *** storage. The message will be sent to the connector, middleware and logical server. Before my message is *** stored, we will give the user an ACK confirmation. After ***, we will give the user a reply message, indicating that you have sent it successfully. In addition, the service stability is guaranteed by the architecture. Generally speaking, there is a navigation in the traditional way. When the user logs in, he will first go to the navigation server, and then get the corresponding IP address to log in. We have removed the navigation, so we will connect directly. This is a cluster of connectors. It does not do any business logic, but only manages the connection. At present, we have achieved a connector. The 8-core 16G server can achieve 800,000 long connections. 800,000 is a slow load. When sending text messages, the processing speed will be slow, so we adopted the strategy of server-side control. Each machine can allow 500,000, which has no effect on the processing of the entire message. Under the connector, we adopted the message middleware method. Although it may bring nodes of system disasters, it brings a lot of convenience when programming and system maintenance. Reporter: The release of 5.0 specifically points out the reconstruction of the architecture. Where is this reconstruction reflected? Zhang Jingyu: We have adopted a brand-new architecture called the push-pull system architecture. Both WeChat and Momo have adopted the push-pull system architecture to meet the needs of large-scale users. Strictly speaking, push and pull are not just about multimedia messages, but also about text messages. Text messages can be large or small. If the text is large and your network condition is not good, the recipient will not be able to receive it, so we adopt a complete push and pull method. In the past, if you could not push it, you could only wait for the offline state, and even if the network condition was good, you could not receive the message. Now, once the network condition is good, you can receive the message. In terms of structure, the main problem is fast reception. It is precisely because of this architecture that we overturned the original architecture and cited the logic of the version number. Summarize: During the interview, Zhang Jingyu has been emphasizing that the IM5.0 product launched after the restructured architecture is the most suitable for the needs of mobile Internet, and it is faster, more economical and more stable. Currently, the product is available for download, and we look forward to the market's response. |
<<: iOS 9 multitasking split screen tips
>>: The Internet is good, but it's getting worse
Every choice Xiulian makes "creates" a ...
In December 1994, French explorer Jean-Marin Chau...
Friends often ask me that they spent a lot of mon...
In January 2022, the overall situation of automob...
Mixed Knowledge Specially designed to cure confus...
At present, official accounts are still the best ...
Every year on the eve of Apple's new product ...
After all your preparations, you didn’t expect th...
After four years of various tests, ignitions, and...
Tencent products, a high-quality performance mark...
Editor's note: Howard Morgan is the founder a...
Recently, there have been frequent "explosio...
For bidding promotion personnel, in addition to B...
How to operate it? Where is the output value of t...
As an SEO for a large company, the most difficult...