Is it possible to pack and unpack websockets traffic frame by frame with GZIP?
We have a lot of websockets traff (real time quotes) that should be packed to reduce traffic, but I have no idea if it is even possible.
Is it possible to pack and unpack websockets traffic frame by frame with GZIP?
We have a lot of websockets traff (real time quotes) that should be packed to reduce traffic, but I have no idea if it is even possible.
Per-message compression as per this draft is where things are going.
Browser support still stands at Chrome-only. Webkit seems to be in the works, but there is no telling when FF and IE will follow.
On the server side, there is e.g. an implementation of this in AutobahnPython (see example here).
Depending on what stack/environments you use for your project, this means that you can try WebSocket compression today.
(Full disclosure: I work for Tavendo, the project maintainer for the Autobahn WebSockets projects.)
I use LZ-String to encode/decode JSON back and forth through sockets; a really slick JavaScript implementation of LZW compression.
Until people reach a standard on this, it's a great solution.
http://pieroxy.net/blog/pages/lz-string/index.html
It reduces text bandwidth an average of 10x and takes less than 1ms to decode a few kb.