We’ve just released the latest GA version of WebSphere Application Server Liberty profile (22.214.171.124), which contains some new features, including WebSockets support. So I thought it would be a good time to share my WebSocket planning poker application with you as an example of creating a simple real-time communication web app built on WebSockets.
WebSockets solves that problem in a much more efficient way. You can hear more about WebSockets as a technology solution on our podcast:
Anyway enough about WebSockets – you came here to read about the new WebSocket sample application!
The idea for this application is from my time on the Liberty development team when we were doing planning poker. The application we were using was OK but didn’t do everything I wanted it to do, so I decided to write my own. At the same time we were implementing WebSockets which looked to solve many of the technical hurdles I needed to solve when creating a webpage with real time chat support. The sample isn’t pretty – but it is functional:
The following YouTube video quickly walks through how the application works and how to deploy it. It highlights how easy WebSockets make full duplex communication between client and server.
The application code is available on our GitHub repository here: https://github.com/WASdev/sample.planningpoker – you can download the code to Eclipse and deploy it to a Liberty server straight away (just remember to add the websocket-1.0 and the servlet-3.1 features in your server xml, and make sure you have either the latest beta or the latest GA version (126.96.36.199) of Liberty).
If you have any questions around WebSockets and how to use them in the Liberty profile please feel free to ask on Stack Overflow.