It's not like WebSockets runs "over" HTTP, it just uses an HTTP-like handshake; besides that, it's just a simple framing protocol over TCP.
That's why you can use a simple proxy to "websocket-ify" applications that use plain-old raw TCP connections.
It's not like WebSockets runs "over" HTTP, it just uses an HTTP-like handshake; besides that, it's just a simple framing protocol over TCP.
That's why you can use a simple proxy to "websocket-ify" applications that use plain-old raw TCP connections.
Websockets is ridiculous for this reason.
It has a stream abstraction (Websocket API) over a packet based protocol (Websocket Protocol) on top of streaming protocol (TCP) on top a packet protocol (IP).
This shit has to stop.
We had everything we needed. Websockets should have just been exposing regular sockets to the browser.
I don't buy the HTTP proxy argument.
- Multiplexing multiple logical WebSocket servers on a single port, through the HTTP host header and URI.
- Authentication through HTTP basic or digest authentication.
Very, very useful features.
Still, if TCP is the transport layer, and HTTP/SMTP/etc. are the application layer, then what do we call WebSockets when we implement an application layer protocol on top of it? The application compatibility layer?
In the past we had operating systems with network stacks and shared libraries for working with application protocols. Now we have browsers with network stacks and JavaScript libraries for working with application protocols. Wasn't it just a few days ago that someone was proposing an OS that would do just enough to boot a browser, and then let the browser handle most of the "traditional" operating system tasks? How long before we see a proposal for "lowering" WebSocket connections to the TCP layer?
This is what I mean when I say that we risk finding ourselves 20 years in the past. HTTP isn't ubiquitous because it is better. It's better because it is ubiquitous. If we don't pay attention to why things like WebSockets are easier to use today than raw TCP, then history will repeat itself.
We already have that - Firefox OS: https://www.mozilla.org/en-US/firefox/os/
I haven't seen anything that actually requires a new OSI layer, only people trying to reinvent lower-level layers poorly to address gross incompetence.
The Internet is more than the Web, and the Web will eventually be replaced.