Code for WebSocket and ServerSideEvent publish/subscribe events in play framework web apps