Facebook reveals the makings behind App Center recommendation engine

Facebook's engineering team offers a peek beneath the hood of the App Center recommendation engine.

Facebook is offering a behind the scenes look at the building of the recommendation engine for the App Center.

In a blog post on Wednesday morning, Facebook engineers discussed challenges they face in sifting through and discovering the most relevant apps for hundreds of millions of people on the world's largest social network and how those recommendations are made throughout the App Center.

Facebook argues that this is especially important because the App Center has already evolved into a major traffic channel for many developers since its August 1st launch, citing that 220 million people visit the App Center each month on average. Approximately 40 percent of those visitors are said to be more likely to return the next day.

Essentially, the App Center functions the same way as the news feed. Both forums are intended to serve as a centralized place for discovering the news (or apps) most relevant to the individual user.

While building an algorithm to achieve this for 950 million individual users and counting is theoretically impossible, Facebook engineers are giving it their best try with the recommendation engine, which learns user's preferences to produce app recommendations that are socially relevant as well as timely.

That algorithm breaks down to three key components: candidate selection, scoring/ranking, and real-time updates.

Here's a more detailed explanation of what goes on under the hood, according to the Facebook engineering team:

The system follows an aggregator-leaf architecture-very similar to that of a search engine. Because we have a lot of data, it is necessary to partition the objects into multiple subsets (shards) where each leaf node is only responsible for one subset. The aggregator acts as a central controller, receiving the recommendation request from the front end web server and distributing to leaf nodes. Each leaf node then finds a set of best candidates from the objects stored on the local machine and returns them to the aggregator. The aggregator then performs a final merge and returns the best results to the client.

After that, the frontend collects user feedback, which is then integrated into the app recommendation engine. We scale this system in two ways: The first is to increase the number of shards so that we can handle more data. The second way is to have multiple replicas so that we can handle more traffic. Using replicas also adds redundancy to the system, which allows us to tolerate the failure of some machines.

There are more details over on the Facebook Developers blog, but the basic lesson that the App Center team is sharing is that it's all about quality and user ratings over time.

This could be applied to nearly any app store at this point, but in Facebook's case, the social network's approach to this is based on its own system that randomly surveys users to rate apps after use.

From there, engineers found that the number of daily active users "was a good measure of how large the app is, while the number of monthly active users could be inflated by spikes of activity during the month." Thus, Facebook's formula for determining an app's quality is "a function of its average rating as well as average daily active users."