How to do Gzip encoding over WebSocket using autobahn android library

393 views
Skip to first unread message

abhishek jain

unread,
Oct 29, 2014, 5:31:27 AM10/29/14
to autob...@googlegroups.com
  
Hi Guys,

We are using autobahn library to implement websocket in our android app. We want to compress our data over websocket. For the same, we want to do Gzip encoding over websocket. Please share your idea how to implement the same.

Thanks,
Abhishek

Tobias Oberstein

unread,
Oct 29, 2014, 1:39:18 PM10/29/14
to autob...@googlegroups.com
Hi,

There is no such thing as "Gzip encoding over WebSocket". Content
encoding negotiation is a HTTP feature.

The right way is to add support for the permessage-deflate WebSocket
extension to AutobahnAndroid.

Cheers,
/Tobias

>
> Thanks,
> Abhishek
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/03403082-17c6-4696-8611-5e33e7afae04%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/03403082-17c6-4696-8611-5e33e7afae04%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

abhishek jain

unread,
Oct 29, 2014, 2:00:23 PM10/29/14
to autob...@googlegroups.com
Hi,

Thanks for the pointer. I am using tomcat container for websocket implementation at server end which also supports this type of compression.

Can you please provide any pointer regarding how to add support for the permessage-deflate WebSocket extension to AutobahnAndroid? It would be great if you can provide any kind of help.

Really liked your library and it was very easy to integrate in our app. Thanks for your wonderful library.

Thanks,
Abhishek

Tobias Oberstein

unread,
Oct 29, 2014, 2:05:11 PM10/29/14
to autob...@googlegroups.com
Am 29.10.2014 19:00, schrieb abhishek jain:
> Hi,
>
> Thanks for the pointer. I am using tomcat container for websocket
> implementation at server end which also supports this type of compression.
>
> Can you please provide any pointer regarding how to add support for the
> permessage-deflate WebSocket extension to AutobahnAndroid? It would be
> great if you can provide any kind of help.

Intro:
https://www.igvita.com/2013/11/27/configuring-and-optimizing-websocket-compression/

Spec:
https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-18

You might also look at the code for Java WebSocket client
implementations with support for permessage-deflate. I guess Jetty does.

>
> Really liked your library and it was very easy to integrate in our app.
> Thanks for your wonderful library.
>
> Thanks,
> Abhishek
>
> On Wednesday, October 29, 2014 3:01:27 PM UTC+5:30, abhishek jain wrote:
>
>
> Hi Guys,
>
> We are using autobahn library to implement websocket in our android
> app. We want to compress our data over websocket. For the same, we
> want to do Gzip encoding over websocket. Please share your idea how
> to implement the same.
>
> Thanks,
> Abhishek
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/bd6607fa-d2e9-4cdc-ba67-a05eddc3f3ca%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/bd6607fa-d2e9-4cdc-ba67-a05eddc3f3ca%40googlegroups.com?utm_medium=email&utm_source=footer>.

abhishek jain

unread,
Oct 29, 2014, 2:20:34 PM10/29/14
to autob...@googlegroups.com
Hi,

Does this means autobahn android library not support permessage-deflate WebSocket extension? If yes, then we have to write our own to support this type of extension. Please correct me if I am wrong.


Thanks,
Abhishek

On Wednesday, October 29, 2014 3:01:27 PM UTC+5:30, abhishek jain wrote:

Tobias Oberstein

unread,
Oct 29, 2014, 3:02:46 PM10/29/14
to autobahnws

Yes, correct.

Sent from Mobile (Google Nexus 5)

--
You received this message because you are subscribed to the Google Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/3f088bb7-b306-4ceb-b127-8360a73904ae%40googlegroups.com.

abhishek jain

unread,
Oct 30, 2014, 12:52:08 AM10/30/14
to autob...@googlegroups.com
Hi,

Can I use Per Message Deflate Extension defined at: https://blogs.oracle.com/PavelBucek/entry/websocket_extensions_in_tyrus? Please let me know.


Thanks,
Abhishek

On Wednesday, October 29, 2014 3:01:27 PM UTC+5:30, abhishek jain wrote:

Tobias Oberstein

unread,
Oct 30, 2014, 6:54:36 PM10/30/14
to autob...@googlegroups.com
Am 30.10.2014 05:52, schrieb abhishek jain:
> Hi,
>
> Can I use Per Message Deflate Extension defined at:
> https://blogs.oracle.com/PavelBucek/entry/websocket_extensions_in_tyrus?
> Please let me know.

If you want to use AutobahnAndroid and want to speak the
permessage-deflate extension, someone needs to implement that extension
within AutobahnAndroid. That means: write code. Contribute to
AutobahnAndroid.

Tyrus is a different WebSocket implementation. I have no clue how it
works, and if it works at all on Android.

>
> Thanks,
> Abhishek
>
> On Wednesday, October 29, 2014 3:01:27 PM UTC+5:30, abhishek jain wrote:
>
>
> Hi Guys,
>
> We are using autobahn library to implement websocket in our android
> app. We want to compress our data over websocket. For the same, we
> want to do Gzip encoding over websocket. Please share your idea how
> to implement the same.
>
> Thanks,
> Abhishek
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/f23b514b-17eb-44d0-a505-1fac87d574d4%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/f23b514b-17eb-44d0-a505-1fac87d574d4%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages