web框架

web框架的本质是socket
浏览器发socket请求
服务端回复请求,返回字符串

django的socket为别人的socket,整合起来才能用

别人的socket包括
server_names = {
‘cgi’: CGIServer,
‘flup’: FlupFCGIServer,
‘wsgiref’: WSGIRefServer, django默认,性能低,测试用,没有并发
‘waitress’: WaitressServer,
‘cherrypy’: CherryPyServer,
‘paste’: PasteServer,
‘fapws3’: FapwsServer,
‘tornado’: TornadoServer,
‘gae’: AppEngineServer,
‘twisted’: TwistedServer,
‘diesel’: DieselServer,
‘meinheld’: MeinheldServer,
‘gunicorn’: GunicornServer,
‘eventlet’: EventletServer,
‘gevent’: GeventServer,
‘geventSocketIO’:GeventSocketIOServer,
‘rocket’: RocketServer,
‘bjoern’ : BjoernServer,
‘auto’: AutoServer,
}
wsgi规范,web服务网关接口,每个web框架都要遵循这个协议
参考资料

web框架_第1张图片

web框架_第2张图片

所以djang的生命周期为wsgi+django
web框架_第3张图片

你可能感兴趣的:(Django)