4 ms·
At first I was wondering, wait, then how do you talk to the server from the browser? ...Wait, if you control both the client and server, why even use HTTP? I f
by brhsagain 5y ago
At first I was wondering, wait, then how do you talk to the server from the browser? ...Wait, if you control both the client and server, why even use HTTP?
I feel like there's this distressing trend where web programmers export their practices everywhere, and over time, those become the new accepted "primitives" instead of the actual primitives. What used to be a socket is now apparently a whole black-box protocol, where swapping one protocol with another to get speed gains is now noteworthy, and what used to be just FFI or a shared library is now a whole client/server architecture. This is basically the intellectual lineage of stuff like "language servers" where every keystroke your editor heap allocates a JSON tree, serializes it, initiates an HTTP connection, sends it over, reads the response, deserializes it into more heap allocated nodes, etc.... when the actual stated goal (making code intelligence consumable by any client) could be achieved using much less.
Standby as I follow up on this with my own post, "Build a TCP server that's faster than the Redis protocol."
- Kaze404 5y agoThank god I have a machine manufactured in the last decade, or else that would be a problem.
- brhsagain 5y agoOkay, but then why optimize at all? Computers are fast, why not just run HTTP everywhere? What’s the point of the article? My Mac mini runs at three whole billion clock cycles per second. If we’re going to depend on hardware to make our argument, we’re all basically running supercomputers. And yet everything is slow, and my tools lag for no reason, the web in general is slow. Which is all fine, but I thought computers were supposed to be fast? Somehow we’ve arrived at a point where on the one hand, computers are supposed to be fast enough to support these huge skyscrapers of abstraction, but on the other hand… the result is mind blowingly slow.
- blackoil 5y agoInstead of stereotyping and blaming someone, better to find cause in ecosystem. Except for last few years most non HTTP communication systems were complex, platform specific and with enterprisey bloat. May not be for this instance, but if people are gravitating towards a bad tooling alternative must be worse by some important parameter.
- Zababa 5y agoAs one of those web programmers, I'm also rediscovering that you don't have to use HTTP all the time. To be fair, there's already so much to learn just on the web side that it's hard to know everything.