As a web developer, I have developed a chat service and some other real-time collaborative services with the help of third-party services like Redis or Pusher. They provide simple API's that I can use publish/subscribe model to achieve bidirectional communication over the webserver. I want to now implement a simple push notification without the use of any third-party services, but I am not quite sure how to achieve this. The situation is as below:
- Backend is in Python (Django)
- A user receives a private message from another user.
- The recipient should be notified without having to refresh the web browser.
My questions:
- From this post, Django seems a bad option to achieve such functionality while Node.js is a good one. Is it true? If it is, why is that?
- Is it possible to open a websockets from client to the server, to listen to certain changes to a specific model? (ex. when there's a new message in Message model, update the DOM)
I appreciate any help a lot!