Vladimir Sedach

Have Emacs - Will Hack

January 24, 2012

WebRTC and the File API

Two interesting developments in web browser standards I have recently been made aware of are WebRTC (thanks to Manuel Simoni) and the File API (thanks to Rich Jones). The RTC part of WebRTC stands for Real-Time Communications. The top-layer interface consists of various video and audio codecs; underlying those is a way of providing a bidirectional channel for web browsers to communicate with each other. This is accomplished with NAT traversal in mind. The functionality for traversing NATs and proxies in the reference implementation is provided by the very handy looking libjingle.

One obvious use of WebRTC is providing audio and video chat in webpages without Flash (WebRTC specifies audio/video input, real-time codecs, and jitter buffers). Another obvious use is to develop a BitTorrent-like distribution protocol for video.

The File API provides the potential to use WebRTC for any kind of P2P file sharing. From my point of view this is the most exciting potential of WebRTC.

The web browser is now becoming a very weird virtualized operating system, with APIs rival Microsoft Windows in size, idiosyncrasies, and complexity. The need for application hosting declines - both the application and "putting your data in the cloud" can now be handled by a Freenode or Tahoe-LAFS-like WebRTC library. What is interesting is that friction surrounding development and deployment should push new web applications away from a centralized server and towards the P2P approach. Unlike fully hosted apps, there is no extra effort involved in making an offline version. Server rent/lease and administration costs are reduced considerably by offloading as much data storage and computation as possible onto the browser. This latter possibility in particular should enable many startups to avoid the capital requirements needed for scaling up services that depend on the network effect, such as most "social" things.