asyncio tornado 与wsgi接口理解

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<=>客户端

  1. 对tornado与asyncio aiohttp的理解:

    1. 既可以作为一个web server,与Apache/Nginx类似,只不过实现机制不同
    2. 又可以作为web 框架,使用异步加速Django Flask等wsgi接口的web框架
    3. aiohttp、tornado与wsgi框架(Django、Flask)等配合使用时,需wsgi adapter转换aiohttp、tornado,因为他们本身并不是wsgi的实现
  2. WSGI、WSGI server、Mod_WSGI

    1. WSGI stands for Web server Gateway Interface, it descript the way a server such as Apache communicates with a python program (web application)
    2. A WSGI server is a server that complies with the WSGI standard
    3. 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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值