News for hackers. Stuff that matters.
Re:Show HN: WebSocket-first development by api on Monday February 13, 2017 @10:22AM (#13635878)
Speaking of web sockets and simplicity:

I never understood why web sockets aren't just a straight break out of HTTP(S) to a naked TCP or SSL socket. Why all the extra complexity? All it does is degrade performance and bloat software.

I hate the way protocols are designed by committee, virtually guaranteeing that everything has layers upon layers of cruft that have never actually been needed by anyone for anything but must be implemented because it's in the spec.

Re:Show HN: WebSocket-first development by hackcasual on Monday February 13, 2017 @10:34AM (#13635991)
For one you need some concept of same origin/CORS. Don't want web sockets to provide an easy DoS vector
Re:Show HN: WebSocket-first development by api on Monday February 13, 2017 @11:10AM (#13636309)
That would be in the headers and prior to protocol breakout. I'm talking about after that. Why does web sockets have an extra layer of framing and other nonsense? Not to mention other "modes of operation." It's a socket. Give me a socket.
Re:Show HN: WebSocket-first development by toomim on Monday February 13, 2017 @12:31PM (#13637039)
No kidding. It's just a new version of TCP, implemented on top of HTTP, which is implemented on top of TCP.
Re:Show HN: WebSocket-first development by lisivka on Monday February 13, 2017 @02:53PM (#13638181)
Because of firewalls, proxies, and NAT.
Re:Show HN: WebSocket-first development by api on Monday February 13, 2017 @03:41PM (#13638566)
You already have a TCP connection, so NAT and firewalls don't matter here. Proxies have to be web socket aware anyway.