The Tao of Facebook: ‘Social Graph’ Takes New Path
Ever noticed that certain things on a Facebook page load faster than others? This is often the case with even the simplest of websites, but with a site the size of Facebook’s globe-spanning social network, the divide is in some ways more pronounced. Facebook, you see, serves information from two very different collections of data.
Most data is stored inside a good old fashioned database — the open source mainstay MySQL — but the social networking giant also uses a second system to house data that’s accessed with particular frequency. This system is known as Memcached, and it’s a common thing inside the massive data centers that underpin the world’s largest websites. Memcached stores data in the memory subsystems of the servers that drive Facebook, rather than good old fashioned hard disks. Facebook engineers call it “hot data.” Basically, this means that the data you’re more likely to visit is more likely to the load at speed.
The rub is that juggling both MySQL and Memcached isn’t the easiest of tasks for the engineers that build and operate the Facebook machine. But in recent years, the company has built a new system that seeks to ease the use of these two data stores. It’s called TAO, short for “The Associations and Objects,” and it’s been used on the site for “several” years now.
“It was important to build something that would help Facebook engineers move fast,” says Facebook software engineer Mark Marchukov. “Before, engineers had to understand the details of how both the cache and the MySQL data stores operated in order to write efficient code, and that slowed down the rate of development. With TAO, we put in an API [application programming interface] that they could use without thinking about the details.” (via The Tao of Facebook: ‘Social Graph’ Takes New Path | Wired Enterprise | Wired.com)