The Voice of IP

Inside Facebook Video Chat

By TMCnet Special Guest
Jonathan Rosenberg
  |  August 01, 2011

This article originally appeared in the Aug. 2011 issue of Unified Communications Magazine

On July 6, 2011, Facebook and Skype (News - Alert) launched Facebook Video calling, allowing users to call and see each other right from The solution is based on a combination of Facebook and Skype technology.

The first step of the user experience is on While looking at the profile page or while in a chat, users will see buttons that allow them to initiate a video call with their friends. Those buttons are rendered as part of the Facebook (News - Alert) web page. When a user clicks on the "call" button, the page will check for the existence of the Skype video calling plug-in, which is an optimized version of Skype's desktop software that powers the video calling experience. If the Skype plug-in hasn’t yet been downloaded, the user is prompted to install it.

Once installed, Facebook's servers interact with Skype's technology through a proprietary REST API. Through that API, Facebook automatically creates a Skype account for the user. This account is called a shadow account. As with all Skype accounts, it has a SkypeID. In this case, the SkypeID is a random-looking number that is a pseudonym for the user, called a shadowID. Unlike normal Skype accounts, the shadow account lacks user profile data – no first or last name, no e-mail address, no photo. This shadow account will be created regardless of whether the user has a normal Skype account. Our REST API also allows Facebook servers to obtain a login credential that can be used to log in the user to the shadow account.

The plug-in is, in essence, a miniature version of the Skype client. Most of the user interface has been removed, and features that were not needed were compiled out. The plug-in is actually composed of two distinct parts. One is the runtime, which is a stand-alone miniature Skype client, and the other is an actual browser plug-in. The runtime provides some simple APIs through an RPC mechanism, and the browser plug-in delivers those APIs in JavaScript for access within Despite its compact size and simplified UI, the runtime contains all of Skype’s core tech: its peer-to-peer technology, firewall and NAT traversal protocols, video and audio codecs, and media processing engine.

Once the plug-in has been downloaded and installed, and the caller logged into it anonymously (a process that happens automatically and invisibly to the user), a handshake takes place through Facebook's server infrastructure. This handshake alerts the called individual that the caller wishes to call him or her. By using Facebook infrastructure for this, calls can be initiated prior to installation of a plug-in on the called person's computer. This allows the feature to spread virally; clicking on “answer” triggers download of the plug-in on the called person's side. Once the called person answers, his or her shadowID is passed back to the caller through Facebook’s messaging infrastructure, allowing the Skype call to be placed by the runtime.

The user interface you see for the video itself is rendered by the Skype runtime. It's the same video quality you'd expect from a normal Skype video call, since it is a normal Skype video call. It just happens to be invoked from within Facebook, and uses a slim UI.

One of Skype's challenges in providing this functionality was scale. Even though Skype leverages its P2P technology to help achieve scale, server infrastructure is used for several parts of the solution, requiring additional hardware and bandwidth to be deployed. Servers are used for providing the REST API used for account creation and login. Those servers, in turn, access Skype databases to store the account records.

Supernodes facilitate Skype call connection. Supernodes are components of the software that reside within the Skype desktop client. Supernodes provide a distributed database used to facilitate mapping of SkypeIDs to user location. Supernodes also provide a simple message routing service. Skype has developed a server-based version of the supernode code, called a dedicated supernode. DSNs were used for facilitating recovery of the Skype network during its outage in December 2010. Skype also maintains a small number of DSNs to support the Skype user base under normal operations.

However, the demands of the Facebook product requirements pushed us towards the usage of DSNs for all Facebook users. The Facebook plug-in only talks to DSNs that have been allocated specifically for this purpose. Of course, those DSNs still connect to the rest of the Skype P2P network; the constraint is that only Facebook plug-ins can connect to them. The DSNs reside in Skype’s data centers and Amazon EC2. The actual voice and video traffic utilizes Skype's global P2P network, allowing for great quality without needing thousands of expensive servers.

Jonathan Rosenberg is chief technology strategist at Skype (

TMCnet publishes expert commentary on various telecommunications, IT, call center, CRM and other technology-related topics. Are you an expert in one of these fields, and interested in having your perspective published on a site that gets several million unique visitors each month? Get in touch.

Edited by Stefania Viscusi