I am working on a project with a WebSocket connection. Currently I call Session.getBasicRemote().sendText(String) for answering requests. So far it works, but I was thinking about using RemoteEndpoint.Async for them. Most of the request will do fine when they are asynchronous.
But I was wondering, will this thread creating produce an unnecessary overhead? The typical length of a message is around 50-80 characters long. Soo.... What do you think? Will there be any benefits of using RemoteEndpoint.Async instead of RemoteEndpoint.Basic?