gevent-socketio
gevent-socketio copied to clipboard
Issue112
This is an incomplete attempt to solve https://github.com/abourget/gevent-socketio/issues/112.
As discussed on the mailing list here is a pull request of the code so we can discuss the patch further.
Have a nice day :)
Have you taken a look at my other questions ?
How will the
sessionattribute be handled ? Will that be shared through Redis ?
As long as the session attribute can be pickled I think it could be shared through Redis.
Also, will that be easily useable without Gunicorn ?
To be honnest, I do not know. I only use Gunicorn.
Maybe a little doc on how to configure it if you run it through django/paste or something ?
Let's try to get a strategy and a working patch first. Documentation will come later I believe :)
As for the
VirtSocket.serverattribute.. I didn't look it through thoroughly, but couldn't we just make it a @property that would return the globally-set-somewhere SocketIOServer ?
I think a globally set SocketIoServer would help a lot I think.
How will the "request", or "jobs" attributes be serialized ? This would seem to pose a more serious issue though.. for real applications. How will it share state about running processes ?
If we can not serialize them, we are blocked. No matter which solution we try (Redis, ØMQ://ipc, Multiprocessing.manager, etc) if the data we need to share can not be serialized there is no where we can go.
It seems I clearly overlooked some variables into the equation with my patch.
In order to get a correct strategy I think we should answer the following questions:
- What data need to be shared among different processes ?
- What data can be serialized ?
- If we can not serialize some data is there an acceptable way to make them available anyway ?
Hey @jeromer, @abourget did you guys get to collaborate on this thread further?
Yes, you can follow the discussion here : https://groups.google.com/forum/#!topic/gevent-socketio/n9mS96cnNUw
I think we are close to a solution, but I am super busy at the moment and I will not have time to work on this issue in a close future :(
Has there been any further work on this issue? Is there anything that I can help with?
Hi Lukas,
I did not have time to work on this issue, sorry. However I think you can help by working on globally defined SocketIoServer variables as discussed in the thread given 2 comments above.
:)