Building WebSocket Applications with GlassFish and Grizzly

18 October 2012No Comment

WebSocket is coming with HTML5, and building rich real-time event-driven Web applications will be the future. GlassFish, as of Release 3.1.2, now supports WebSocket, so now is an ideal time to learn this new technology. This tutorial builds a WebSocket Web application hosted on GlassFish that can deliver stock updates from a data grid directly to the Web browser in real time.

It starts by introducing WebSocket and the APIs for building a server-side WebSocket application in GlassFish. It then moves on to the client side and builds an updating stock ticker, using HTML5’s Canvas and JavaScript. For a final flourish, the presenter hooks up GlassFish to a data grid that will deliver updates at scale in real time.