Apache和Nginx是真正web server
aiohttp是一个基于Python 3.4+ asyncio模块的HTTP工具包(或框架Framework),有点类似于 tornado
Python web开发都要到框架 如 Django, Flask之类
数据库 <=> Python web 框架 <=> Apache / Nginx <=> 客户端
数据库<=>wsgi server<=>wsgi application<=>Apache/Nginx<=>客户端
-
对tornado与asyncio aiohttp的理解:
- 既可以作为一个web server,与Apache/Nginx类似,只不过实现机制不同
- 又可以作为web 框架,使用异步加速Django Flask等wsgi接口的web框架
- aiohttp、tornado与wsgi框架(Django、Flask)等配合使用时,需wsgi adapter转换aiohttp、tornado,因为他们本身并不是wsgi的实现
-
WSGI、WSGI server、Mod_WSGI
- WSGI stands for Web server Gateway Interface, it descript the way a server such as Apache communicates with a python program (web application)
- A WSGI server is a server that complies with the WSGI standard
- Mod_WSGI is an Apache module that support the WSGI standard and thus allows Apaches to be a WSGI server. it allow you to host python programs through Apache.
参考链接:
为什么要用Tornado框架:https://www.jianshu.com/p/d8ef2cfd53f7
如何理解 Tornado ?:https://www.zhihu.com/question/20136991
「WSGI」WSGI概述:https://blog.csdn.net/jinixin/article/details/84677104