Tuesday, April 28, 2015

WebRTC vs WebSocket

WebRTC is designed for high performance, high quality communication of video, audio and arbitrary data. This mechanism needs a service via which it can exchange network and media data which is called signalling Once the signalling has taken place, audio/video/data is streamed directly between clients avoiding the performance cost of streaming via an intermediary server. 

WebSocket is designed to provide bi-directional communication between client and server. It is possible to stream audio and video over web sockets, but this technology is not inheratly designed for streaming unlike WebRTC. 

Web sockets are supported in most of the modern browsers. This uses HTTP compatible handshaking and default ports making it much easier to use with existing firewall, proxy and web server infrastructure. 
this has simpler web APIs. a class and a few call backs 

Only supports reliable, in-order transport because it is built on TCP. This means that packet drops can delay all subsequent packets. 

WebRTC: 
This is mostly supported by only Chrome and Firefox. this mechanism is P2P , but even might require a signalling. Transport layer is configurable with application to choose if connection is in-order and/or reliable. The APIs are complex, The JS libs provide simpler API, but these are constantly evolving. 

references:

No comments:

Post a Comment