Any suggestion for using non-blocking MySQL api on Tornado in Python3?

筅森魡賤 提交于 2019-12-05 21:22:33

Another option is to setup Multiprocessing ( http://docs.python.org/library/multiprocessing.html?highlight=multiprocessing#multiprocessing ) and use on of the processes as a Queue manager for the DB.

Combine Multiprocessing with efficient SQL queries and you should minimize your overall impact. The blocking calls will only be done on the DB Processing Queue Manager process and the rest of the application can run without being blocked. The only people affected are the ones attempting to run a DB query at the same time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!