Today’s applications and users are predominately mobile and global. In fact, the “mobile tipping point”, where the now nearly 2 billion mobile smartphone users became greater than the number of desktop users globally, occurred in 2014 (see Mobile Statistics 2015). And these statistics show that 80% of Internet users own a smartphone and that mobile users in particular spend more time online consuming much more content. Social media platforms like Facebook (News - Alert) and Twitter now report many more mobile interactions than desktop interactions and most new social media apps, such as Instagram, WhatsApp, WeChat , Snapchat, etc, are primarily mobile.
In fact, recent studies show that we spend more time with our phones than sleeping (study), let alone with TV or anything else! And we all know that our online social, gaming, and information communities are global – we share information and communicate with people scattered across the world every day.
This reality of a mobile, global world can be a challenge as we add real-time communications to our applications – providing capabilities that allow participants to talk and see each other easily as needed, wherever they are. The first company to truly tackle ease of global communications over the Internet was Skype – which is why many of us continue to use Skype to talk to our relatives in far-off countries.
However, Skype has become a rigid stand-alone platform with less APIs that cannot easily be embedded in flexible, invisible ways within other applications. And with Skype now part of Microsoft and a key part of Microsoft’s Skype-For-Business focus to extend MS Office and supersede MS Lync, it does not seem there will ever be a return to easy embeddable communications capabilities.
So what is the alternative for application developers building their own applications that wan to directly incorporate communications right into their applications? Over the past four years, WebRTC has emerged as the new open standard for easily integrating communications into applications, driven by Google, Mozilla, more recently Microsoft and other companies (see our previous blog) together with standards initiatives within IETF and W3C.
This blog explores the challenges for standard WebRTC approaches in delivering reliable, consistent Quality of Experience (QoE) for truly global, truly mobile applications, and discusses a global optimized architecture that meets these challenges.
Challenges for the “Standard” Peer-to-Peer WebRTC Architecture
The fundamental architectural model for WebRTC applications is the “triangle” as shown below.
However, while peer-to-peer communications over the Internet is “ideal” in the sense that it is simple, free, and does not require any other infrastructure, whether or not you get a good Quality of Experience for the whole communication completely depends on how good the network connection is, and how good it remains across the whole time of the communication session.
In the ideal WebRTC scenario, as usually demonstrated, both the endpoints are browsers on reasonably powerful laptops with WiFi or wired network connections, communicating within the same country on a reasonably consistent network. This can work well. However, if the devices are mobile phones that may have 3G, 4G or WiFi connections, and may switch between these and have a lot of bandwidth variability as users walk about, and if the devices are in completely different countries some with network challenges, then the quality of the communication is likely to be horrible! As a result, many application developers experimenting with cross-country communications are finding WebRTC Quality of Experience to be a real challenge. The standard Internet does not provide any kind of “Quality of Service” guarantees for real-time traffic, as you find in private business networks, so providing there is some kind of connection nothing will get re-routed or changed in how your voice and video packets get from one user to the other. If it’s bad it will stay bad.
Essentially, WebRTC provides you with libraries and codecs – either included in certain web-browsers or packaged by various companies into SDKs for mobile app use – but it does not provide you with a QoE-optimized network between these endpoints. It’s up to you and the vagaries of the many mobile network and Internet connections between your users!
An Example Global Application - HelloTalk
HelloTalk (hellotalk.com) is an example global mobile application, available for both Apple IoS and Android, which provides an interactive and social environment for people in any country to learn new languages. There are over 100 languages to choose from and the application provides dictionaries, transliteration between languages, grammar checking and pronunciation guides. But, most importantly, HelloTalk connects you to other users around the world who are native speakers of the language you want to learn, and who in turn want to learn your language. HelloTalk now has over 1.5 million global users and is growing fast, so it is able to match users together based on their languages and learning levels.
HelloTalk users can start by texting back and forth as they start to learn a language and want to learn more about other users who can help them as they use the app’s tools. But, obviously, to truly get better at a new language you also want the opportunity to talk to people and practice your speaking and listening skills. HelloTalk provides voice communications built directly within the application that makes it easy to turn a chat into a voice conversation while remaining in the app to use all the language tools.
The key requirement for real-time voice communications within HelloTalk is obviously that you get a good clear connection – you are trying to learn a new language after all! And the connections are most likely to be between different countries – from France to China, the US to Timbuktu, Australia to Azerbaijan! And these will all be on mobile devices. So for HelloTalk to be successful - mobile-to-mobile global communications has to work every time with great Quality of Experience regardless of the country or type of network connection. With good QoE over the past year, HelloTalk has increased their real-time communications sessions by a factor of 10 along with an 80% increase in the duration per call, now over 10 minutes on average (learn more at agora.io).
Agora CaaS – A Global RTC-Optimized Network
The solution to the mobile-to-mobile WebRTC challenge is to provide a global RTC-optimized virtual network that connects with mobile devices as locally as possible and then ensures that the global connectivity between these users maintains excellent QoE throughout the communication session.
So there are two important parts of this architecture:
1.The last mobile-mile “on-ramp” to the network from the mobile device.
2.The global connectivity between devices across the network.
The connection between the mobile device and the Agora network may be over 3G, 4G or WiFi and bandwidth, delays and connection type may be continuously changing as users move about. So the focus here has to be on error resilience and constant audio/video tuning based on network conditions. Technical issues like “packet loss” and “jitter” are to be expected here and so the architecture must be designed to handle these well. This requires innovations in codecs and transport protocols that are highly optimized for mobile devices. Even capabilities like echo-cancellation must be highly tuned to particular devices to make sure you start with the best voice quality right from the start.
In order to ensure fast in-country access there need to be a lot of access nodes – Agora currently has over 65 data centers globally and is continuing to expand. Communications goes directly into the Agora network and do not go randomly peer-to-peer across the world. This allows the “virtual” Agora network to continuously, and automatically, optimize for QoE.
Once the communication reaches an Agora network node then how this communication is routed to the destination is key. In order to ensure global low-cost, Agora leverages the global Internet (so no-one is paying for dedicated lines with Telco-level costs) but it does not just rely on the Internet for routing and optimization. Agora is constantly monitoring all of its nodes and knows the best real-time network path around the world at every moment. Real-time communications traffic can therefore be routed and dynamically re-routed as needed to get around bottlenecks and ensure good QoE. Agora network nodes also directly manage low-level redundancy options and re-transmission decisions, as most appropriate for real-time voice and video traffic – which is different from general web needs or one-way streaming needs.
This approach is especially important for network “brown-outs” where paths around the Internet are still working but very poorly for low-latency and low-packet-loss real-time needs – as compared with “black-outs” where connections are lost and the Internet can (slowly) determine the need for a new route itself. The Agora virtual network is able to quickly spot better and worse communication conditions across the whole network and react accordingly in real-time.
As a result, most Agora traffic is not peer-to-peer (although it can be for local situations) but is dynamically managed throughout a session between the 65+ globally distributed Agora network nodes operating as a virtual network layer over the standard Internet.
The result is a true end-to-end global solution of SDKs and network management that ensures high Quality of Experience for real-time voice and video communications, with a special emphasis on the tough demands of mobile devices.
Conclusion – Optimized QoE for WebRTC
To support real-time communications for the next generation of mobile-to-mobile global applications, as well as mixed desktop/browser and mobile cases, developers require a global RTC-optimized network. Most WebRTC approaches today just provide the libraries and leave the question of whether the network will be good enough up to you! And these libraries and tools are often optimized for browser use and not necessarily for mobiles devices with highly variable performance and network connectivity.
Agora provides an innovative global RTC network with mobile optimizations already built into Agora’s mobile SDKs (link), so that Agora customers can benefit from these capabilities immediately. Agora continues to incorporate further WebRTC standards to allow easy connectivity to standard WebRTC browsers, while maintaining the best mobile-to-mobile experience possible through SDKs. This gives Agora customers, like HelloTalk and others, more choices and much better Quality of Experience for all their global users.
About Agora – this article follows a recent $20 million funding announcement and initial product introduction from communications as a service (CaaS) provider Agora Inc. – see WebRTCWorld News and agora.io/press-room – and discusses Agora’s approach to tackling the global mobile-to-mobile challenge for WebRTC through an end-to-end virtual network architecture.
Edited by Kyle Piscioniere