- Topics
- /
- Event-driven servers
- /
- WebRTC
WebRTC
![Martin Fietkiewicz](https://images.ctfassets.net/ee3ypdtck0rk/3eKg9yHbZTTtdTHNXF7Dhy/443b83719b513f26331a946ab9883699/martin-barcelona.jpg.png?w=300&h=300&q=80&fm=png)
WebRTC (Web Real-Time Communication) is a group of APIs and protocols which allow web and mobile applications to implement real-time communication, including, but not limited to, audio and video streaming and capture. Instead of having to rely on a client-server model of data transfer, WebRTC has peer-to-peer capabilities out of the box, meaning data can be streamed directly between browsers. This also means you don't need any plugins or 3rd party apps to implement it into your apps.
![](https://images.ctfassets.net/ee3ypdtck0rk/OjkYZC45yDvuwM6R2FXkn/5c93dbb2f74bfbd43ee4671303c8e1a3/webrtc-fig-1.png?w=1088&h=876&q=80&fm=png)
WebRTC interconnectedness among devices
History of WebRTC
Global IP Solutions (GIPS) was a telecommunications company that specialized in VOIP and video conferencing. It developed some realtime communication (“RTC”) components, including internet speech audio codecs and low bitrate codecs. Google bought GIPS in 2010 and inherited this work, which then became WebRTC. Initially a set of realtime communication APIs, it was made open-source and then released as WebRTC in 2011 with collaborative work between W3C, the IETF and Google. The first draft spec was published that same year. The latest WebRTC spec, along with its previous iterations, is available on the W3C website.
![](https://images.ctfassets.net/ee3ypdtck0rk/4CqI2D0EdhMuzmat8pjx3A/d1250b1dda8a78831fb8729e73d13156/webrtc-fig-2-history-timeline.png?w=1600&h=1066&q=80&fm=png)
WebRTC history
What are WebRTC Data Channels?
The act of sending data between peers is done by opening a WebRTC data channel using the RTCDataChannel interface. This supports the bi-directional exchange of data over an open connection, similar to other data transfer APIs such as the WebSocket API. The RTCDataChannel interface simplifies the process of sending data between peers, which can be very convoluted and involved. You can follow this Ably WebRTC tutorial to learn how to implement it within your application.
Secure by default All data that's transported via RTCDataChannel is encrypted by default using the Datagram Transport Layer Security (DTLS), which uses TLS as its foundation, meaning any data sent with RTCDataChannel is as secure as any data sent using HTTPS. Another security benefit is that since WebRTC API transports data between peers, the data never passes through the application or the internet, reducing the chances of it being intercepted or manipulated during transit.
Outbound buffering support Outbound data buffering is automatically handled and you can view information and receive notifications about the buffer.
Cross-platform support All WebRTC interfaces are available to use across multiple platforms, ensuring a wider pool of people has access to the APIs regardless of their browser.
TCP and UDP support TCP allows the transmission of data without packet loss and if the amount of data is too large, it can fall back to use UDP.
64KiB limit Since the protocol RTCDataChannel relies on (Stream Control Transmission Protocol – SCTP) was originally made to send signals which tend to be small in size, the interface doesn't have the capability to send large messages. This limit is reduced to 16KiB if you're doing cross-browser data transport.
Limitations with outbound buffering support At this time, it's not possible to set the size of the buffer.
UDP use can lead to data loss Using UDP gives permission for data loss to occur, which can lead to damaged and corrupted data.
Additional Reading
Recommended Articles
![](https://images.ctfassets.net/ee3ypdtck0rk/3TxuPr6thaJIipKGWn7f8j/b8c9dd0fc22f503ddff08b9ba9313b53/topics-message-brokers-kafka-vs-rabbitmq-aws-sns-sqs__1_.png?w=368&h=192&q=80&fm=png)
Apache Kafka vs RabbitMQ vs AWS SNS/SQS: Which message broker is best?
Discover the key considerations for choosing a message broker and how to choose between Apache Kafka, RabbitMQ, and AWS SNS/SQS.
![](https://images.ctfassets.net/ee3ypdtck0rk/54ECFfVcaln398XVZbDN6G/9097b926f6aa69164a4913ea6ce8531c/periodic-table-of-realtime.jpg?w=368&h=192&fl=progressive&q=80&fm=jpg)
APNs
APNs is a cloud service that enables third-party developers to push notifications to applications on Apple devices over a secure connection.
![](https://images.ctfassets.net/ee3ypdtck0rk/5julLusiD15bupZ6O63UeB/c94526053c6edc2d350c5b64af7a390e/topics-realtime-solutions-sockjs-v-websocket.png?w=368&h=192&q=80&fm=png)
SockJS vs WebSocket
Learn how SockJS and WebSocket compare, with key features, advantages, and disadvantages, as well as our recommendation on what to use.