gevent-socketio icon indicating copy to clipboard operation
gevent-socketio copied to clipboard

Issue112

Open jeromer opened this issue 12 years ago • 6 comments

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 :)

jeromer avatar Jul 07 '13 18:07 jeromer

Have you taken a look at my other questions ?

abourget avatar Jul 07 '13 23:07 abourget

How will the session attribute 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.server attribute.. 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 ?

jeromer avatar Jul 08 '13 09:07 jeromer

Hey @jeromer, @abourget did you guys get to collaborate on this thread further?

arg0s avatar Jul 16 '13 11:07 arg0s

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 :(

jeromer avatar Jul 16 '13 11:07 jeromer

Has there been any further work on this issue? Is there anything that I can help with?

lukas-hetzenecker avatar Aug 07 '13 08:08 lukas-hetzenecker

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.

:)

jeromer avatar Aug 07 '13 08:08 jeromer