-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async RedisCluster missing pubsub() support #2497
Comments
@utkarshgupta137 if you have time to chat I'd love to help add this functionality My current sticking point is that the ClusterPubSub class for the sync implementation seems to work with ConnectionPool instances, while the async RedisCluster definition each cluster node seems to manage their own list of free/available Connections. Curious if I should try to port the async stuff to more closely match the sync stuff, or copy and paste the pubsub stuff and change it to be okay with just Connections instead of ConnectionPools |
@itsBrady Sorry for replying late. I had written the async impl with performance in mind. Hence I opted to manage connections directly instead of creating an async client & then getting a ConnectionPool from there. This led to some significant differences in sync & async internals (as well as standalone/cluster internals), but it led to about 10-15% improvement in performance AFAIR. I've never used PubSub & I'm unfamiliar with the code, so I'm not sure why you need ConnectionPools specifically for using PubSub. You should probably look at the differences between standalone & cluster sync PubSub & then apply the same to the async PubSub, instead of porting the sync cluster to async. (i.e. do async standalone -> async cluster, not sync cluster -> async cluster). Also, the coredis library already has support for PubSub for async cluster. I think it has a significantly different architecture to the redis-py library, but it may helpful. I've switched jobs & no longer use Redis (or even Python), so I won't be able to bring feature parity to async cluster client as I hoped to do. But if you've any questions, feel free to ping or mention me. |
@utkarshgupta137 No problem at all! coredis seems like a good option, thank you for sharing I did not know it existed, I will continue to eval and let you know if I have any more questions. Thanks for your time friend! |
Duplicate of #2219 |
Version: 4.4.0
Platform: python 3.8,
Description: async RedisCluster class does not have pubsub() function, or any pubsub commands.
Looking to move from aioredis to this library for cluster mode support. Making a simple test case I get this error:
Looking in the documentation, I see that the sync client of RedisCluster has pubsub included but not the async RedisCluster. Is there a reason for this? Any workarounds that can be shared, or is the expectation to use
execute_command
to manually handle these commands?Example code:
The text was updated successfully, but these errors were encountered: