BT

Your opinion matters! Please fill in the InfoQ Survey!

How Facebook Designed its Android App for Emerging Markets

| by Sergio De Simone Follow 6 Followers on Mar 15, 2016. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

In order to fulfill its vision of connecting the Earth, Facebook has designed its Facebook Lite app for Android to make it optimized for use in emerging markets, Facebook engineer Gautam Roy explained.

While true that mobile technology has been recently booming in emerging markets, the differences between emerging and developed countries are huge when it comes to the mobile space. In particular, 3G and 4G mobile networks are not widely available in emerging countries, and even when a 3G connection is there, it may only work intermittently. Furthermore, a 3G connection is in many cases simply too expensive for most people. On the other hand, as Gautam Roy wrote, 2G networks connect up to 96% of people globally and are used by over half the world’s population. This context thus defined Facebook goals, which were namely:

  • small app footprint (below 1MB APK size);
  • low data usage and 2G network support;
  • older, 2009 class device support.

The main architectural decision that Facebook engineers took was to use a proxy server, as shown in the picture below, and to implement the Android app as a thin client.

This architecture was designed so the server does the heavy lifting, says Roy, by fetching data from Facebook backend services and packaging them for the client to use. Thus app features are mostly implemented by the proxy server. The client app itself is designed as a kind of virtual machine that provides access to OS resources such as camera, SQL lite engine, and the UI engine. Additionally, the client app is relying on a local cache to avoid having to request the same items multiple times. Interestingly, instead of using HTTPS, Facebook engineers devised their own custom message protocol over TLS in order to further reduce data usage and shrink the time required to establish a secure connection.

Thanks to these design choices, concludes Roy, Facebook engineers could achieve best-in-class performance on tasks like login, start-up, pull-to-refresh, and image-loading times and to ensure correct behaviour even on low-performance and intermittent networks.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT