How to differentiate between instant and real-time communications

Source: Internet
Author: User


Real-time communication and instant Messaging

Instant messaging (IM) and real-time communication (Acoustic network Agora.io) are a set of network communication systems, the essence of which is the forwarding of information. The biggest difference is the time regulation of information transmission. The difference can be from the following aspects:

First, the scene

Common Instant Messaging scenarios include text chat, voice messaging, file transfer, audio and video playback, and more. In layman's parlance, it is texting.

The scene of real-time communication includes voice, video conference call, network telephone and so on. In layman's parlance, that is to call.

Second, the product demand point

Instant Messaging: The main requirement is reliable, check delivery rate. If you send a text message, the result is lost, the other party confiscated. You don't believe in texting any more.

Real-time communication: The main requirements for low latency and connection rate.
Low delay: You make a phone call, each said a word, the other party will have a few seconds to respond, the phone you can not talk about it.

Connection rate: You call, you heard on the side, in fact, the other side of the phone is unresponsive, this is actually not connected. This is the same as the bad effects of a message that is not delivered. Do not know how many good marriages will be destroyed.


Third, the technical link

Instant communication technology: Message delivery and acknowledgement, "Message access, server-side message logic processing, server-side message caching and storage, forwarding, server-side user state management, heartbeat mechanism, message sender", Message receipt and acknowledgement.

Real-time communication technology: acquisition, pretreatment, coding, "service-side access, forwarding, service-side access", decoding, playback and rendering.

The overlapping parts of these technical links are: information forwarding.

Iv. Transmission Protocol

On the public Internet, the most commonly used communication protocols are TCP and UDP.

Tcp:transmission Control Protocol, a protocol that is based on a connection, that is, a reliable connection must be established with the other before the data is officially sent and received. There is a delay in the uncontrolled characteristics.

Udp:user data Protocol, User Datagram Protocol, is a protocol corresponding to TCP. It is a connectionless protocol that does not establish a connection with the other, but instead sends the packet to the past directly. There are characteristics of packet loss, jitter and delay.

In order to ensure the reliability of the connection, the most commonly used is the TCP protocol or the Class TCP connection protocol. This kind of protocol is characterized by the pursuit of the reliability of the connection, the delay is caused by the uncontrollable, more than 2 seconds of delayed response is the normal, or even a few 10 minutes of delayed response, while the telecommunications level of real-time communication standard is 400ms, and internet-based real-time communication needs to explore a new way to create a novel transmission solution. This is also related to the application scenario. Texting, delayed delivery for a few seconds, has little impact on users.

Real-time communication, acoustic network Agora.io using UDP as the basic transport protocol. In the design of low latency real-time communication service, UDP performance is much better than TCP. This is because in real-time communication, low Shienbi reliability is more important. On the phone, a few seconds of delay is intolerable.


The TCP protocol encapsulates the retransmission mechanism of messages, and in the case of packet loss, applications using TCP protocol can hardly optimize the retransmission mechanism to achieve the low delay. Especially in mobile internet, more than 30% packet loss, TCP delay can be to a few 10 minutes, more than 50% lost packets, and even easy to disconnect. UDP can also transmit data on a link that also loses packet 30%, and TCP cannot communicate in real time.

Agora.io Acoustic Network based on UDP protocol, a variety of algorithms have been developed to compensate for the loss of packets, on the one hand, to ensure and restore the continuity of data. On the other hand, when some packets cannot be recovered, the corresponding audio and video packets are discarded without affecting the subsequent real-time communication services. In addition, the use of multiple room deployment, as far as possible to shorten the client access to the computer room, and ensure that the machine room RTT less than 60ms and 400ms packet loss rate less than 1%, based on the above standards, screening and deployment of servers, can greatly optimize end-to-end transmission path, but also greatly reduce the probability of delay


V. Cost

The costs involved are: service-side access, storage, and forwarding. (labor costs will not be discussed)

The factors that make the difference in cost are:

From the point of view of service-side access, the TCP protocol is used to guarantee the reliability of instant communication, which may establish multiple connections, which is an expensive transmission mode compared with connectionless UDP transmission. Real-time communication can be based on UDP protocol, with the service side to establish a flexible, fast access mechanism.

On the storage side, real time communications are forwarded in real time on the server side and do not store data on the server side, while instant messaging systems typically turn the cache into storage data, including rich media data, which consumes large amounts of storage space and creates more storage costs.

From the cost point of view, the transmission of the same amount of data, based on TCP instant communication mode, more emphasis on reliability, will give priority to the use of multiple line room transmission mode, high cost;

The real-time communication mode based on UDP will choose the optimal path to transmit the data, and can adjust the transmission path dynamically, which can efficiently use the bandwidth, improve the transmission efficiency and reduce the cost.

Vi. Open Source Projects

Instant Messaging: XMPP,MQTT

Real-time communication: WEBRTC, Tokbox


Vii. What are the groundbreaking application scenarios for real Time communications?

Although the previous call to give examples, but internet-based real-time communication and telephone calls are essentially different.

Real-time communication is rich media communication, not only voice, but also video, which gives a lot of traditional scenes new imagination.

Interactive live:

The traditional live broadcast is based on CDN's One-to-many live broadcast, the host plays, the audience looks. The interaction between the host and the audience is limited to the sending of flowers and rewards, and it is difficult to achieve a dialogue between the host and the audience.

Television news programs, based on television network transmission. The host in the studio has a conversation with the outside scene host, which is actually involved in the pilot. The pilot heard the location host start to speak, immediately told the anchor hurriedly began to speak. To the audience caused the studio in and the location host "dialogue" illusion.

If live broadcasting is based on real-time communication technology, the dialogue between the host and the audience is really a dialogue. There are also more groundbreaking interactive live scenes, such as the dual-broadcast debate in different places.

Interactive Online Education:

Teachers and students can talk in real time, do not know to ask, asked on the answer. This is the first need of education, who can solve this problem, who can greatly improve the quality of teaching.

Online video interrogation

Doctors and patients can be diagnosed by video. Patients in remote areas, doctors in foreign countries, through video can complete the preliminary diagnosis. Cosmetic surgery counseling, doctors can through video on patients to complete the first visit.


--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------

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.