Full WebRTC stack

  1. I am trying to understand what is the right tools for creating an app with text, audio and video exchange. As server-side tool i want to use node.js.
  2. There is a lots of examples which shows you client-side code, but what about server-side? I know, that for WebRTC server is needed only for signaling purposes, but i cant find a descriptive giude helping me to find out how to say:"Hey, here is this guy, he wants to talk to you, so here's his IP" or something simmilar.
  3. How to make sure that i am establishing direct conection? How to establish the most performant kind of connection? I know that there is some NAT traversal protocols, but how i can explicitly use/enable them?
  4. Can i create distributed Skype-like network by connecting many-to-many peers and having some signaling/auth servers? Or maybe use some peers as servers for signaling only?

  1. All the above can be obtained with software such as Flash Media Server (or Red5 for open source). If you want to use Node.JS, you will need to either create your Node services (message queue, media server), or use some already available, and have Node.JS handle the interaction between them. So all of these will be needed:

    • Node web service(s) with web sockets
    • Node / other message broker (mq)
    • Node / other media server (FMS, Red5)
    • Optional, a caching service for multiple Node web services (Redis)
  2. You can choose Flash, it has great support for RTMFP/RTMP. If you really want WebRTC, you will have to create a STUN node service for p2p discovery, which is connected to the caching service to handle authorizations.

  3. RTMFP is an option, webrtc too. Most performant depends on how you define performance: quality? latency? how should it be biased? If you want low latency, go for p2p. If you want recording capabilities, either rtmp or a node webrtc relay.

  4. Yes, but you will most likely need a team to do that :)

Found almost all of the answers :)

  1. There are no any restrictions for server-side tools, so you can use whatever you want. Node.js fits great. For communication purposes WebSockets or XHR can be used, but there is no restrictions for any others.
  2. In the process of creating connections browser will generate some events with all needed data. You just need to send it to both sides and process it there. There is also offer/answer system, so connection can be made only with agreement from both sides.
  3. Browser will try to establish best connection possible by default. If it's can't be done it will fallback to TURN, which translates data through server.
  4. It will be possibe when DataChannels will be implemented.