example codes for gevent and related techniques