using websocket and long-polling implement a chat room