websocket server with pubsub functionality