pythondjangoserverchannelasgi

why they call ASGI a server while they say it is not in django?


i am studying Channels in Django Frameworke.

after that i went to study ASGI specification , but i got confused of :

First

they say that the ASGI is a server in here.

after that they say that the ASGI uses the Daphne as the main server to work in here.

now is the ASGI middle ware uses server in it or it is server or what does daphne do in ASGI.

second

what do they mean by application in ASGI

is the application above the consumer that will work after the connection is came into it through a WebSocket Protocol ?

i have read a lot and read the whole document but in technology every time there is something missing.

thanks


Solution

    1. Understanding ASGI (Asynchronous Server Gateway Interface):
    1. ASGI Middleware and Daphne:
    1. Understanding the ASGI Application:

    In summary, ASGI isn’t a server itself but a protocol that enables asynchronous communication. Daphne serves as the ASGI server, while the ASGI application represents your core logic that handles incoming connections and defines how to handle WebSocket events through consumers. ASGI middleware sits between the server and your application, allowing for custom processing of incoming requests.