Initial skeleton for changes to enable distributed gevent-socketio:
1. Added a SocketManager class to abstract sockets from the storage used.
2. Started implementing default/local version, which should keep things the same and Redis version as a reference distributed implementation.
3. Abstracted out some of the objects used internally by the sockets like Queues and session dictionaries, so that they can be distributed too.
- Session lock won't block for multiple calls from the same socket, it's held by all context managers and released at exiting the last.
- Heartbeats synced using Redis pubsub.
- Integrated the manager and the session locking into virtsocket and the handler.
- Optimized bulk reading from queues.
Handling of namespaces for distributed sockets.
Configuring and creating the socket manager
Minor refactoring
Bugfixing and refactoring.
Minor fix in the default implementation for SocketManager
Bugfixes for the Redis based socket-manager.
- Added 'emit_to_endpoint' method at SocketManager
- Reworked the mixins to use the new code
- The RedisMapping used for session uses 'pickle' now (so we can add more complex objects to the sessions)
- Refactored the django_chat example to work with the new changes
- 'transports' was not passed to the server in sgunicorn, so it seems it was never used
Cooperative emit filtering for namespace mixins.
Refactoring.
- Cleanup socket data from Redis when disconnected.
- Convert 'None' to None when reading from a Redis queue.
- Bugfixes
Added support for listening to 'socket' and 'endpoint' events to SocketManager and converted the socket state syncing to use the events.
Reduced the scope of socket locking to ignore simple reading of messages or heartbeats.
Fixed to work wit the XHR polling transport.
Some initial work on the mixing to work with the new code.
Fixes for cleaning up after disconnected sockets.
Better cleanup after detach.
Extracted namespace creation in a method add_namespace to match remote_namespace.
All existing tests pass.
Fixed the django_chat project to work with new code.
Sample gunicorn config file
Localhost for Redis config
Split socket data hashes (for Redis manager) in smaller buckets.
Lua scripts for atomic bucket operations.
Added a process '_orphan_cleaner' to detect and clean left-over socket data.
Improved cleanup of socket data from Redis.
Don't wait between runs of the _orphan_cleaner until orphans are still being detected.