Live data from Hacker News

Engineering for Slow Internet

brr.fyi

241–250 of 406 posts

Re: Engineering for Slow Internet

#241

Earlier quoted context omitted.

It often is that way, but it's not for technical reasons. They're just poorly written. A lot of apps are written by inexperienced teams under time pressure and that's what you're seeing. Such teams are unlikely to choose plain server-side rendering because it's not the trendy thing to do. But SPAs absolutely can be done well. For simple apps (HN is a good example) you won't get too much benefit, but for more highly i…

Yep. In SPAs with good architecture, you only need to load the page once, which is obviously weighed down by the libraries, but largely is as heavy or light as you make it. Everything else should be super minimal API calls. It's especially useful in data-focused apps that require a lot of small interactions. Imagine implementing something like spreadsheet functionality using forms and requests and no JavaScript, as o…

> which is obviously weighed down by the libraries, but largely is as heavy or light as you make it

One thing which surprised me at a recent job was that even what I consider to be a large bundle size (2MB) didn't have much of an effect on page load time. I was going to look into bundle splitting (because that included things like a charting library that was only used in a small subsection of the app). But in the end I didn't bother because I got page loads fast (~600ms) without it.

What did make a huge different was cutting down the number of HTTP requests that the app made on load (and making sure that they weren't serialised). Our app was originally going auth by communicating with Firebase Auth directly from the client, and that was terrible for performance because that request was quite slow (most of second!) and blocked everything else. I created an all-in-one auth endpoint that would check the user's auth and send back initial user and app configuration data in one ~50ms request and suddenly the app was fast.

Re: Engineering for Slow Internet

#242
post #85

Earlier quoted context omitted.

We design for slow internet, react is one of the better options for it with ssr, code splitting and http2 push, mixed in with more off-line friendly clients like Tauri. You can also deploy very near people if you work “on the edge”. I’m not necessarily disagreeing with your overall point, but modern JS is actually rather good at dealing with slow internet for server-client “applications”. It’s not necessarily easy to…

By far the lightest weight JS framework isn't React, it's no javascript at all . I regularly talk to developers who aren't even aware that this is an option.

No JS can actually increase roundtrips in some cases, and that's a problem if you're latency-bound and not necessarily speed-bound.

Imagine a Reddit or HN style UI with upvote and downvote buttons on each comment. If you have no JS, you have to reload the page every time one of the buttons is clicked. This takes a lot of time and a lot of packets.

If you have an offline-first SPA, you can queue the upvotes up and send them to the server when possible, with no impact on the UI. If you do this well, you can even make them survive prolonged internet dropouts (think being on a subway). Just save all incomplete voting actions to local storage, and then try re-submmitting them when you get internet access.

Re: Engineering for Slow Internet

#244
One of my first professional software projects, as an intern, was I wrote a tool for simulating this type of latency. I modeled it as a set of pipe objects that you could chain together with command line arguments. There was one that would do a fixed delay, another that would introduce random dropped packets, a tee component in case you wanted to send traffic to another port as well, etc.

Re: Engineering for Slow Internet

#245

Earlier quoted context omitted.

Shutting down 3G was a mistake. Besides turning so many devices into e-waste, it was a good backup when 4g was congested.

The lower-bandwidth connections get completely saturated by modern phones with modern data allowances. Back in the day I had 500MB a month on 3G, for instance. I can use that in a few minutes these days.

Thats been true since the iphone 3g with unlimited data plans though

Re: Engineering for Slow Internet

#246
post #101

I travel a lot. Slow internet is pretty common. Also, right now my mobile data ran out and I'm capped at 8 kbps. Websites that are Just Text On A Page should load fast, but many don't. Hacker News is blazing fast, but Google's API docs never load. The worst problem is that most UIs fail to account for slow requests. Buttons feel broken. Things that really shouldn't need megabytes of data to load still take minutes to…

Google used to be good about slow apps. Using gmail on the school computers in the day, the site would load so slowly it would detect that and instead load a basic html version.

Now a days I download a 500mb google map cache on my phone and its like there is no point. Everything still has to fetch and pop in.

Re: Engineering for Slow Internet

#247

Earlier quoted context omitted.

The lower-bandwidth connections get completely saturated by modern phones with modern data allowances. Back in the day I had 500MB a month on 3G, for instance. I can use that in a few minutes these days.

Thats been true since the iphone 3g with unlimited data plans though

Modern phones and apps use a lot more though. YouTube 1080p60 or even 4K, for example.

Re: Engineering for Slow Internet

#248

Earlier quoted context omitted.

I see this in my french city, there's a particular spot on my commute where my phone (mediatek) will report 2 bars of 5G but speeds will actually be around 3G. I've also noticed other people on the tram having their videos buffer at that spot, so it's not just me. The carriers do not care, of course. I think there's just some of these areas where operational conditions make the towers break in some specific way.

I mean, they're not breaking, they're just overloaded. Solution is generally to add more towers, but that's expensive.

What do we pay them for if not to build out our telecom towers?

Re: Engineering for Slow Internet

#249
post #31

Earlier quoted context omitted.

I guess in London you get wifi only on stops, it's the same in Berlin. In Helsinki the wifi connection is available inside the trains, and in the stations. So you never get a connection loss when moving. I never understood the decision in Berlin to do this, why not just provide internet inside the train... And yeah, most of the internet works very badly when you drop the network all the time...

WiFi at a stop is as easy as putting up a few wireless routers, it's a bit more complex than at home but the same general idea. Wifi inside the trains involves much more work, and to get them to ALSO be seamless across the entire setup - even harder. Easily 10x or 100x the cost. It's sad, because the Internet shouldn't be that bad when the network drops all the time; it should just be slower as it waits to send good…

I think they just put a wire in the tunnel.

Re: Engineering for Slow Internet

#250

Earlier quoted context omitted.

The South Pacific should be very sunny. I guess that you didn't have enough solar panels to provide 60+ watts. I am genuinely surprised. And "local SIM cards" implies that you set foot on (is)lands to buy said SIM cards. Where did you only get 2G in the 2020s? I cannot believe any of this is still left in the South Pacific.

> Where did you only get 2G in the 2020s? My previous smartphone supported 4G/3G/Edge, but for some reason the 4G didn't work. At all, ever, anywhere ( not a provider/subscription or OS settings issue, and WiFi was fine). In my country 3G was turned off a while ago to free up spectrum. So it fell back to Edge all the time. That phone died recently. I'm temporarily using an older phone which also supports 4G/3G/Edge,…

I live in a developed country with 4g/5g everywhere and its still no better than the 3g era I remember. Modern apps and sites have gobbled up the spare bandwith so the general ux feels the same to the user in terms of latency. On top of that there are frequent connection dropouts even with the device claiming a decent connection to the tower. Using mobile internet seems like 4g often can’t bring the speed to load a modern junked up news or recipe site in sometimes any amount of time.
Post reply on HN