Web Real-time Communications (WebRTC) is a collection of standards, protocols, and JavaScript apis that combine to enable peer-to-peer audio, video, and data sharing between browsers (peers). Instead of relying on third-party plug-ins or proprietary software, WebRTC turns real-time communication into a standard feature that any Web application can take advantage of through simple JavaScript apis.

Delivering rich, high-quality RTC applications, such as audio and video teleconferencing and peer-to-peer data exchange, requires many new features in the browser: audio and video processing capabilities, new application apis, and support for six new features. Network protocol. Thankfully, the browser abstracts much of this complexity from three main apis:

  • MediaStream: Gets audio and video streams
  • RTCPeerConnection: Audio and video data communication
  • RTCDataChannel: Communication of arbitrary application data

With just a dozen lines of JavaScript code, any Web application can achieve a rich teleconferencing experience through peer-to-peer data transfer. This is the promise and power of WebRTC! However, the apis listed are just the tip of the iceberg: signaling, peer discovery, connection negotiation, security, and the entire layer of the new protocol are just some of the components that bring them together.

Not surprisingly, the architecture and protocols that support WebRTC also determine its performance characteristics: connection setup wait time, protocol overhead, and delivery semantics, to name just a few. In fact, unlike all other browser communications, WebRTC transmits its data over UDP. But UDP is just a starting point. To make real-time communication in a browser a reality, it costs a lot more than raw UDP. Let’s take a closer look.

WebRTC enabled for 1B + users: The latest Chrome and Firefox browsers provide WebRTC support for all users! That being said, WebRTC is also actively under construction at the browser API level as well as at the transport and protocol level. Therefore, specific apis and protocols discussed in future chapters may still change.

WebRTC standards and development

Enabling real-time communication in the browser is an ambitious undertaking, and arguably one of the most important additions to the Web platform since its inception. WebRTC’s departure from the familiar client-to-server communication model has led to a complete redesign of the network layer in the browser and brought about an entirely new media stack, which is necessary for efficient, real-time processing of audio and video.

As a result, the WebRTC architecture consists of a dozen different standards covering application and browser apis, as well as many different protocols and data formats needed to make it work:

  • The Web Real-time Communications (WEBRTC) W3C working group is responsible for defining browser apis.
  • Real-time Communication in Web Browsers (RTCWEB) is the IETF working group responsible for defining protocols, data formats, security and all other aspects necessary to achieve peer-to-peer communication in browsers.

WebRTC is not a blank standard. Although its primary purpose is to enable real-time communication between browsers, it is also designed so that it can be integrated with existing communication systems: Voice over IP (VOIP), various SIP clients, and even the public Switched telephone Network (PSTN), to name a few. The WebRTC standards do not define any specific interoperability requirements or apis, but they do attempt to reuse the same concepts and protocols where possible.

In other words, WebRTC is not just about bringing real-time communication to the browser, it’s about bringing all Web functionality to the telecom world — a market worth $4.7 trillion in 2012! Not surprisingly, this is a major development that many incumbent telecom providers, businesses and startups are watching closely. WebRTC is not just another browser API.

WebRTC use cases and performance

Implementing low-latency, peer-to-peer transmission is an extraordinary engineering challenge: NAT traversal and connectivity checking, signaling, security, congestion control, and countless other details need to be handled. WebRTC handles all of this on our behalf, making it arguably one of the most important additions to the Web platform since its inception. In fact, it’s not just the pieces that WebRTC provides, but the fact that all the components can work together to provide a simple and unified API for building peer-to-peer applications in the browser.

However, even with all the built-in services, designing efficient and high-performance peer-to-peer applications still requires a great deal of careful consideration and planning: Peer-to-peer does not mean high-performance in and of itself. If anything, the increased variability of bandwidth and latency between peers, as well as the high demands of media transport and the special nature of unreliable transport, make it an even more formidable engineering challenge.

conclusion

With the rapid development of mobile Internet, AI, 5G and other emerging technologies, combined with WebRTC technology, more application scenarios will be derived in the future, changing the way of life such as clothing, food, housing and transportation of human beings.