socket.io - One redis channel per user? -
i trying understand socket.io code uses gevent , redis pub/sub. apparently subscribe
method waits message on channel.
can have (tens of) thousands of channels, 1 channel each pushing notifications , chats 1 user? channels meant that?
def _sub_listener(socketio, chan): """ method block , listen new messages published redis, since using coroutines method can block on listen() without interrupting rest of site """ red = redis(redis_host) red.subscribe(chan) in red.listen(): socketio.send({'message': i})
i looking same thing. through searching found forums says redis can handle upto 10k channels efficiently. have not got absolute answers on happens if channel exceeds 10k.
i'm trying go ahead shared channel. here sample algorithm/implementation uses shared channel.
Comments
Post a Comment