Real-Time Communications

The Liberty Real-Time Communications feature rtcomm-1.0 enables a highly scalable signaling infrastructure used to connect WebRTC clients and other types of Internet of Things (IoT) nodes into real-time audio, video, or data interactions. Stabilized feature: The rtcomm-1.0 feature is stabilized. No strategic alternative exists. We can continue to use the rtcomm-1.0 feature.

The feature supports both registrations of clients, as well as the exchange of signaling that is needed to create a WebRTC peer connection between two endpoints.

WebRTC is an emerging HTML5 standard set of JavaScript APIs that enable developers to add real-time communications to their web applications using only JavaScript with no browser plug-ins. To learn more about WebRTC go to WebRTC. While WebRTC encompasses things such as audio and video codecs, echo cancellation, and Interactive Connectivity Establishment (ICE) for firewall traversal of media streams, it does not include support for the call signaling needed to set up the media streams between endpoints that want to communicate. The new rtcomm-1.0 feature provides a call signaling connector that runs on Liberty and also includes a client-side JavaScript library that encapsulates both call signaling and a wrapper for WebRTC. The library exposes a simple API for rapid integration of audio, video, or data communications into new and existing web applications.

In the following diagram, call signaling flows between the Liberty server and the Message Queue Telemetry Transport (MQTT), and between the MQTT and two WebRTC clients. Media streams pass between the two WebRTC clients.

Figure 1. Components that make up the Rtcomm Feature

As the diagram shows, the WebRTC clients communicate with the backend Liberty server via the Message Queue Telemetry Transport (MQTT). MQTT is a machine-to-machine (M2M)/Internet of Things connectivity protocol. This protocol is a lightweight publish and subscribe messaging transport. MQTT is an open standard and open source clients exist for JavaScript, Java , and many other languages; see MQTT for details. The rtcomm client library is built on the Eclipse Paho JavaScript client that uses WebSocket as its underlying transport; see Paho for details.

Many options of MQTT message brokers exist in the market today. For development purposes, IBM MessageSight for Developers can be downloaded from the following URL, IBM MessageSight for Developers. Here is a list of some of the more commonly used MQTT message brokers:

Attention : Public, cloud-based MQTT brokers like MQTT Dashboard should not be used for anything more than testing. There is no way to predict when public servers will go up and down and many public servers periodically delete their open connections and subscriptions. Production deployments must always rely on a secure server such as a deployment of IBM MessageSight.

Note: Make sure that the MQTT message broker we are using supports WebSocket, otherwise, the WebRTC clients cannot connect to it.