Implementing gzip compression of messages exchanged between the Websocket server and client endpoints written in Java

I do not see specific documentation on javax.websocket.Session getBasicRemote () and getAsyncRemote () sendText () and sendBinary () methods on how gzip compression can be used to send messages. I am writing a high-performance messaging application that can send several hundred thousand messages per second among peers. Some of these messages are small, and some are large and can use gzip compression (90% less data transfer). Are there any special extensions that will be used to get this compression for every message in Jetty 9 or in any other container?

Note. I am not developing a browser based webmail solution. Clients and servers are strictly Java clients that can work with any implementation of the JSR-356 Websocket container.

+4
source share
1 answer

RFC 7692 (Compression Extensions for WebSocket) is the official specification for message compression. Jetty 9 supports specification.

+1
source

Source: https://habr.com/ru/post/1649673/


All Articles