Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django + uWSGI + Websocket client connection

We are trying to integrate Socket.io with our website. All messages are sent with uWSGI workers (Django). My problem is, that every message does all connection magic. It looks now like that:

Request -> HTTP Handshake with Socket.io -> Websocket connection -> Data send -> Connection close

And repeat for every message that need to be send to socket.io. It's far from ideal. Sometimes there are 3-4 messages queued / request. Is there way to share socket connection within requests with uWSGI? I don't need sharing between workers, just only within all requests processed by particular worker. Or maybe there are other solutions for that problem?

like image 394
ThomK Avatar asked Jan 18 '26 20:01

ThomK


1 Answers

If someone has similar problem, check out Roberto (dev of uWSGI) response to my e-mail on mailing list here: http://lists.unbit.it/pipermail/uwsgi/2011-July/002436.html :)

like image 57
ThomK Avatar answered Jan 21 '26 09:01

ThomK