Re:The future of web software is HTML over WebSockets
by antihero on Thursday February 25, 2021 @02:11PM
(#26266826)
Also:
> Do we really believe that every one of our users is going to have a device capable of digesting 100 kB of JSON and rendering a complicated HTML table faster than a server-side app could on even a mid-grade server?
Yes. This really isn't hard. Pretty much any smartphone can do this with blissful ease. And it scales horizontally because your server can just worry about getting stuff from the database and handing it out.
Re:The future of web software is HTML over WebSockets
by notjustanymike on Friday February 26, 2021 @09:13AM
(#26274908)
Exactly. Our app renders highly detailed 3D anatomy on the canvas. The largest model is a 1mb json file with 57mb(!!!) Of assets. We've never had a problem with mobile devices, they're shockingly capable.
Re:The future of web software is HTML over WebSockets
by da39a3ee on Tuesday March 02, 2021 @12:11AM
(#26312100)
What countries are your users in?
Re:The future of web software is HTML over WebSockets
by g105b on Sunday March 07, 2021 @04:55PM
(#26380152)
San Francisco isn't a country.
Re:The future of web software is HTML over WebSockets
by ehayes on Thursday February 25, 2021 @02:20PM
(#26266970)
Turbo[links], Stimulus, etc. ARE non-blocking background updates. It's HTML over the wire instead of JSON. [1] I don't think this is what you think it is.
Re:The future of web software is HTML over WebSockets
by cpill on Thursday February 25, 2021 @05:12PM
(#26268995)
since when is HTML lighter than JSON?! this use case was what propelled JSON into the mainstream.
Re:The future of web software is HTML over WebSockets
by kawsper on Friday February 26, 2021 @06:18AM
(#26273623)
The argument is that it is lighter for the device just to receive static HTML, than it is for the device to receive JSON and build HTML templates.
Re:The future of web software is HTML over WebSockets
by ymolodtsov on Friday February 26, 2021 @04:14AM
(#26272828)
The idea is that HTML is just slightly heavier but the advantage is you can render it on the server and don't need all that middleware and serialization layer.
Re:The future of web software is HTML over WebSockets
by dahdum on Thursday February 25, 2021 @02:06PM
(#26266771)
That was my first thought too, the word "latency" isn't even mentioned in the article.
Re:The future of web software is HTML over WebSockets
by Asmod4n on Thursday February 25, 2021 @02:23PM
(#26267009)
With this approach you can keep all of the traffic inside a WebWorker, so nothing blocks.
You also get the benefit of not having to open a new connection for every request and automatic reconnects when someting goes wrong. The connection is most likely already established before you even need it.
Re:The future of web software is HTML over WebSockets
by water8 on Thursday February 25, 2021 @02:25PM
(#26267032)
You just described http2
Re:The future of web software is HTML over WebSockets
by Asmod4n on Thursday February 25, 2021 @02:27PM
(#26267065)
Wait, with http2 a webbrowser never closes the connection it has to a webserver?
Re:The future of web software is HTML over WebSockets
by jlokier on Thursday February 25, 2021 @05:20PM
(#26269067)
Even HTTP/1.1 from 1999 keeps a persistent connection open, if the client and server agree.
What it doesn't do so well is lots of parallel requests and responses out of order. HTTP/2 is better for that.
Both versions will close the connection if it's been idle for a while, and automatically reconnect as needed.
Re:The future of web software is HTML over WebSockets
by qbasic_forever on Thursday February 25, 2021 @02:40PM
(#26267235)
Yes, it's a long-lived TCP connection. It's not mandatory but the whole point of the protocol is to make one connection and send/receive all your assets over it instead of making more connections (which take time to setup and slow down page rendering).
Re:The future of web software is HTML over WebSockets
by SahAssar on Thursday February 25, 2021 @03:00PM
(#26267492)
It keeps it open as long as it is used and usually a bit past that. So if you have any traffic or are making periodic requests then it won't close the connection. If you are using SSE that can also use the same shared connection for streaming realtime updates to the client.
Re:The future of web software is HTML over WebSockets
by silon42 on Thursday February 25, 2021 @02:23PM
(#26267005)
At least their web page seems to work without Javascript... I hope this technology will too.
Re:The future of web software is HTML over WebSockets
by Jtsummers on Thursday February 25, 2021 @02:28PM
(#26267070)
Of these things, I've only played with LiveView (I'm a web dabbler, not a pro, but an Erlang/Elixir fan so it was interesting to me). At least through the material I've worked through, it fails to a usable mode when JS/WS themselves fail on the client side. In theory, the only required JS is the JS needed to establish the WS connection and communicate with the server and issue the updates. But if the WebSocket fails, you should end up with just a full page load instead of the diff being applied. (NB: A particular site/application may have more JavaScript, but for what LiveView offers out-of-the-box there's not much JavaScript that's included or needed.)
Re:The future of web software is HTML over WebSockets
by ecmascript on Friday February 26, 2021 @03:28AM
(#26272551)
I had this thought as well, but having used Liveview in Phoenix this really isn't the experience. Since the updates are really small and as long as you do it only when you want updates from the backend anyway the experience is just as smooth as any SPA even on a shitty mobile connection.
Re:The future of web software is HTML over WebSockets
by beagle3 on Friday February 26, 2021 @07:26AM
(#26274081)
Isn’t this also the basis for Stadia RIP and XBox Mobile work on iPhones? That seems to deliver acceptable results for even arcade games on WiFi.
Latency seems to have been conquered.
Re:The future of web software is HTML over WebSockets
by FridgeSeal on Friday February 26, 2021 @07:54AM
(#26274268)
> Latency seems to have been conquered.
I dare you to say that from Australia.
He describes a "please wait buffering" future of web software. No thanks.