Yes, Facebook is Open Source, Too!

Picture 4.pngWhen people think Open Source and social networking, usually the first thing that comes to mind is Google and OpenSocial. What most don’t know however is that Facebook is almost as much, if not more Open Source focused as Google is.

One unknown fact about the Facebook Platform is that most of the technologies used to create the platform were used in-house before they were released to the public, and because of that they have been able to release many of those projects through OpenSource licenses to the public. Facebook has an entire page on their developers site that features the Open Source projects they are working on. On that page are 12 projects that I’ll describe here:

Facebook Open Platform

As one of the most significant contributions by Facebook, Facebook has made almost its entire developer platform, from FBML to the API, open source for other sites to enable developers to port apps from Facebook. It was recently made famous through its implementation by Friendster. Bebo has also implemented the code from this platform enabling developers to easily make the transition of their apps from Facebook to Bebo. Any developer can download the code, written in PHP, install it, and implement a Facebook-compatible API on their own site.

Thrift

Thrift, according to Facebook, “combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, and Ruby”. The idea here is that with Thrift, you can easily generate an intermediate layer that will talk between languages. Facebook uses this in their search, mobile, posts, notes, feed, and platform products currently, but the code is free and open for all to download.

MemcacheD

According to Facebook, they are the largest user of MemcacheD. MemcacheD is a memory-based caching technology that enables multiple servers to share a common pool of cache, all stored in memory, enabling very fast, scalable response times for web services. Facebook has made significant contributions to the source code of MemcacheD increasing response times by 20%. Twitter is also a significant user of MemcacheD among many other services.

Cassandra

Cassandra appears to be a distributed storage system enabling storage across many servers with no single point of failure. It’s unclear what Facebook services are using this currently.

phpsh

Written in Python (ironically), phpsh is a shell intended to make PHP development easier. Facebook says it was developed internally, but gives access to documentation, tab-completion, and more. Facebook has coined the term, “interactive scripting”, with this new shell. Could we be seeing the first “social” development environment?

Facebook Animation

Facebook is creating an entire library to enable javascript animation methods in the Facebook Javascript client library. Going head-to-head with the likes of YUI, the Animation libraries Facebook provides give shortcuts, keeping the Facebook look and feel in Facebook javascript development.

Facebook Firefox Toolbar

Completely open source, the Facebook Firefox Toolbar is an extension for Firefox that enables the user to track their Facebook friends, check messages, and more from the Firefox browser. It was written as an example of the Facebook Platform desktop client libraries, and Facebook is even allowing developers to submit patches to keep it going.

Facebook Exporter for iPhoto

If you have uploaded photos to Facebook from iPhoto the chances are you’ve used this plugin. The exporter takes the photos on your Mac and sends them to Facebook, all integrated into the iPhoto experience. All code is open source and available to the public, so you can get in as a developer and see how they did it, extend it, and more.

flvtool++

flvtool++ is a set of libraries used by Facebook to find and extract data from FLV files (used to generate Flash videos). Based on the Ruby FLVTool2 libraries, it was rewritten in C++ for performance. Facebook uses this actively in its Video app.