Working WebSocket pubsub implementation