I recently pushed a couple of WebSocket samples to Github. Both are based around the notion of a chat service – a canonical WebSocket example! These were originally meant to serve as additional material to the Java WebSocket API Handbook in order for readers to understand API usage in practical and also get hands-on by tinkering with the code
- websocket-chat: Basic chat application
- websocket-chat-at-scale: again, a chat application, but a focus on the scalability aspect
Cheers!