BT

How Facebook Designed its Android App for Emerging Markets

by Sergio De Simone on Mar 15, 2016 |

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

Relevance
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
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT

We notice you’re using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.