top | item 11252579

How we built Facebook Lite for every Android phone and network

140 points| obliviscence | 10 years ago |code.facebook.com | reply

106 comments

order
[+] irremediable|10 years ago|reply
Anyone else find that they love FB engineering and FB research, but don't like the product much?

FB does so much awesome technical stuff, and often shares/open-sources it. But the actual FB site -- for me, at least -- is lacklustre. The only thing it really shines for is event management.

This said, I guess anyone who reads HN is likely to be an outlier; and the site's success evidently means a lot of people like it.

[+] jayd16|10 years ago|reply
I still laugh at their hack to get around Android's method count limit.

https://www.facebook.com/notes/facebook-engineering/under-th...

They go through all this reverse engineering before they go back to usual solution of code stripping with ProGuard.

And then continue on with more crazy hacks.

FB engineering is usually impressive feats but questionable motives. "Wow you sure fit that square peg through that round hole. That's ...impressive"

[+] amelius|10 years ago|reply
The Facebook site itself has lots of bugs also. For example, basic navigation was broken for months (perhaps it still is). The back-button was completely useless.

I really don't understand why they don't fix the problems on their own website first.

[+] taylorwc|10 years ago|reply
This. I killed off my FB account years ago and have not had the tiniest regret. But they do amazing things, and I love keeping tabs on what they are open sourcing.
[+] andy_ppp|10 years ago|reply
Events-wise I think most good engineers/product people would add proper ticketing as well as mind body online style booking etc. for classes etc.

It could be a huge business for Facebook if they could be bothered.

[+] rokhayakebe|10 years ago|reply
If you are an engineer I can tell you most of the things you care about product-wise, consumers don't care about. This mentally, which myself I suffer from, is the reason many fail to build things that people love.
[+] kennydude|10 years ago|reply
Some of their engineering is good. Saying "nothing meets our scale" as an excuse for everything is just silly though
[+] pluma|10 years ago|reply
I am deeply suspicious of Facebook the company (not just because Zuckerberg's early attitude towards users and privacy). I absolutely love Facebook's open source efforts.

This contradiction made it really weird to get started with React. It still makes me feel dirty sometimes.

[+] Grishnakh|10 years ago|reply
It's worse than lackluster, IMO: it's downright confusing and nonsensical. To someone who uses it every single day and spends a lot of time there, I can see how they would become accustomed to the UI, but if you're an occasional user it's not easy to use at all. Also, it changes frequently so every time you come back things will be different.

Worse, every time I try to use it, it seems like everything on the page is jumping around; it takes too long to render and scrolling isn't smooth, so it's impossible to just smoothly scroll down and see everything. But I see that on a lot of sites these days.

[+] bane|10 years ago|reply
I remember a chat I had with a colleague about 6 years ago. He posited that I would be really excited to work at FB since it was such a fast growing company with all these interesting problems. I responded that I couldn't understand what he was talking about, there really wasn't much interesting going on outside of some graph analytics at the time and that problem had a pretty limited life-span given FB's particular use-cases.

There's been very little really truly interesting blue-sky technical work at FB that's I'm aware of other than trying to figure out how to get around pretty prosaic issues through clever hackery rather than just doing it some other already established way and trying to figure out how to exploit their user-base for targeted ads (which by many accounts from folks I know aren't all that great w/r to ROI).

The more interesting stuff seems to be happening in their acquisitions like WhatsApp and Oculus, but the "Facebook stink" feels like it's already starting to get to those teams as well.

I honestly have almost no idea what their 13,000 employees must be doing outside of data center operations and various O&M projects at this point. Building quality mobile client software definitely doesn't seem to be it.

What I find immensely interesting is how they're pulling in around $11/user/year (about $4 in pure profit)! Their economy of scale is pretty good considering it only costs them about $7/user/year to run the service. I'd easily pay $10/year for a service like FB that didn't entirely suck and had all my friends on it.

[+] TheOneTrueKyle|10 years ago|reply
I am loving what Facebook is doing and even considered buy stock at one point. That being said, I don't really use the product Facebook all too often, though I am interested to see where it is going.

I shall gaze from afar.

[+] limeyx|10 years ago|reply
Facebook is still the flakiest and crash-prone app on my phone bar none
[+] smrtinsert|10 years ago|reply
A lot of their stuff makes me ask why bother, HHVM comes to mind. Even React at times seems like serious overkill.
[+] bencoder|10 years ago|reply
I use this because the main facebook app had bloated to taking over 300mb of my android phone.

Unfortunately I can't get it through google play (not available in the UK) so I have to manually download and keep the apk updated. I wish they'd enable it for all countries.

The separate messenger app is also going that way, hopefully they'll eventually create a Messenger Lite app too.

[+] digi_owl|10 years ago|reply
Facebook seems to be the AOL of this decade.
[+] Grishnakh|10 years ago|reply
You don't need the Facebook messenger app or a Messenger Lite app.

Just install "Trillian"; it does Facebook messaging, plus a bunch of other networks, and is fast and low-resource.

