Tyrus client does not need to have an application server! :)
See the Tirus Documentation and blogpost Reducing the size of the WebSocket client bank using ProGuard (you can get up to 500 kB with JDK 7 +).
About size - it can be minimized even more, but with some refactoring in Tyrus code. Comparing WebSocket and a regular socket is not very accurate - ordinary sockets do not need to implement HTTP and (traditionally) did not support NIO (which came with Java 7). The other part is the implementation of the WebSocket protocol, which is not so difficult, but also not just sending the byte [] to the wire. There is some handshake opening, signal frames and mandatory strict UTF-8 encoding / decoding.
So, I think you could find a simpler implementation of the API, but sticking to something that is supported and part of Java EE does not seem bad to me - you have the option to choose an implementation (The virus is only one of them, there is and others), and your client will be ready to be included in the Java EE application if this ever happens. (Editor's note: I am working on Tyrus, so my answer is most likely biased).
source share