How Facebook keeps you from hating its apps

Nothing provokes app uninstalls like sluggish performance and aggressive battery consumption. Facebook reveals how it prevents those uninstalls.

An app has to do a lot of things for you to love it—and do only two things wrong to make you hate it: perform sluggishly and consume a lot of power.

Facebook operations engineer Antoine Reversat revealed what Facebook does to prevent those two things and keep users from installing its apps. He showed me the automated mobile testing lab, which has never before been disclosed to the public, that he designed and operates. The system automates testing of Facebook’s mobile apps, Messenger and Instagram for iOS and Android.

Almost 2,000 Android and iOS smartphones are housed in 60 racks at Facebook’s Prineville, Oregon, data center. The standard-sized, specially designed racks hold 32 phones each, interconnected to a server. Linux servers interconnect Android phones, and Mac Minis interconnect iPhones. The phones are remotely controlled and monitored during the testing using an automated system that, like much of what Facebook does, will be open sourced for other mobile testers to use and contribute improvements.

facebook pocket design alternatives

The system automatically installs apps for testing, monitors the apps, measures the execution of the apps and reports the test results to the Facebook developer, who can be at any of Facebook’s software development locations. The test phones are instrumented to measure the performance and power consumption of the apps. Called a regression, the test compares the app’s performance and power consumption to the baseline of the previous version. If the app runs slower or consumes more power than that baseline, the developer is asked to fix it.

The developer doesn’t take the initiative. Every twentieth iteration of the app, called a commit, is pulled from the software repository, installed on some of the phones and tested. While Facebook’s apps seem static and this scale of a test lab unnecessary, they are not. Apps are dynamic because of the mobile designers’ and developers’ fanatic zeal for testing new features, user interface subtleties and new user interactions within the apps.

Updates to the apps are frequently released to selected cadres of users for user experience testing. The users’ experience is measured with instrumentation built into the app, and the results are compared to the stable release to determine if the users like the changes and new features. If the tests prove a better user experience, the limited test version is released to Facebook’s user population. The mobile test lab ensures that the app’s performance and power consumption don’t drift in a sluggish or power-draining direction that could raise users’ ire.

Facebook's test racks

The racks that house the test phones look like any of the thousands of racks in Facebook’s 350,000-sq.-ft. lights-off data center, except they are fully enclosed. The enclosure prevents the Wi-Fi access points connecting the 32 phones in each rack from leaking and interfering with phones under test in the other racks.

Like all of the server racks, the mobile test lab racks are designed for unattended operation except for intervention by a technician when the system sends an alert of a hardware malfunction. The phones’ iOS and Android operating systems can be automatically upgraded or downgraded to match the test scenario. Similarly, the device states can be managed, configuring parameters such as Wi-Fi settings and security certificates.

After testing, the apps are removed and the system restores the phones to the pretested state. If the test instrumentation indicates a reboot is necessary to return them to the initial pretest state, the system sends a reboot commanded and confirms state-readiness for the next test.

Reversat’s demonstration brought home another point. Mobile platform upgrade cycles are much different than those for the PC platform. Intel and PC manufacturers could forecast their revenues and product introductions based on Microsoft’s operating system and application software upgrades because each upgrade required more powerful hardware.

Facebook is representative of a different trend in mobile application development to increase app features without consuming more smartphone hardware resources. Apple, Samsung and other smartphone makers have to design phones that attract buyers without counting on app developers to consume more resources. Richard Windsor of Radio Free Mobile fully explains how this dilemma affects Apple in a recent blog post.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags Facebook

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Steven Max Patterson

Network World
Show Comments

Brand Post

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Luke Hill

MSI GT75 TITAN

I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Laura Johnston

MSI GS65 Stealth Thin

If you can afford the price tag, it is well worth the money. It out performs any other laptop I have tried for gaming, and the transportable design and incredible display also make it ideal for work.

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?