Live data from Hacker News

LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

engineering.fb.com

121–130 of 333 posts

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#121

From: https://engineering.fb.com/data-infrastructure/messenger/ > We accomplished this by using the native OS wherever possible Does this mean this application does not use React Native?

I'm thinking maybe they moved off of React Native. RN makes sense for a small org or for an app you're just getting started with, but a megacorp like FB can afford to hand-craft a smaller, tighter app for each platform.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#122
post #76

The loop of app building: 1. Build app with native framework. 2. Re-build app with some alternative framework which is slower, but let's you deploy single code on all platforms. 3. Re-build app with native framework, because it is faster. 4. GOTO 2

Mainframe -> Native Desktop apps -> Web apps -> Native Mobile Apps -> Mobile Web apps

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#124

Earlier quoted context omitted.

I think they went through a period (or still are, I honestly moved over to messenger lite a couple months into it) where they were seemingly intent on making messenger the WeChat of the west. It got real chunky real quick. It was around the same time everyone was excited about conversational ui and Microsoft announced their bot framework. It may have been slow and bulky before that, but that's when I started to notic…

They were trying to make it the WeChat of the non china east and africa, not the west. And they've been pretty successful at that, "messenger" is almost synonymous with "Internet" in some parts.

I wasn't aware, but honestly quite happy they succeeded. A lot of the extra features they were adding seemed pretty out of place for my local market, but they definitely put a lot into it.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#125
post #88

Earlier quoted context omitted.

I've built a few "chat apps". I wouldn't discount the complexity. They carry with them a wide array of problem spaces. And of course anything at FB scale user counts is going to be a challenge.

While I have absolutely no doubt there are scalability problems, it seems to me that most of those problems are going to be (or should be) on the back end, not in the client. How is the client 1.7 million lines of code?

I can see it. It's pretty easy to hit that much code when you include your own code for things as trivial as a JSON parser rather than leveraging what the native SDK provides (which was alluded to in the article). It sounds like they had a bit of Not Invented Here syndrome going on and this rewrite addressed a lot of that. It also sounds like they had a bunch of systems (probably different teams even) doing similar tasks like synchronizing state. And they also had their own UI framework. All that stuff adds up to a lot of code. But, all that being said, it still has a ton of features. It's not your father's IRC client sending text around and failing to transfer files through NAT/firewalls.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#127

From https://engineering.fb.com/data-infrastructure/messenger/ : Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs. This reduced not only size, by avoiding the need to cache/load large custom-built frameworks, but also complexity. The native frameworks don’t have to be translated into sub-frameworks. We also used qui…

They make it sound like the clouds parted and a ray of sunshine struck the programmers at Facebook and they realized that they didn't have to ride the framework-go-round to hell. These are supposed to be the smartest people in SV, but from the outside, it strikes me more as a "No shit, Sherlock" moment.

I suppose that makes you the smartest person in SV!

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#129
post #53

It'll suck for the SEO team at LightSpeed point of sale company. FB named a open source project the same name as a company.

It's a common english phrase, as well as a scientific term. There are a lot of things named after light speed.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#130

From https://engineering.fb.com/data-infrastructure/messenger/ : Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs. This reduced not only size, by avoiding the need to cache/load large custom-built frameworks, but also complexity. The native frameworks don’t have to be translated into sub-frameworks. We also used qui…

They make it sound like the clouds parted and a ray of sunshine struck the programmers at Facebook and they realized that they didn't have to ride the framework-go-round to hell. These are supposed to be the smartest people in SV, but from the outside, it strikes me more as a "No shit, Sherlock" moment.

>> These are supposed to be the smartest people in SV

They might just be. Everyone else is cargo culting on React Native and the like.

Post reply on HN