[+] unicornporn|10 years ago|reply
There's https://www.facebook.com/lite/ and https://touch.facebook.com/ too. But I guess that wont allow them to mine their users for phones for contacts and other interesting data.
[+] TazeTSchnitzel|10 years ago|reply
The web version won't be as compact, because it has to use HTML/CSS/JS and so can't shift as much rendering burden onto the server. It also has to use HTTP, which is less efficient over the network.
[+] fs111|10 years ago|reply
"for every Android phone"*

* in selected countries.

[+] smadge|10 years ago|reply
HTTPS and HTML were designed on a NeXT with 24MHz CPU and less than 64MB RAM over a 56kbs connection. Yet these technologies are considered too heavy for a Galaxy Y with 600MHz CPU, and 290MB RAM over a 500kbs connection. Instead facebook needs to invent a proprietary wire protocol and layout engine.
[+] toomanybeersies|10 years ago|reply
I thought it was more to do with the latency of mobile networks that they invented their own protocol.
[+] rjzzleep|10 years ago|reply
If you're on Android consider using FaceSlim[1]

It wraps the http version in a very nice fashion gives you configurable message notifications, offline browsing. Allows you to disable images and other niceties.

There's an extensive changelog on the github page, and you're free to add new features if you feel like it.

[1] https://github.com/indywidualny/FaceSlim

[+] FlyingSnake|10 years ago|reply
There's Tinfoil for Facebook and Metal too.
[+] edent|10 years ago|reply
That's what I use. Very fast - enables you to disable images (and adverts) to speed things up. Also uses CSS to create a night-mode with a black background.
[+] Etheryte|10 years ago|reply
Sounds interesting, probably going to give it a try.
[+] veli_joza|10 years ago|reply
If APK is just a VM sitting on top of Android system, perhaps it could be used for just about any project? Maybe even integrated into Android OS.

To "install" the app you would just provide link to your production server to the Android OS and it would appear on homescreen.

[+] TazeTSchnitzel|10 years ago|reply
Sounds very much like Opera Mini, a thin client web browser for similar markets. (I remember using Mini a ton at school over 2G, it was the only browser usable on EDGE.)
[+] Etheryte|10 years ago|reply
What does "Over half the world’s population, at least 1.6 billion people..." mean? Which is it? Google says the world population was over 7 billion in 2013, this sentence confuses me greatly.
[+] cuchoi|10 years ago|reply
Personally I need something in the middle. The original Facebook app is taking over 300mb, and this one is going to stay under 1Mb. I would love a 10-20mb, I am using Facebook Lite now but it does give much more value than visiting the website directly.
[+] JustSomeNobody|10 years ago|reply
Facebook lite is really nice on Android. I leave it running all the time and unless the app is in the foreground, it uses virtually no battery.

I wish there was an iOS version.

[+] prats226|10 years ago|reply
Well whatsapp is pretty popular in these slow connection countries facebook is talking about even if it has ~30MB apk size. Guess what, people are ok with it. I think reducing apk size to <1 MB by creating a VM on android thereby compromising on UX aspects of app is not a very good idea.

But this approach sounds like a new architecture of building android application which gives more control on server side since have core logic there.

[+] barrkel|10 years ago|reply
The thing being described is basically a custom web browser.
[+] elbigbad|10 years ago|reply
Is that a bad thing?
[+] samfisher83|10 years ago|reply
Why is the standard Facebook apk so large?
[+] groys|10 years ago|reply
Author of the blog here, happy to answer any questions.
[+] sundvor|10 years ago|reply
Sounds awesome, yet still not available in Play Store in Australia. Which is why I'm using Metal, or just the web browser. The full app brings my S6 Edge to its knees.
[+] lucb1e|10 years ago|reply
> less than 1 MB in size, meaning people can download it in seconds on slow connections

No. 1 MB downloads in seconds on most connections; slow connections will be closer to half a minute than to 'seconds'.

This is why the Facebook app is so bloated in the first place, assumptions about connections and devices in the majority of the world.

[+] Fargren|10 years ago|reply
IMO, half a minute falls within "seconds". If I had to cut it somewhere, I'd think it would be in 45 or 50 seconds, at which point I would call it almost a minute. But then again, colloquial english.

Still. The point is that this does not take several minutes to download, and thus is unlikely to fail. And that's a huge achievment on Android. Applications that do very little can very easily get to 5 or 10MB. Facebook does quite a lot, and the benefits of doing that with only 1MB are obvious.

[+] cakoose|10 years ago|reply
Maybe it was a typo and they meant "minutes" instead of "seconds"? Later in the article they say:

> Downloading a typical app with 20 MB APK can take more than 30 minutes on a 2G network

Then again overstating accomplishments is pretty standard for tech blog posts.

[+] akerro|10 years ago|reply
Does it have less than 4000 classes?
[+] Cthulhu_|10 years ago|reply
4K classes is not much if you've included a few libraries.
[+] minikomi|10 years ago|reply
Sounds awesome. Here's hoping for more Lite apps!
[+] roddux|10 years ago|reply
"Samsung Galaxy Y comes with very restrictive specs of 290 MB RAM, 600 MHz processor, and 180 MB internal memory."

In what universe is a 600MHz CPU and 290MB of RAM restrictive for a glorified RSS reader?