With the advance of web technologies, browsers support more and more features. WebRTC, the technology for browser based peer-to-peer connections is one of those. One may raise the question what WebRTC really is? RTC stands for Real Time Communication, which means it is used to facilitate real time communication between browsers. Previous notable solutions to this problem includes VOIP and Skype, but WebRTC supersedes them. In this work I am going to present the technology and its possibilities through a proof-of-concept application.
WebRTC is not only complex as a protocol, but as a browser API too. It requires a lot more effort to use than most browser APIs. There is Websocket for example that is rich of functionalities but still easy to use. That is why my first goal was to create a demo application where clients do not need servers for the connection. For this reason I also had to create a wrapper library for the WebRTC API. While using the demo, connection information has to be exchanged manually. When I reached my first goal, I started implementing a Skype-like application where many people can talk to each other without using a server to process the traffic. At this point I had to start using a signaling server which can exchange this connection information. In order to connect to each other, clients need to utilize STUN and TURN server calls which required additional knowledge in operating them.
Communication between more than two clients creates a processing and network bottleneck. If N people wants to talk to each other, a single browser has to handle 2(N-1) stream which is too much data to handle for more than 3 people. For that exact reason, we need to utilize media servers which decreases the throughput. Although it is a compromise, I had to deal with it nonetheless as there is no other way.
As you can see creating a WebRTC service requires deep knowledge on many levels mainly because you need at most 5 different servers to manage and aid clients. The goal of this thesis is to acquire this knowledge and use it to create the chat application.