I have a Django-based project that I would like to make real-time so I thought of Django channels. However, I am still not sure whether this is the right project to apply Django channels and which part of the project I should apply it.
I have a bunch of sensors continuously reading data and saving/updating them into a database in the backend. Data from the database is then passed to the frontend, displayed on a webpage.
Data flow: Sensors > Gateway > Database > Backend > Frontend
I have implemented Django signals to continuously listen to any updates on the database at the backend, in order to perform some notification functions to the user on the frontend.
My Questions
1) In this example, where should I implement Django channels?
2) Django signals vs Django channels -- overlap?
It feels like Django signals is doing its job in real-time when it listens to the updates on the database. When it notifies me that there is an update, I'd just call on my bunch of code that performs some notifications I want it to. Isn't this already in real-time? Do I or should I use Django channels here?
Thank you in advance for any help!
I have implemented something similar with Django. Here the main points:
Channels works best when used with WebSockets in the front end. It could be difficult at the beginning to have a full working production setup, yet the final result is usually very good for real time in-browser notifications in a modern and interactive way (ie: no page refresh).