Live data from Hacker News

Rebuilding our tech stack for the new facebook.com

engineering.fb.com

381–390 of 489 posts

Re: Rebuilding our tech stack for the new facebook.com

#381
post #364
post #265

A big point of contention in the comments here lies around the concept of what a website should be. A school of thought in web development believes the web to be the next frontier in application development. For them it makes sense that websites like this feel and act like apps, both as an end-user (animations, transitions without full-page reloading, rich dynamic content, etc) and as a developer (client-side state m…

I don't think you articulate this quite right: it's possible to both think that websites and web applications are worthy uses of the web, but also that many web applications would have been best engineered using 'classical' techniques from early websites. There's a strong argument to be made in Facebook's case, since the core value proposition of Facebook hasn't changed much since it's inception, and it began its lif…

> it's possible to both think that websites and web applications are worthy uses of the web, but also that many web applications would have been best engineered using 'classical' techniques from early websites.

I agree with this.

> There's a strong argument to be made in Facebook's case, since the core value proposition of Facebook hasn't changed much since it's inception, and it began its life as a server-side rendered 'website.'

Yes, but I assume that's from the perspective of the value the site brings to you, not in general and not to everyone. If someone solely gets value from facebook.com as a site to send and receive information to/from friends and the world, then yeah, it hasn't changed much.

Facebook today offers a richer experience and that might be part of its value for other people. On facebook.com you can IM a friend, while watching a video in a PIP window and engaging in a real-time conversation on the the comment thread of an event post. You can then switch back and forth between an online marketplace and a streaming service without losing the state of your chat window. The ability to do these things are part of the value proposition for many users that facebook.com now offers today, and delivering that value can be harder with a solely SSR'd website.

> there would be less incidental complexity overall if what are typically called web applications took a different approach to implementing their features, while still maintaining the same user experience.

If you've figured a way that's better do share! I'm sure there's instances in the wild, but I don't think an experienced engineer would ship their own client-side networking in JavaScript if there was a better way to achieve what they want without shipping any more JS.

> It's hard to look at all of the crap you need to do to get a functioning web app working to not think there must be a better approach.

To be clear, you can get a functional "hello world" web app with a single line a code (specifically, thanks to the fact html is very permissive with improperly formatted documents). Everything afterwards depends on the decisions you make, for the experience you want. Is getting rid of that 200ms flicker between page full page loads worth the 500ms it might take takes to load and initialize your client-side routing library? Is making your site available offline worth the effort of setting up all the extra PWA business? Some will think so, some will not.

In any case, this argument is operating at the wrong level of abstraction, the issue here isn't the distinction between these two things conceptually, but if there would be less incidental complexity overall if what are typically called web applications took a different approach to implementing their features, while still maintaining the same user experience.

It's hard to look at all of the crap you need to do to get a functioning web app working to not think there must be a better approach.

Re: Rebuilding our tech stack for the new facebook.com

#382

Quite sincerely, it's a total failure. I got the chance to try the new interface, and it's so slow that it's barely usable. It's even slower than the old website, that was already painfully slow. Loading a random profile takes 8 seconds. Opening a messenger discussion takes 6 seconds. It reminds me of the new Reddit website. Facebook was more enjoyable to use 12 years ago. It's really sad that in 2020, 10k+ engineers…

Agree whole heartedly, Facebook is a disgrace of a website and has been for years. Crazy how slow it is to load.

Not sure why I'm being downvoted, in what way is Facebook's performance not atrocious?

Re: Rebuilding our tech stack for the new facebook.com

#383
post #265

A big point of contention in the comments here lies around the concept of what a website should be. A school of thought in web development believes the web to be the next frontier in application development. For them it makes sense that websites like this feel and act like apps, both as an end-user (animations, transitions without full-page reloading, rich dynamic content, etc) and as a developer (client-side state m…

There is something between 10ms and 10s, especially when it's after the initial load. The point of contention is not the website vs webapp debate, it's more that a webapp doesn't have to be that bloated.

The whole point of SPA initially was better use experience, notably through faster response time and loading.

Re: Rebuilding our tech stack for the new facebook.com

#384
post #305

Earlier quoted context omitted.

Please name some.

Some good React alternatives?

I’ve been plying around with lit-element lately and am finding it a much simpler experience overall. Likely a lot faster as well https://youtu.be/uCHZJy2n8Qs

Re: Rebuilding our tech stack for the new facebook.com

#385
post #319

Earlier quoted context omitted.

I don't think it's any of those. It's about interactivity in the webpage. Imagine you have the template for the HTML of comments implemented in PHP. Now if the user posts a comment and you want to show the comment on their screen before it gets to the server and back, then you need the template itself on the client. The template being on the server in PHP isn't any help. You could imagine the server filling the templ…

I agree with this assessment of the 'why' - and it's why I mentioned things like turbolinks and liveview. What you mention here seems like a convoluted solution to the problem, but I realize it's how it's done, and I've written thousands of lines of code doing it. In fact, the original AJAX stuff in the early 00's typically did a primitive version of this since it was the most obvious solution during the era of serve…

Asking the server for new HTML means you can't show changes until you've done a roundtrip with the server. That means no optimistic rendering or immediate feedback for local changes, such as a comment being made or an option being set in a modal that opens up related settings, etc. I think it's extremely useful to have a system that allows the client to respond to changes locally on its own as the default case rather than treating local interactions like a strange one-off exception.

React only re-renders the components that have their own props or state change. There seems to be a popular misunderstanding that React that makes you re-render the whole page in response to changes, but that's not how it works.

Re: Rebuilding our tech stack for the new facebook.com

#386
post #4

This is 100% incidental complexity. It's painful to consider that this level of sophisticated engineering is needed to render a website quickly in 2020. What went wrong? I'm personally excited about things like turbolinks and phoenix liveview, which may provide a path out of this mess.

Facebook rendered just fine a decade ago. What changed between now and then, in terms of actual improvement to end user experience, to make it so slow this kind of crap is needed? My guess is: - Desire to offload more processing to end user machines to save compute - More and more ads and user analytics in order to pick which ads to show - More engineers that irrationally hate the simplicity of PHP Duct tape on top o…

I worked on FB site performance a decade ago and I assure you it was abysmally slow.

Re: Rebuilding our tech stack for the new facebook.com

#387
post #122

I'm actually really surprised by the number of comments in this thread about how the new redesign is slower. I've had it since yesterday and it genuinely feels much faster and more responsive than the old Facebook UI - though, to be fair, that's not a huge accomplishment give that the old UI would take forever to finish painting or respond to input. I'd consider it a success, especially when compared to the disaster…

Let’s go on this tangent, why is Reddit’s frontend so sluggish and lacking quality of life improvements that should be in place by now? Surely they are hiring world-class devs, so what’s holding them back?

It's by design. Reddit doesn't want you using the website. They want you to download the app. As numerous annoying popups and notifications will tell you when visiting the website (especially on mobile).

Re: Rebuilding our tech stack for the new facebook.com

#388

Earlier quoted context omitted.

They aren't though. You have a cache.

Facebook release multiple times a day (or they did), so the browser cache is irreLevant.

Thanks siblings, for letting me know about FB’s use of code splitting and how it helps caching.

Re: Rebuilding our tech stack for the new facebook.com

#389
post #265

A big point of contention in the comments here lies around the concept of what a website should be. A school of thought in web development believes the web to be the next frontier in application development. For them it makes sense that websites like this feel and act like apps, both as an end-user (animations, transitions without full-page reloading, rich dynamic content, etc) and as a developer (client-side state m…

There is something between 10ms and 10s, especially when it's after the initial load. The point of contention is not the website vs webapp debate, it's more that a webapp doesn't have to be that bloated. The whole point of SPA initially was better use experience, notably through faster response time and loading.

If you are not building for the first time experience I do not understand why you would have a problem with initial load of a web app taking seconds. It's like an install just way faster. No one uses facebook only once and so shouldn't care. Android apps are so shit the "slow" webapps are still miles ahead. I do not understand why android google drive app takes 5 seconds to load

Re: Rebuilding our tech stack for the new facebook.com

#390
post #209

Earlier quoted context omitted.

Imagine this: A "free" ad-driven social networking site that brings in gigantic revenue, but that has to pay thousands of high-priced engineers to implement all of the cruft you just described. versus ... A subscription-based, non-ad-driven social networking site (perhaps operating as a member-owned cooperative?) that brings in much more modest revenue but that also can operate with many fewer engineers because it ca…

Food for thought- the value of each user is radically different when accounting for geographic (i.e. income) markets. For subscription to work, you either: 1- undercharge users from wealthier countries 2- price poorer users out of you platform 3- give up on the idea of worldwide adoption (Facebook scale, as you say) entirely 4- attempt to charge different amounts by country of origin, and watch your users cheat the s…

6. Option 4, but just relax about the outcome.

At ardour.org, we offer 3 tiers of subscriptions ($1, $4 and $10 per month) named to target different economic conditions. We also offer a single fixed payment with a suggested but editable cost based on OECD data about the cost of dining out.

We're not trying to maximise revenue, which is perhaps an important difference between us and, oh, Facebook :)

Post reply on HN