Update document on socket.io