Re: how to use multithreading concepts in Django Rest Framework?

894 views
Skip to first unread message

Mark Phillips

unread,
Mar 12, 2019, 11:08:34 AM3/12/19
to django-rest users
Have you looked at celery and redis?

Mark

On Mon, Mar 11, 2019 at 10:32 PM mohamed fazil <rmoham...@gmail.com> wrote:
I am using Django rest framework. I had a rest URL when i call that URL at a time from various 3, 4 streaming client, I got a response from only one client remaining client not responding me for that purpose only I want to know how to use multithreading in Django rest framework?  how to resolve this problem? can anyone help me out this problem?

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mohamed fazil

unread,
Mar 13, 2019, 12:20:53 AM3/13/19
to django-res...@googlegroups.com
Yes phillips both we looked but not useful to this problem. Thanks for your kind reply. Any other suggestion is there please suggest me

Thanks
Fazil
Skits Private Ltd.

mohamed fazil

unread,
Mar 13, 2019, 12:36:15 AM3/13/19
to django-res...@googlegroups.com
And celery not working python 3.7 or above 

Fazil
Skits Private Ltd.

Abhinav Mehta

unread,
Mar 13, 2019, 1:42:50 AM3/13/19
to mohamed fazil, django-res...@googlegroups.com
Not sure if DRF is designed for multi-threading. I believe it’s just a web-framework.

Specifics like multiple-threading etc. should be better offloaded to other tools/frameworks like celery, pyspark, numpy, dask etc.
If required, plug these tools/frameworks inside serializers, views, signals etc.

Abhinav Mehta

unread,
Mar 13, 2019, 1:50:01 AM3/13/19
to django-res...@googlegroups.com, mohamed fazil
And for the streaming problem — cache serializers, responses at web-server(nginx/apache) may help?

But I’m not sure it will last for long, because 3-4 concurrent clients are too less to be having any problem in prod env and in-general number of clients grow fast.
Reply all
Reply to author
Forward
0 new messages