Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement real-time updates with Django REST Framework?

I have a client app that needs to be synchronized tightly with the server. So far, I've been using polls to retrieve the data from my REST Framework views. But the amount of requests is now too large, and I need to move towards a server push option instead. I've looked at a few options, such as Pusher, Redis/PubNub...but there are a lot of options, and very few recent documentation about it.

What would be the best way to implement real time with the django-rest-framework views?

like image 254
As Auth Avatar asked Mar 19 '23 13:03

As Auth


1 Answers

I'm haven't tried it, but I think DRF + Django Channels + Websocket will do the job. I know this is an old thread, so I guess this will help other people having the same problem.

enter image description here

Read: https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django

like image 138
Imran Ariffin Avatar answered Mar 23 '23 00:03

Imran Ariffin