Re:You might not need WebSockets
by hombre_fatal on Friday April 11, 2025 @08:15PM
(#43660106)
On the other hand, we're doing the worse tactic of getting held up on the first tiny subheader instead of focusing on the rest of a decent article.
Also, their alternative is just a library. It's not like they're selling a SaaS, so we shouldn't be mean spirited.
Re:You might not need WebSockets
by NetOpWibby on Saturday April 12, 2025 @12:52AM
(#43661457)
> ...we shouldn't be mean spirited.
Am I on the right website? checks URL
People find anything to be mean about on here.
But it is frowned upon.
Pretty much. In this case, WebSockets is simpler to implement than HTTP2; it's closer to raw TCP, you just send and receive raw packets... It's objectively simpler, more efficient and more flexible.
It's a tough sell to convince me that a protocol which was designed primarily for resource transfer via a strict, stateless request-response mode of interaction, with server push tacked on top as an afterthought is simpler than something which was built from the ground up to be bidirectional.
Re:You might not need WebSockets
by bobmcnamara on Friday April 11, 2025 @10:04PM
(#43660673)
I fixed a few bugs in a WebSocket client and was blown away by the things they do to trick old proxies into not screwing it all up.
Re:You might not need WebSockets
by fenesiistvan on Saturday April 12, 2025 @12:39PM
(#43665928)
I would be interested in those tricks
Re:You might not need WebSockets
by bobmcnamara on Saturday April 12, 2025 @04:40PM
(#43667779)
A big one is 'masking' all client requests that a proxy can't effectively cache the response since the request always changes.
The RFC explains it: https://datatracker.ietf.org/doc/html/rfc6455#section-5.3
Re:You might not need WebSockets
by AtlasBarfed on Friday April 11, 2025 @11:22PM
(#43661058)
Aren't websockets the only way to some sort of actual multi-core and threaded code in JavaScript, or is it still subject to the single background thread limitation and it just runs like node does?
Re:You might not need WebSockets
by nothrabannosir on Friday April 11, 2025 @11:41PM
(#43661147)
Do you mean web workers? https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...
Re:You might not need WebSockets
by waynesonfire on Saturday April 12, 2025 @02:52AM
(#43661979)
Absolutely. The author conveniently leaves out the benefit that websockets enable ditching the frontend js code--included is the library the author is plugging. The backend shouldn't send back an error message to the frontend for rendering, but, instead, a rendered view.
Re:You might not need WebSockets
by procaryote on Saturday April 12, 2025 @04:17AM
(#43662445)
The loaf shouldn't be in the fridge, and 2.1mm is way too much butter, especially if applied before putting the bread in the toaster
Re:You might not need WebSockets
by iandanforth on Saturday April 12, 2025 @05:11AM
(#43662727)
Sandwich code review is what HN is for.
sanwy.ch is the name of the YC25 startup tackling AI sandwich tech.
I think we need a function that returns the correct butter height given the dimensions of the input bread. We may also need an object containing different kinds of bread and the ideal amount of butter for each depending on the absorbtion characteristics of the bread, etc. The user's preference for butter might also need to be another parameter.
Re:You might not need WebSockets
by goosejuice on Saturday April 12, 2025 @10:30AM
(#43664699)
Too much butter? You're not living if thats too much butter!
Re:You might not need WebSockets
by plasma_beam on Saturday April 12, 2025 @04:51PM
(#43667854)
You butter bread before it’s toasted? My mind is honestly blown (as I move to kitchen to try this).
For example, making a sandwich: You have to retrieve exactly two slices of bread after finding the loaf in the fridge. Apply butter uniformly after finding the appropriate knife, be sure to apply about a 2.1mm level of coating. After all of that you will still need to ensure you've calibrated the toaster!"