Greenev-Python Asynchronous Network Service Framework, greenevpython

Source: Internet
Author: User

Greenev-Python Asynchronous Network Service Framework, greenevpython

Greenev is a Python network service framework based on greenlet coroutine, event-driven, and non-blocking socket model. It enables synchronous code writing, but achieves the advantages of asynchronous execution.

This project was inspired by gevent, openresty, alilua, skynet, clowwindy/ssloop, and I would like to express my gratitude here.

  • The reactor mode adopts IO multiplexing based on epoll, kqueue, poll, and select.
  • Schedule the greenlet coroutine on the upper layer based on the underlying reactor
  • Tested on CentOS6.5, Ubuntu12.04, FreeBSD10.1, and Windows7
  • You only need to call g. parent. switch to suspend the current coroutine without managing the details.


Modify the following system parameters (CentOS) before testing ):

Cmd code
  1. Net. ipv4.tcp _ syncookies = 1
  2. Net. ipv4.tcp _ tw_reuse = 1
  3. Net. ipv4.tcp _ tw_recycle = 1
  4. Net. ipv4.tcp _ fin_timeout = 30
  5. Net. ipv4.tcp _ keepalive_time = 1200
  6. Net. ipv4.ip _ local_port_range = 1024 65000
  7. Net. ipv4.tcp _ max_syn_backlog = 8192
  8. Fs. file-max = 65535
  9. Net. ipv4.tcp _ max_tw_buckets = 20000
  10. Net. nf_conntrack_max = 65000
  11. Net. netfilter. nf_conntrack_tcp_timeout_established = 1200



Managed address: https://github.com/Hevienz/greenev

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.