Tsahi Levent-Levi has 15 years of experience in the telecommunications, VoIP and WebRTC industry, as an engineer, manager, marketer and CTO. Tsahi currently works as a product manager at Amdocs, and as an independent consultant, assisting companies in bridging the gap between technologies and business strategy in the domain of telecommunications. Tsahi is the author and editor of bloggeek.me, which focuses on the ecosystem and business opportunities around WebRTC.
The Web is based on a rather simple notion: There are Web servers and there are clients, such as browsers. It’s an asymmetric kind of a connection: Clients connect to servers to request stuff. This breaks when what we need is more interactivity--for example, when our online webmail service notifies us of a new email, an update to a stock tick or news item, or the ring of our virtual phone. To achieve that, we hack our way with things like XHR, SSE and, recently, Websockets.
What we have today is a centralized Web--one that necessitates a server for each and every interaction between users. When you send a private message on a social network, there is a server along the way that intercepts, processes and routes that message to the intended user. This approach takes more time to pass the messages, requires more processing on servers and lacks privacy--the server knows everything.
It is no wonder then that some vendors are looking at WebRTC's data channel as an option. If you don't know what WebRTC is, here's a quick summary:
- WebRTC is an HTML5 technology that enables sending voice, video and data directly between browsers.
- Google acquired the technology and open-sourced it
- There are many other companies involved, including Mozilla, Cisco, Ericsson and AT&T
- The APIs are split into three types: Get User Media, which enables accessing the camera and the microphone; Peer Connection; which takes care of multimedia sessions and sending data in real time to other browsers; and Data Channel, which sends arbitrary data directly between browsers
- If you use the latest versions of Chrome, Firefox or Opera on a PC, Mac or Android, your browser already supports WebRTC
WebRTC has a data channel. The data channel enables any data to be sent directly between browsers, without a need to go through a Web server. This direct interface may not seem much--most things that can be achieved with it can be done in other ways in the browser already--but there are those who are finding value in it and are tinkering with it already.
There are many different uses for the data channel. In this post I will focus on one specific Framework, PeerJS. I think PeerJS is interesting because it deals mainly with the data channel. It's simple, to be sure, but that just may be its beauty, as well.
PeerJS is a no-nonsense framework. As a client, you just need to create a Peer, give it a unique name, and then connect to any other Peer in your network using the Peers' names. While the PeerJS server brokers the initial connection among peers, it doesn't relay any of the media that is sent between the peers.
Why would PeerJS make sense for developers to use? It is simple to use and lightweight; it interoperates across browsers, including their versions of browsers; and it takes away most of the headaches of developing on WebRTC directly. Oh, and did I mention that it is open source and free?
Here are a few services that are already using PeerJS:
Blippex is a search engine that follows users' search results and reports back to Blippex. The purpose is to learn if the given result was valuable by understanding how long a user actually spent on a page. To make this process private, the service sends data back to the Blippex server by using the data channel. The browser passes that data to Blippex via another browser that serves as an anonymization proxy.
While all this is done via an extension to Chrome, that extension uses WebRTC and PeerJS to work.
Secretly Meet is a Facebook session sans Facebook.
To use the service, all you need to do is press the Start button and send the ad hoc URL the service creates to the person you want to chat with.
Once this has been done, you will find yourself in a Facebook-like interface that enables you to share text, images and files with another person--without leaving any trace on Secretly Meet's servers.
Nutty is a terminal window shared via the browser.
If you are using Mac or Linux, you can install this Chrome extension and just share your terminal via the browser with someone remotely.
Unlike other Web-based sharing services, there is no server that handles the communications between the browsers, so the session is essentially secure.
The examples above don't rely on a server for the private messages that get sent. Blippex uses the data channel to anonymize identities; Secretly Meet uses it to share and collaborate without a middleman; and Nutty provides direct access to remote machines. All this is done natively in the browser.
There are more frameworks like PeerJS and services other than those mentioned above that make use of WebRTC. Some of them are focused on privacy and decentralizing the Web--enabling direct communications across browsers without the Web server acting as a data middleman.
Are you using WebRTC at your company? What other data channel uses can you envision? Let us know in the comments section.