Skip to content

LooWID's communication stack

Eduardo Rey edited this page Feb 25, 2015 · 2 revisions

LooWID's communication stack

As said before on this wiki LooWID is a web video conferencing platform based on WebRTC that uses peer-to-peer connections to send video and audio directly from browser to browser. Although WebRTC let browsers exchange data between peers, some servers are needed. As we saw before signaling and room management is done in LooWID, but there are other services needed to help WebRTC to work throughout NAT. At this point ICE, [STUN] (http://tools.ietf.org/html/rfc5245) and TURN start to play. ICE framework uses STUN and TURN to establish a connection (RTCPeerConnection) through any NAT variety. ICE tries to connect to peers directly via UDP. STUN server tries to find the public address and port. If UDP fails, ICE tries TCP.

LooWID's STUN connections diagram

If finally communication is not possible (firewalls, restrictive NAT… ) then ICE relays on a TURN server to perform the data exchange.

LooWID's TURN connection diagram

By default, LooWID uses generic STUN servers from Google, but it would be recommended that if you are planing to run your own server use a set of you own.

In order to simplify configuration we added support to configure a Xirsys account. They provide an authenticated STUN/TURN service on the cloud. Once you set up your account and service you only need to configure the following environment variables:

XIRSYS_DOMAIN=<xyrsis domain>
XIRSYS_USER=<xyrsys usename>
XIRSYS_SECRET=<xyrsys password>