Twisted(asynch server) vs Django(or any other framework)

后端 未结 6 1916
春和景丽
春和景丽 2020-12-28 19:04

I need help understanding what the advantage of using an asynch framework is. Suppose I want to develop a simple chat web app. Why cant I write python code in the Django fra

6条回答
  •  悲&欢浪女
    2020-12-28 19:30

    Asynchronous servers support much larger numbers of simultaneous client connections. More conventional servers come up against thread and process limits when servicing large number of concurrent clients, particularly those with long-lived connections. Async servers can also provide better performance as they avoid the overheads of e.g. thread context switching.

    As well as the Twisted framework, there are also asynchronous server building blocks in Python's standard library: previously asyncore and asynchat, but now also asyncio.

提交回复
热议问题