[server] rewrite server with gevent