Hi guys, I'm new to the python world and consequently I'm new to Django, Channels, WSGI, ASGI, etc.
I asked this question on StackOverflow but I still haven't had any answers, so I decided to post here in order to try to receive some guidance. https://stackoverflow.com/questions/62544489/do-i-need-to-change-my-normal-django-code-when-introducing-django-channels I have a small backend application using Django + Django Rest Framework. My code is very trivial, composed of the most common concepts in the framework: views, serializers, models, urls, etc. In addition, I use a relational database. My environment is this: - Python 3.8 - Django 3 - Django Rest Framework 3.11 Now, I need to add support for WebSockets and I did the basic configuration described in the Django Channels tutorial. At the moment, I have not configured any channel layers or created any WebSocket endpoint. After these configurations the runserver is using an ASGI development server and apparently my REST endpoints are all working. Some questions: - Considering that all my code is synchronous, wouldn't it be necessary to make any adjustments to it? - This configuration above, already does all the magic necessary for my synchronous code to be executed safely in daphene considering that it is an ASGI server? Where exactly should care be taken regarding synchronous code? - Can I serve normal HTTP and WebSockets requests using only ASGI in a reliable and stable manner? Or, is it recommended to serve HTTP traffic using WSGI and leave only WebSockets traffic to daphene? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c70a754c-88ce-4fca-b56b-19efde8930c6o%40googlegroups.com.