Real Time Communications Featured Article

How APIs Enable Real Time Communications

August 15, 2014

Real time communications is getting more attention in the greater market as new developments allow us to bypass proprietary platforms and easily collaborate. Now that we’ve gotten a taste of this simplicity, there are a number of areas of opportunity. As WebRTC developments continue to emerge, new product and solutions will quickly follow.

The ability to leverage real time communications is dependent upon an application programming interface (API). The API plays the role of specifying how software components should work together and interact with each other to perform as they should. In communications, we need APIs to ensure direct connections and supported interactions.

The key challenge, especially in WebRTC, is that not all APIs are alike. While we know that they make it easy to share data between two systems, they might be server-driven or client-driven. Client-driven integrations are easy as the client makes the request and the server responds. If a request needs to go the other way, it’s not a simple task.

A great example of this is when you use a smartphone app to place an order with your favorite restaurant or retailer. The API at the restaurant or retailer is the server and the smartphone app serves as the client. When you hit the button to place the order, the app has received the command needed to make a request to the store’s API.

This process is great if the communication needs to end there. But if the customer wants to know the status of his order, this kind of API is not designed to handle such a request. Client-only requests limit what the app can do, but software developers can work around this with polling where the customer simply asks repeatedly for updates. Long polling is a similar process, but the server doesn’t respond each time.

Webhooks is another option as it simply removes the limitation rule. In this scenario, the client makes requests and listens for them so the server can easily push out updates. And, the only reason this actually works correctly is because the client becomes a server, too. This method easily enables two-way communication.

In the WebRTC world where the focus is always on real time communications, the interaction has to go both ways. There can’t be limiting rules. In fact, WebRTC focuses on the exact opposite, allowing users to skip the plugin or other download or software purchase just to make a connection. The PeerConnection API is the foundation of WebRTC as it abstracts a number of key components for real time video, audio, signal and networking.

As developers throughout the world continue to contribute to the WebRTC platform and expand its capabilities, we will start to see a number of API realities surface. As long as they are working to streamline connections and remove the noise, we’re headed in the right direction. 

Edited by Maurice Nagle

Article comments powered by Disqus

  Subscribe here for RTCW eNews