Compression support
Hello.
Is it possible to get some kind of data compression like in the link below? Json payload can be very big and native compression (in browser side) woud be abolutely fanstastic.
http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-13
@stuta Do you know any of the mainstream web browsers already support this per-message compression extension?
http://stackoverflow.com/questions/19298651/how-does-websocket-compress-messages http://www.ietf.org/mail-archive/web/hybi/current/msg10109.html
"Some of the extensions seen in the wild:
x-webkit-deflate-frame - an early proposed compression that compresses each raw websocket data frame. Seen in use by Chrome and Safari. perframe-deflate - a renamed version of the above compression. Seen in use by various websocket server implementations, and also briefly showed up in various WebKit based clients. permessage-deflate - the name of the formalized spec for using deflate to compress entire messages, regardless of the number of websocket frames. Of note, the permessage-deflate is the first in a line of PMCE (Per-Message Compression Extensions) that will eventually include other compression schemes (ones being discussed are permessage-bzip2, permessage-lz4, and permessage-snappy)"
So Safari, Chrome and Chrome Canary have something.
Javascript impelementations of compression algorithms are very slow. I don't care what kind of compression technique is used, but something is needed. I'm sure this will come soon and it will be huge benifit when trasferring big amounts of json data.
I'm redy to do performance tests with Chrome Canary or with any other browser.
@stuta Thank you for the information. It'll be great if you can create your own git branch and experiment with the compression extension.
A good article about the issue: http://www.igvita.com/2013/11/27/configuring-and-optimizing-websocket-compression/
Hello. I write extension plugin manager for websocket and permessage-deflate extension. I test it with my websocket implementation and it pass all AutoBahn tests (client and server). I think it should be quite easy to integrate it to your library.
@moteus Pull requests welcome.
Compression support integrated in this library would be great.
Meanwhile do anyone have an example using compression with this library in conjunction with a plugin like @moteus's extension?