19👍
I think the one major downside you will find is that the ASGI servers are newer and therefore tested less, may have less features, fewer in number, and probably have a smaller community behind them. However, I use an ASGI server (Daphne) for everything and feel that websockets offer so much in terms of user experience that everything will eventually shift to ASGI.
Being able to use asyncio in your code is a major benefit for web programming. Instead of running 10 queries one after the other and waiting for each one to come back, you can run 10 queries at the same time, while hitting your cache and making a HTTP request simultaneously on a single thread.
10👍
I didn’t do any benchmarking but use both WSGI and ASGI in several project and didn’t see any sufficient differences between their performance, so if the Django WSGI performance is acceptable for you then ASGI will work too.
For the REST + websockets API I used ASGI for both. There is no reason to use WSGI if you have ASGI enabled in your project (WSGI works over ASGI).
- [Django]-Django or Django Rest Framework
- [Django]-Django 1.5b1: executing django-admin.py causes "No module named settings" error
- [Django]-What is the difference between postgres and postgresql_psycopg2 as a database engine for django?