The WebSocket protocol was implemented to replace the existing bi-directional communication mechanisms that uses HTTP as a transport layer, as HTTP was not initially meant to be used for these purposes. This new technology ensures establishment of a single full-duplex TCP connection between client and server, where messages are instantly transmitted with little overhead, both upstream and downstream at once. At the same time, WebSockets technology is designed to work over the standard HTTP ports (80 and 443) and to support HTTP proxies and intermediaries, representing a trade-off between efficiency and reliability
Jelastic provides you with an advanced and complemented WebSockets support by means of integrating this technology to the Jelastic Shared Resolver and NGINX-balancer node, so you can use it even without external IP address attached to your server. The easiest way to configure the WebSockets support for your application is to place an NGINX balancer in front of it - the detailed workflow can be seen here.
Nevertheless, if this method contradicts your requirements, the WebSockets protocol usage is also supported by all the Java application servers, provided at Jelastic. Herewith, implementation of WebSockets for Java is commonly performed through configuring your application itself and does not require any special server configurations, thus you are only limited by your current programming skills, persistence and imagination.
The only exception is GlassFish, as it requires some server-side configurations for the WebSockets support activation. So, let’s find out how this can be done - just follow the simple instruction below.