Earlier quoted context omitted.
Why? They are Web Sockets, and we have AJAX already.
Ajax is merely a client JS interface to HTTP. A protocol that already exist. It's not a protocol being imposed on web servers. When you want to impose a new protocol on web servers and browsers, it better not be to solve push notifications only. And that's what SPDY did.
How WebSockets work vs polling/long polling/streaming
31–40 of 44 posts
Re: How WebSockets work vs polling/long polling/streaming
#32Looks like an advertorial. No mention of socket.io and praise for a commercial solution that I didn't know after almost two years working with websockets.
Yup. It is an advertorial. Kaazing like promoting their own "WebSocket Gateway", and they're in a great position to, owning websocket.org By the way, at the moment I'm using Python's Twisted with a simple wrapper called txWS: https://github.com/MostAwesomeDude/txWS I'm not a big fan of socket.IO, seems too complex for my needs. I was quite happy to discover txWS, it's literally one more function call and you can just…
Re: How WebSockets work vs polling/long polling/streaming
#33I find it amusing that TCP was designed as and still is a full-duplex protocol for long-lived connections (streams). Then someone decides to use it in HTTP (1.0) for short-lived, half-duplex, message-oriented communication. Not surprisingly, it is not a good fit. Fast-forward a couple of years and everybody is busy de-crippling TCP in HTTP with various hacks trying to delay the HTTP request-response cycle, thus uncov…
Wait a little longer and, if we are very lucky, multicast will be "re-discovered" as well. That way, instead of having servers shove data down many sockets to many clients, they will write their payload down 1 multicast socket to all interested clients, with said payload crossing the network as little and as far as necessary but not more. So goes the wheel of progress...
Re: How WebSockets work vs polling/long polling/streaming
#34Earlier quoted context omitted.
Yup. It is an advertorial. Kaazing like promoting their own "WebSocket Gateway", and they're in a great position to, owning websocket.org By the way, at the moment I'm using Python's Twisted with a simple wrapper called txWS: https://github.com/MostAwesomeDude/txWS I'm not a big fan of socket.IO, seems too complex for my needs. I was quite happy to discover txWS, it's literally one more function call and you can just…
Shameless plug: SockJS is non-complex alternative to Socket.io, websockets polyfill.
Re: How WebSockets work vs polling/long polling/streaming
#35I find it amusing that TCP was designed as and still is a full-duplex protocol for long-lived connections (streams). Then someone decides to use it in HTTP (1.0) for short-lived, half-duplex, message-oriented communication. Not surprisingly, it is not a good fit. Fast-forward a couple of years and everybody is busy de-crippling TCP in HTTP with various hacks trying to delay the HTTP request-response cycle, thus uncov…
Re: How WebSockets work vs polling/long polling/streaming
#36Earlier quoted context omitted.
Exactly. Ajax in general breaks REST, including bookmarking, caching, navigation and more. All major selling points of HTTP goes out the window. HTTP was created on top of TCP, but with severe restrictions to get the great features which HTTP is well-known for. Now someone re-lauches unrestricted TCP as a feature, when it is in fact much more simplistic and formed the base all along. Usage was purpously off limits du…
> Ajax in general breaks REST Huh? You are supposed to correctly choose the HTTP verbs and URI path precisely so that HTTP semantics apply. If you are talking about page state then there are numerous ways of dealing with that - one example is http://diveintohtml5.info/history.html If your assertion is that developers can write bad code, abuse HTTP semantics, defeat caches, break navigation etc then so what? With the…
Re: How WebSockets work vs polling/long polling/streaming
#37I find it amusing that TCP was designed as and still is a full-duplex protocol for long-lived connections (streams). Then someone decides to use it in HTTP (1.0) for short-lived, half-duplex, message-oriented communication. Not surprisingly, it is not a good fit. Fast-forward a couple of years and everybody is busy de-crippling TCP in HTTP with various hacks trying to delay the HTTP request-response cycle, thus uncov…
So what underlying protocol would you have used instead?
But the point I was trying to make is that TCP was intentionally crippled by HTTP to acheive REST. Then people hack the restrictions of TCP and declare a new invention.
Re: How WebSockets work vs polling/long polling/streaming
#38Earlier quoted context omitted.
I am not dismissing HTTP. The mistake I refered to was to limit TCP usage for www by only allowing the request-response oriented HTTP protocol. HTTP is opinionated and its REST-based architecture was explicitly chosen to disallow partial updates of web pages, thusly crippling TCP. But if one wants to build "thick client" type apps the restrictions of HTTP will weigh you down hard. Allowing for unrestricted TCP usage…
You say HTTP crippled TCP so as to not break-down REST. HTTP 1.0 does not seem to be designed for REST; it doesn't seem that REST was really published until quite a while later. Calling HTTP "REST-based" seems a bit of a stretch. On top of that, could you give a few examples of what you actually mean? Like what would a partial update be? TCP seems like a perfect fit for the underlying transport for a request/response…
Re: How WebSockets work vs polling/long polling/streaming
#39Earlier quoted context omitted.
I am not dismissing HTTP. The mistake I refered to was to limit TCP usage for www by only allowing the request-response oriented HTTP protocol. HTTP is opinionated and its REST-based architecture was explicitly chosen to disallow partial updates of web pages, thusly crippling TCP. But if one wants to build "thick client" type apps the restrictions of HTTP will weigh you down hard. Allowing for unrestricted TCP usage…
You say HTTP crippled TCP so as to not break-down REST. HTTP 1.0 does not seem to be designed for REST; it doesn't seem that REST was really published until quite a while later. Calling HTTP "REST-based" seems a bit of a stretch. On top of that, could you give a few examples of what you actually mean? Like what would a partial update be? TCP seems like a perfect fit for the underlying transport for a request/response…
Re: How WebSockets work vs polling/long polling/streaming
#40I find it amusing that TCP was designed as and still is a full-duplex protocol for long-lived connections (streams). Then someone decides to use it in HTTP (1.0) for short-lived, half-duplex, message-oriented communication. Not surprisingly, it is not a good fit. Fast-forward a couple of years and everybody is busy de-crippling TCP in HTTP with various hacks trying to delay the HTTP request-response cycle, thus uncov…
Wait a little longer and, if we are very lucky, multicast will be "re-discovered" as well. That way, instead of having servers shove data down many sockets to many clients, they will write their payload down 1 multicast socket to all interested clients, with said payload crossing the network as little and as far as necessary but not more. So goes the wheel of progress...